[C++-sig] functions whose return type is a pointer

Gottfried.Ganssauge at HAUFE.DE Gottfried.Ganssauge at HAUFE.DE
Wed Jan 22 17:06:47 CET 2003


I would love to prepare a patch for the opaque pointer issue if someone
could explain the proper procedure to me.

Cheers,

G.Ganßauge

> -----Original Message-----
> From: Ralf W. Grosse-Kunstleve [mailto:rwgk at yahoo.com] 
> Sent: Wednesday, January 22, 2003 3:56 PM
> To: c++-sig at python.org
> Subject: Re: [C++-sig] functions whose return type is a pointer
> 
> 
> --- Beetle <BeetleHoHo at hotmail.com> wrote:
> >    If I do this : 
> >     >>> a = A()
> >     >>> px = a.getAttributeX()
> >     what is the data type of px anyway,  or I simply can't do this 
> > kind of wrapping ?
> 
> You can, but you have to deal with life-time issues 
> explicitly. This is explained very nicely in the tutorial:
> 
http://www.boost.org/libs/python/doc/tutorial/doc/call_policies.html

For this you will have to have a class_<B> statement also.

Ralf

P.S.: Recently there was a thread on wrapping "opaque pointers":

http://mail.python.org/pipermail/c++-sig/2003-January/003207.html

I am not sure what the current status of the corresponding patch is. Please
check the archive for the whole story if this sounds interesting.


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030122/54f7610c/attachment.htm>


More information about the Cplusplus-sig mailing list