C API PyObject_Call segfaults with string

Inada Naoki songofacandy at gmail.com
Wed Feb 9 20:40:35 EST 2022


On Thu, Feb 10, 2022 at 10:37 AM Jen Kris <jenkris at tutanota.com> wrote:
>> I'm using Python 3.8 so I tried your second choice:
>> pSents = PyObject_CallFunctionObjArgs(pSentMod, pListItem);
>> but pSents is 0x0. pSentMod and pListItem are valid pointers.
>
It means exception happened.
If you are writing Python/C function, return NULL (e.g. `if (pSents ==
NULL) return NULL`)
Then Python show the exception and traceback for you.
-- 
Inada Naoki <songofacandy at gmail.com>


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /