2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-28 19:32:14 +00:00

This commit was manufactured by cvs2svn to create tag

'merged_to_RC_1_30_0'.

[SVN r19627]
This commit is contained in:
nobody
2003-08-16 01:05:44 +00:00
parent b8028729eb
commit f5af86616d
113 changed files with 595 additions and 4935 deletions

View File

@@ -18,11 +18,7 @@ using namespace boost::python;
typedef test_class<> X;
struct Y : test_class<1>
{
Y(int v) : test_class<1>(v) {}
Y& operator=(Y const& rhs) { x = rhs.x; return *this; }
};
typedef test_class<1> Y;
double get_fair_value(X const& x) { return x.value(); }
@@ -33,7 +29,6 @@ struct VarBase
std::string const name;
std::string get_name1() const { return name; }
};
struct Var : VarBase
@@ -43,14 +38,8 @@ struct Var : VarBase
float value;
char const* name2;
Y y;
static int static1;
static Y static2;
};
int Var::static1 = 0;
Y Var::static2(0);
BOOST_PYTHON_MODULE(data_members_ext)
{
class_<X>("X", init<int>())
@@ -85,17 +74,6 @@ BOOST_PYTHON_MODULE(data_members_ext)
.def("get_name2", &Var::get_name2, return_value_policy<return_by_value>())
.add_property("name3", &Var::get_name1)
// Test static data members
.def_readonly("ro1a", &Var::static1)
.def_readonly("ro1b", Var::static1)
.def_readwrite("rw1a", &Var::static1)
.def_readwrite("rw1b", Var::static1)
.def_readonly("ro2a", &Var::static2)
.def_readonly("ro2b", Var::static2)
.def_readwrite("rw2a", &Var::static2)
.def_readwrite("rw2b", Var::static2)
;
}