NULL return when calling a Python function from a C extension -


i calling function in python module c extension using method suggested in 2.7 tutorial. here code in c extension:

    result = pyobject_callobject(pfailureformatfn, failureobj);     if (result)     {   // got result function         if (pyarg_parsetuple(result, "oo", &resultdict, &resultstring))         {   // decode success             < snip >              py_decref(resultdict);             py_decref(resultstring);         }          py_decref(result);     }     else     {   // bad result function         logevent("the call pfailureformatfn returned null result");         pyerr_clear();     } 

i find call returns results number of invocations , starts returning null invocations until program exits. function, in python domain (call funca), being called calls function calls recursively (call function funcb). have determined problem occurs in funcb.

my question how can find out problem in funcb is? have used gdb run program , nothing bad happens in there. is, null result returned , execution continues. want figure out causing null return (can see python stack trace?).


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -