[C++-sig] express pointer ownership

MM finjulhich at gmail.com
Thu Aug 13 11:24:42 CEST 2015


I have the following class:

class T {
};
// T has been exposed to python with class_

and free function:

void add_T( T* );

Ownership of the T* is taken by this C++ function.


If I create an instance of the python version of T, how do I "def" the
add_T function?

def("add_T", add_T)

fails to compile.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20150813/817f4039/attachment.html>


More information about the Cplusplus-sig mailing list