Am 06/08/2008 02:00 AM schrieb Robert Bradshaw:
Where are you setting your myData? If you do

    Foo().doSomething()

then it will segfault because the data isn't set yet. If you have

    def set_data_from_python(self, py_string):
        self.myData = py_string

Then the conversion will happen, but myData is set to point to the inside of py_string (i.e. no copying is actually done) and so the instant py_string gets deallocated the actual char* gets reclaimed.

That's not the problem. My data is set by an external library that I have opened before. I've also double-checked that it is set. But somehow in another self than the one used when calling the data.

Johannes

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to