Skip to content

Commit 27d335e

Browse files
committed
Fixes to last checkin
[SVN r13312]
1 parent 900e035 commit 27d335e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

include/boost/python/data_members.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ objects::function* make_setter(D C::*pm)
9191
::boost::bind(
9292
&detail::member<D,C,default_call_policies>::set, pm, _1, _2
9393
, default_call_policies()))
94-
, 1);
94+
, 2);
9595
}
9696

9797
template <class C, class D, class Policies>
@@ -102,7 +102,7 @@ objects::function* make_setter(D C::*pm, Policies const& policies)
102102
::boost::bind(
103103
&detail::member<D,C,Policies>::set, pm, _1, _2
104104
, policies))
105-
, 1);
105+
, 2);
106106
}
107107

108108

src/object/class.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ extern "C"
258258

259259
void class_base::add_property(char const* name, ref const& fget)
260260
{
261-
ref property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "sO", fget.get()));
261+
ref property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "O", fget.get()));
262262
if (PyObject_SetAttrString(object().get(), const_cast<char*>(name), property.get()) < 0)
263263
throw error_already_set();
264264
}
265265

266266
void class_base::add_property(char const* name, ref const& fget, ref const& fset)
267267
{
268-
ref property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "sOO", fget.get(), fset.get()));
268+
ref property(PyObject_CallFunction((PyObject*)&PyProperty_Type, "OO", fget.get(), fset.get()));
269269
if (PyObject_SetAttrString(object().get(), const_cast<char*>(name), property.get()) < 0)
270270
throw error_already_set();
271271
}

test/data_members.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
>>> x.x
55
42
66
>>> try: x.x = 77
7-
>>> except AttributeError: pass
8-
>>> else: print 'no error'
7+
... except AttributeError: pass
8+
... else: print 'no error'
99
1010
>>> y = Y(69)
1111
>>> y.x

0 commit comments

Comments
 (0)