|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72349 - in trunk/libs/python/src: converter object
From: rwgk_at_[hidden]
Date: 2011-06-02 13:04:44
Author: rwgk
Date: 2011-06-02 13:04:43 EDT (Thu, 02 Jun 2011)
New Revision: 72349
URL: http://svn.boost.org/trac/boost/changeset/72349
Log:
libs/python/src: patches by Bogdan Opanchuk (trac #5590)
Text files modified:
trunk/libs/python/src/converter/builtin_converters.cpp | 2 ++
trunk/libs/python/src/converter/from_python.cpp | 5 +----
trunk/libs/python/src/object/class.cpp | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
Modified: trunk/libs/python/src/converter/builtin_converters.cpp
==============================================================================
--- trunk/libs/python/src/converter/builtin_converters.cpp (original)
+++ trunk/libs/python/src/converter/builtin_converters.cpp 2011-06-02 13:04:43 EDT (Thu, 02 Jun 2011)
@@ -366,7 +366,9 @@
static PyTypeObject const* get_pytype() { return &PyFloat_Type;}
};
+#if PY_VERSION_HEX >= 0x03000000
unaryfunc py_unicode_as_string_unaryfunc = PyUnicode_AsUTF8String;
+#endif
// A SlotPolicy for extracting C++ strings from Python objects.
struct string_rvalue_from_python
Modified: trunk/libs/python/src/converter/from_python.cpp
==============================================================================
--- trunk/libs/python/src/converter/from_python.cpp (original)
+++ trunk/libs/python/src/converter/from_python.cpp 2011-06-02 13:04:43 EDT (Thu, 02 Jun 2011)
@@ -44,11 +44,8 @@
// First check to see if it's embedded in an extension class
// instance, as a special case.
data.convertible = objects::find_instance_impl(source, converters.target_type, converters.is_shared_ptr);
- if (data.convertible)
- {
data.construct = 0;
- }
- else
+ if (!data.convertible)
{
for (rvalue_from_python_chain const* chain = converters.rvalue_chain;
chain != 0;
Modified: trunk/libs/python/src/object/class.cpp
==============================================================================
--- trunk/libs/python/src/object/class.cpp (original)
+++ trunk/libs/python/src/object/class.cpp 2011-06-02 13:04:43 EDT (Thu, 02 Jun 2011)
@@ -76,11 +76,11 @@
static int property_init(PyObject *self, PyObject *args, PyObject *kwds)
{
PyObject *get = NULL, *set = NULL, *del = NULL, *doc = NULL;
- static char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
+ static const char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
propertyobject *prop = (propertyobject *)self;
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOOO:property",
- kwlist, &get, &set, &del, &doc))
+ const_cast<char **>(kwlist), &get, &set, &del, &doc))
return -1;
if (get == Py_None)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk