Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72464 - in branches/release: boost/python libs/python libs/python/src/converter libs/python/src/object
From: rwgk_at_[hidden]
Date: 2011-06-07 00:15:49


Author: rwgk
Date: 2011-06-07 00:15:33 EDT (Tue, 07 Jun 2011)
New Revision: 72464
URL: http://svn.boost.org/trac/boost/changeset/72464

Log:
merging current boost/python and libs/python from trunk into release branch
Properties modified:
   branches/release/boost/python/ (props changed)
   branches/release/libs/python/ (props changed)
Text files modified:
   branches/release/boost/python/override.hpp | 2 +-
   branches/release/libs/python/src/converter/builtin_converters.cpp | 2 ++
   branches/release/libs/python/src/converter/from_python.cpp | 5 +----
   branches/release/libs/python/src/object/class.cpp | 4 ++--
   4 files changed, 6 insertions(+), 7 deletions(-)

Modified: branches/release/boost/python/override.hpp
==============================================================================
--- branches/release/boost/python/override.hpp (original)
+++ branches/release/boost/python/override.hpp 2011-06-07 00:15:33 EDT (Tue, 07 Jun 2011)
@@ -77,7 +77,7 @@
       template <class T>
       T unchecked(type<T>* = 0)
       {
- return extract<T>(m_obj)();
+ return extract<T>(m_obj.get())();
       }
    private:
       mutable handle<> m_obj;

Modified: branches/release/libs/python/src/converter/builtin_converters.cpp
==============================================================================
--- branches/release/libs/python/src/converter/builtin_converters.cpp (original)
+++ branches/release/libs/python/src/converter/builtin_converters.cpp 2011-06-07 00:15:33 EDT (Tue, 07 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: branches/release/libs/python/src/converter/from_python.cpp
==============================================================================
--- branches/release/libs/python/src/converter/from_python.cpp (original)
+++ branches/release/libs/python/src/converter/from_python.cpp 2011-06-07 00:15:33 EDT (Tue, 07 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: branches/release/libs/python/src/object/class.cpp
==============================================================================
--- branches/release/libs/python/src/object/class.cpp (original)
+++ branches/release/libs/python/src/object/class.cpp 2011-06-07 00:15:33 EDT (Tue, 07 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