keep_alive call policy (analogous to Boost.Python's with_custodian_and_ward, fixes #62)

This commit is contained in:
Wenzel Jakob
2016-01-17 22:36:39 +01:00
parent 87187afe91
commit 5f218b3f2c
8 changed files with 208 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ void init_ex9(py::module &);
void init_ex10(py::module &);
void init_ex11(py::module &);
void init_ex12(py::module &);
void init_ex13(py::module &);
PYBIND11_PLUGIN(example) {
py::module m("example", "pybind example plugin");
@@ -37,6 +38,7 @@ PYBIND11_PLUGIN(example) {
init_ex10(m);
init_ex11(m);
init_ex12(m);
init_ex13(m);
return m.ptr();
}