[C++-sig] wrapping global variables
Dominique Devriese
dominique.devriese at student.kuleuven.ac.be
Mon Oct 21 01:26:04 CEST 2002
On Sun, Oct 20, 2002 at 07:01:28PM -0400, David Abrahams wrote:
> Dominique Devriese <dominique.devriese at student.kuleuven.ac.be> writes:
> > "
> > static Buffer curbuf;
> >
> > BOOST_PYTHON_MODULE_INIT(ee)
> > {
> > python::class_<Buffer>( "Buffer" )
> > .def( "length", &Buffer::length )
> > ;
> > python::scope().attr( "curbuf" ) = curbuf;
> > }
> > "
> for this case you might want:
>
> scope().attr( "curbuf" ) = boost::ref(curbuf);
right, thx.. :)
domi
--
Dominique Devriese
http://users.pandora.be/frit/domi.gpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20021021/56d472be/attachment.pgp>
More information about the Cplusplus-sig
mailing list