PyTuple_Check and other type check functions didn't check the NULL pointer
Christian Heimes
lists at cheimes.de
Sun Mar 23 21:24:25 EDT 2008
NotGuru schrieb:
> My questions is: is it necessary to check the null pointer in the
> macro or it's a job for the user? Semantically all the type check
> should report a false if a null pointer is encountered. I've already
> had the patch to this issue but I am not sure if I think this problem
> right. I don't know if there are some python core developers around
> but I would like to hear all opinions towards this.
Unless stated otherwise no Py* or PY* function is NULL safe. You have to
check for NULL unless the docs *explicitly* say it's safe to call it
with a NULL argument.
Christian
More information about the Python-list
mailing list