[C++-sig] Wrapping global data

Roman Yakovenko roman.yakovenko at gmail.com
Tue Oct 2 21:02:43 CEST 2007


On 10/2/07, Matthew Scouten <matthew.scouten at gmail.com> wrote:
>
> OK, I can wrap a global function, I can wrap a member function, I can
> wrap a member variable,


The answer is: it depends
* on global variable type
* whether you need to share it between Python and C++ code at the same time

for immutable types: http://boost.org/libs/python/doc/v2/scope.html

for shared class instances:
http://wiki.python.org/moin/boost.python/HowTo#head-85904d74f4f9f20c1380ede50e2eb95a4c333c37

 P.S. Google will point you to other resources

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20071002/12289d78/attachment.htm>


More information about the Cplusplus-sig mailing list