In pure Python mode we need some way to register custom callbacks with ltypes, for example:
import ltypes
def callback(name):
...
ltypes.register_ccall_callback(callback)
@ccall
def f(..)
...
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.
In pure Python mode we need some way to register custom callbacks with
ltypes, for example:Now when
fis called in pure Python mode, ltypes that implements theccalldecorator would instead call the user definedcallbackfunction that can provide custom callback, so that we do not need to call into C.