You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now when f is called in pure Python mode, ltypes that implements the ccall decorator would instead call the user defined callback function that can provide custom callback, so that we do not need to call into C.
Here the my_implementations module contains regular Python functions (instances of FunctionType) that provide a pure Python implementations of the ccalls. We assign to the emulations class variable.
Activity
certik commentedon Apr 25, 2023
This was implemented in https://github.com/lcompilers/lpython/pull/1740/files#diff-851646ee31435bb9b3ae29b961902cf243cb91b3b145ef2e3df7e095b47150deR288, but we don't have a test. Here is how to use it:
Here the
my_implementationsmodule contains regular Python functions (instances ofFunctionType) that provide a pure Python implementations of theccalls. We assign to theemulationsclass variable.