test if PyObject * points to real python object

D

David McNab

Hi,

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

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

David said:
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.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top