The bug still manifests if the return value is a reference. The error generated now is:
foo.cc: In function 'PyObject* _wrap_PyFoo_errorFunc(PyFoo*, PyObject*, PyObject*)': foo.cc:630: error: 'retval' declared as reference but not initialized
The bug still manifests if the return value is a reference. The error generated now is:
foo.cc: In function 'PyObject* _wrap_PyFoo_ errorFunc( PyFoo*, PyObject*, PyObject*)':
foo.cc:630: error: 'retval' declared as reference but not initialized