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

Mark Hammond mhammond at skippinet.com.au
Wed Apr 12 12:15:36 CEST 2000


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

>     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.

Mark.






More information about the Python-list mailing list