From 47b4b4efbb782c53069d346dbca97f2b7779e560 Mon Sep 17 00:00:00 2001 From: Stefan Seefeld Date: Thu, 1 Mar 2007 18:31:10 +0000 Subject: [PATCH] Fix boost::python::import. [SVN r37123] --- src/import.cpp | 2 +- test/Jamfile.v2 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/import.cpp b/src/import.cpp index 9686ab2f..1a066dfb 100644 --- a/src/import.cpp +++ b/src/import.cpp @@ -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(name); - python::handle<> module(python::borrowed(PyImport_AddModule(n))); + python::handle<> module(python::borrowed(PyImport_ImportModule(n))); return python::object(module); } diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e32792a4..743ca4d3 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -150,6 +150,7 @@ bpl-test crossmod_opaque /boost/python//boost_python ] [ bpl-test map_indexing_suite : map_indexing_suite.py map_indexing_suite_ext ] +[ py-run import_.cpp ] # if $(TEST_BIENSTMAN_NON_BUGS) # {