test if PyObject * points to real python object

"Martin v. Löwis" martin at v.loewis.de
Mon Jun 21 08:11:13 CEST 2004

David McNab wrote:
> With the Python/C API, how do i test if a given PyObject * actually 
> points to a real/valid python object?

As opposed to being a NULL pointer? o != NULL

As opposed to being a stray pointer, to garbage memory? You can't.


More information about the Python-list mailing list