Boost logo

Boost :

Subject: [boost] Python 3.2: convert convert PyObject* to PyUnicodeObject*?
From: Steve M. Robbins (steve_at_[hidden])
Date: 2011-04-06 01:53:38


Boost 1.46.1 fails to build with Python 3.2 on linux (Debian). The
build fails with:

error: cannot convert -F¡PyObject*¢ to ¡PyUnicodeObject*¢ for argument ¡1¢ to ¡Py_ssize_t PyUnicodeUCS4_AsWideChar(PyUnicodeObject*, wchar_t*, Py_ssize_t)¢-A

at this code:

      static std::wstring extract(PyObject* intermediate)
          std::wstring result(::PyObject_Length(intermediate), L' ');
          if (!result.empty())
              int err = PyUnicode_AsWideChar(
                , &result[0]
                , result.size());

              if (err == -1)
          return result;

Is there an easy fix?


Boost list run by bdawes at, gregod at, cpdaniel at, john at