LLNL / shroud

Shroud: generate Fortran and Python wrappers for C and C++ libraries
BSD 3-Clause "New" or "Revised" License
91 stars 7 forks source link

Remove use of stmt.cxx_local_var #361

Closed ltaylor16 closed 1 month ago

ltaylor16 commented 1 month ago

The fc-statements must now be explicit about statement fields when using an intermediate variable - C argument converted to C++. It is easier to reason about the fc-statements instead of relying on Shroud 'helping' by creating some non-obvious defaults.

Typical additions:

    "c_local": [
        "cxx"
    ],
    "c_arg_call": [
        "{c_local_cxx}"
    ],

Replace uses of {cxx_var} with {c_local_cxx}.

It is now necessary to have different groups for pointer and reference statements since the c_arg_call is different.

    "c_arg_call": [
        "&{c_local_cxx}"
    ],

Before Shroud was helping by adding to c_arg_call based on the value of cxx_local_var: pointer, scalar, result.