Skip to content

Commit cfa2baf

Browse files
author
Ralf W. Grosse-Kunstleve
committed
merging current boost/python and libs/python from trunk into release branch
[SVN r72464]
1 parent faf3cd0 commit cfa2baf

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

include/boost/python/override.hpp

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace detail
7777
template <class T>
7878
T unchecked(type<T>* = 0)
7979
{
80-
return extract<T>(m_obj)();
80+
return extract<T>(m_obj.get())();
8181
}
8282
private:
8383
mutable handle<> m_obj;

src/converter/builtin_converters.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ namespace
366366
static PyTypeObject const* get_pytype() { return &PyFloat_Type;}
367367
};
368368

369+
#if PY_VERSION_HEX >= 0x03000000
369370
unaryfunc py_unicode_as_string_unaryfunc = PyUnicode_AsUTF8String;
371+
#endif
370372

371373
// A SlotPolicy for extracting C++ strings from Python objects.
372374
struct string_rvalue_from_python

src/converter/from_python.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ BOOST_PYTHON_DECL rvalue_from_python_stage1_data rvalue_from_python_stage1(
4444
// First check to see if it's embedded in an extension class
4545
// instance, as a special case.
4646
data.convertible = objects::find_instance_impl(source, converters.target_type, converters.is_shared_ptr);
47-
if (data.convertible)
48-
{
4947
data.construct = 0;
50-
}
51-
else
48+
if (!data.convertible)
5249
{
5350
for (rvalue_from_python_chain const* chain = converters.rvalue_chain;
5451
chain != 0;

src/object/class.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ extern "C"
7676
static int property_init(PyObject *self, PyObject *args, PyObject *kwds)
7777
{
7878
PyObject *get = NULL, *set = NULL, *del = NULL, *doc = NULL;
79-
static char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
79+
static const char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
8080
propertyobject *prop = (propertyobject *)self;
8181

8282
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOOO:property",
83-
kwlist, &get, &set, &del, &doc))
83+
const_cast<char **>(kwlist), &get, &set, &del, &doc))
8484
return -1;
8585

8686
if (get == Py_None)

0 commit comments

Comments
 (0)