[C++-sig] Creating a python class from c++
David Abrahams
dave at boost-consulting.com
Fri Nov 17 00:30:36 CET 2006
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.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list