[C++-sig] set python attribute from C++
Hans Meine
meine at informatik.uni-hamburg.de
Thu Jul 17 20:50:27 CEST 2008
On Donnerstag 17 Juli 2008, Gennadiy Rozental wrote:
> > Alternatively, you risk crashes and call that usage errors.
> > (Depending on the actual object lifetimes, this may be practically
> > feasible.)
>
> I am calling incref on python object when it was constructed and calling
> decref in C++ object destructor. It seems decref should cause python object
> ot be immediately destroyed.
..only if you did not create other references from Python!
> Do u believe it'll be safe in this
> environment?
No, it is not safe. Whether it practically works, you must decide.
Ciao, / / .o.
/--/ ..o
/ / ANS ooo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080717/44e31777/attachment.pgp>
More information about the Cplusplus-sig
mailing list