Stdlib system interaction API: call for feedback

I did not imagine that suggesting a callback function would trigger that level of discussion :smile:.

If the shared_ptr is necessary in this case, I recall that the MEGMS has an implementation in Fortran. There is also the smart-pointers from the sourcery institute.

I am not sure I totally grasp the problem discussed here. But from what I read the procedure pointer approach seems to present some drawbacks. There is another approach that can be used to store a callback function which involves some dark magic :mage: and the iso_c_binding. One could store the callback as type(c_funptr) returned from c_funloc. The procedure pointer could be restored on demand using c_f_procpointer.

1 Like