[C++-sig] How to hangle a NULL pointer?

Stefan Seefeld stefan at seefeld.name
Tue Oct 2 18:35:48 CEST 2012


On 10/02/2012 12:29 PM, Luiz Vitor Martinez Cardoso wrote:
>
> All the members are initialized to 0 or NULL if it's a pointer.
>
> The problem is that I'm getting a "Segmentation Fault" message when I
> try to access the pointers members from Python.

Can you elaborate on what you want to happen in that case ? Python has
no notion of pointers, so the pointers would need to be dereferenced. If
that isn't what you want, you need to add some logic to return something
else if the members are not initialized yet.

    Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list