2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-27 07:02:15 +00:00

Object life support

[SVN r12662]
This commit is contained in:
Dave Abrahams
2002-02-03 05:03:05 +00:00
parent 0a9d5f680f
commit 262396d48b
5 changed files with 137 additions and 7 deletions

View File

@@ -6,7 +6,7 @@
#include <boost/python/module.hpp>
#include <boost/python/return_value_policy.hpp>
#include <boost/python/manage_new_object.hpp>
#include <boost/python/reference_existing_object.hpp>
#include <boost/python/return_internal_reference.hpp>
#include <boost/python/class.hpp>
#include <boost/mpl/type_list.hpp>
@@ -75,7 +75,7 @@ BOOST_PYTHON_MODULE_INIT(test_pointer_adoption_ext)
class_<A>()
.def("content", &A::content)
.def("get_inner", &A::get_inner, return_value_policy<reference_existing_object>())
.def("get_inner", &A::get_inner, return_internal_reference<>())
)
.add(