[C++-sig] Creating a python class from c++
Stefan Seefeld
seefeld at sympatico.ca
Fri Nov 17 00:47:42 CET 2006
David Abrahams wrote:
> Stefan Seefeld <seefeld at sympatico.ca> writes:
>
>> James Healey wrote:
>>> PyFile_AsFile returns a ptr to a file object so that's
>>> working as it should.
>>>
>>> And how do i check the exception?
>>>
>>> Do i need to do any thing with the dict that gets
>>> passed into exec_file?
>> No. If the PyFile_AsFile call returns NULL
>
> Careful with that one. If Python wasn't compiled with the exact same
> compiler (and release of that compiler!) and standard lib that you're
> using to build your extension, you will most likely be trashing memory
> because the FILE struct layouts and semantics will be different.
Yup. This was a typo, I meant to refer to PyRun_File in that mail.
(See my followup mail.)
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list