Commit Graph

2 Commits

Author SHA1 Message Date
Justin Israel 84915debe0 bind: WIP add checks for exception being set in wrapped python functions
This commit starts to address the issue of a non-NULL PyObject* being returned when an exception has been set by the wrapped C function. Adds a checking mechanism for PyErr_Occurred. Results in exceptions being propagated to python caller, but may introduce memory leaks for retval not being cleaned up during error.

Refs go-python/gopy #254
2021-04-05 07:55:27 +12:00
Dong-hee Na 9f50369857 gencffi: Detect functions returning a Go error
* Detect functions returning a Go error and make them pythonic (raising an Exception).
* Add tests for it.
Now it only supports 2 return values.
CPy2 and CFFI should support more return values.

Fixes: go-python/gopy#104
2017-06-16 07:31:31 +00:00