2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-30 08:02:38 +00:00

Fix boost::python::import.

[SVN r37120]
This commit is contained in:
Stefan Seefeld
2007-03-01 15:17:29 +00:00
parent 08a6f35ec2
commit 50034140c4
4 changed files with 54 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ object BOOST_PYTHON_DECL import(str name)
{
// should be 'char const *' but older python versions don't use 'const' yet.
char *n = python::extract<char *>(name);
python::handle<> module(python::borrowed(PyImport_AddModule(n)));
python::handle<> module(python::borrowed(PyImport_ImportModule(n)));
return python::object(module);
}