Skip to content

Commit 47b4b4e

Browse files
committed
Fix boost::python::import.
[SVN r37123]
1 parent 4fa07f2 commit 47b4b4e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/import.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object BOOST_PYTHON_DECL import(str name)
1717
{
1818
// should be 'char const *' but older python versions don't use 'const' yet.
1919
char *n = python::extract<char *>(name);
20-
python::handle<> module(python::borrowed(PyImport_AddModule(n)));
20+
python::handle<> module(python::borrowed(PyImport_ImportModule(n)));
2121
return python::object(module);
2222
}
2323

test/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ bpl-test crossmod_opaque
150150
/boost/python//boost_python ]
151151
[ bpl-test
152152
map_indexing_suite : map_indexing_suite.py map_indexing_suite_ext ]
153+
[ py-run import_.cpp ]
153154

154155
# if $(TEST_BIENSTMAN_NON_BUGS)
155156
# {

0 commit comments

Comments
 (0)