Index: import.cpp =================================================================== --- import.cpp (revision 62510) +++ import.cpp (working copy) @@ -15,9 +15,8 @@ object BOOST_PYTHON_DECL import(str name) { - // should be 'char const *' but older python versions don't use 'const' yet. - char *n = python::extract(name); - python::handle<> module(PyImport_ImportModule(n)); + char const *n = python::extract(name); + python::handle<> module(PyImport_ImportModule(const_cast(n))); return python::object(module); }