Hi Glynn, thanks a lot, that solved the issue. Best regards Soeren
2015-02-14 4:10 GMT+01:00 Glynn Clements <[email protected]>: > > Sören Gebbert wrote: > >> Dear developers, >> i am trying to register a Python function as error handler callback >> using ctypes in libgis. >> I use this code in the temporal framework: >> >> >> {{{ >> def error_handler(data): >> pass >> >> CALLBACK = CFUNCTYPE(None, c_void_p) > > AFAICT, this needs to be: > > CALLBACK = CFUNCTYPE(c_void_p, c_void_p) > > For callbacks, ctypesgen converts any return type which isn't a > primitive C type to c_void_p. And None isn't a primitive C type. > > -- > Glynn Clements <[email protected]> _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
