Seg fault in Python/C API: PyString_FromString(NULL)

Mark Hammond mhammond at
Wed Apr 12 12:15:36 CEST 2000

"Yves-Eric Martin" <yemartin at> wrote in message
news:38F422C5293.A67BYEMARTIN at

>     First, I am new to the Python/C API, so correct me if I am wrong:
> shouldn't PyString_FromString(NULL) return Py_None? Or am I out to
> lunch?

Nope - you must check for NULL before making the call.


More information about the Python-list mailing list