2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

Merge from trunk.

[SVN r39287]
This commit is contained in:
Daniel James
2007-09-14 22:24:22 +00:00
parent 9630425051
commit 8c70f0540a
83 changed files with 2542 additions and 341 deletions

View File

@@ -43,6 +43,7 @@ struct functions
}
static shared_ptr<T> get() { return storage; }
static shared_ptr<T> &get1() { return storage; }
static int look_store()
{
@@ -71,6 +72,8 @@ struct functions
.staticmethod("identity")
.def("null", &null)
.staticmethod("null")
.def("get1", &get1, return_internal_reference<>())
.staticmethod("get1")
.def("get", &get)
.staticmethod("get")
.def("count", &T::count)
@@ -154,6 +157,14 @@ shared_ptr<Y> factory(int n)
// ------
// from Neal Becker
struct Test {
boost::shared_ptr<X> x;
};
// ------
BOOST_PYTHON_MODULE(shared_ptr_ext)
{
class_<A, boost::shared_ptr<A_Wrapper>, boost::noncopyable>("A")
@@ -193,6 +204,12 @@ BOOST_PYTHON_MODULE(shared_ptr_ext)
.def("value", &Z::value)
.def("v", &Z::v, &ZWrap::default_v)
);
// from Neal Becker
class_<Test> ("Test")
.def_readonly ("x", &Test::x, "x")
;
// ------
}
#include "module_tail.cpp"