[C++-sig] Re: Can anybody tell me the other difference betweenthese 2 little programs?

Conan Brink conanb at STCG.net
Thu Sep 11 21:03:09 CEST 2003


The short description is that the second one works because those handles
all pass out of scope before you call Py_Finalize(), so that
Boost.Python isn't trying to keep anything alive past the call to
Py_Finalize().

The solution (until such time as it gets off the TODO list):  Don't call
Py_Finalize() if you have any Boost.Python objects still alive.

-Conan

-----Original Message-----
From: yakumoklesk at yahoo.es [mailto:yakumoklesk at yahoo.es] 
Sent: Thursday, September 11, 2003 11:57 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Re: Can anybody tell me the other difference
betweenthese 2 little programs?

Hehehe, good joke with the "diff" command. Well, if this error is 
something that is in the TODO list, I'll take the way that does not
crash 
for the moment.

Thank you David.

David Lucena.


On 11 Sep 2003 at 12:43, David Abrahams wrote:

> yakumoklesk at yahoo.es writes:
> 
> >
> > The first difference I have found is that the first version exits
with an error
> >
> > Fatal Python error: PyThreadState_Get: no current thread
> >
> > while the second version works OK.
> 
[diff humor deleted]
> 
> ...but seriously, folks:
>
http://www.boost-consulting.com/boost/libs/python/todo.html#pyfinalize-s
afety




This message contains information that may be confidential and privileged.  Unless you are the addressee (or authorized to receive messages for the addressee), you may not use, copy, or disclose to anyone the message or any information contained in the message.  If you have received the message in error, please advise the sender by reply e-mail and delete the message.  Nothing in this message should be interpreted as a digital or electronic signature that can be used to authenticate a contract or any other legal document.




More information about the Cplusplus-sig mailing list