[C++-sig] Re: boost:python:embedding

David Abrahams dave at boost-consulting.com
Tue May 6 20:39:44 CEST 2003


Dirk Gerrits <dirk at gerrits.homeip.net> writes:

>>>Yes I looked into it a bit, but I haven't actually changed any
>>>code. For one, I'm not totally sure how the releasing should be
>>>done. Py_AtExit() won't suffice
>> Why, pray tell?
>
>  From the docs:
>
> int Py_AtExit(void (*func) ())
>      Register a cleanup function to be called by Py_Finalize()
> [snip]
> Since Python's internal finallization will have completed before the
> cleanup function, no Python APIs should be called by func.

I'm not sure if these docs are accurate; I checked into it once.  You
might want to use the source (Luke).

> I assumed that the releasing would need to make Python API calls. But
> perhaps I'm mistaken?

No, you're correct.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list