diff --git a/src/aix_init_module.cpp b/src/aix_init_module.cpp index 2345aa4f..3eb9f097 100644 --- a/src/aix_init_module.cpp +++ b/src/aix_init_module.cpp @@ -23,10 +23,10 @@ namespace boost { namespace python { namespace detail { namespace { - extern "C" void initlibbpl() + static PyMethodDef initial_methods[] = { { 0, 0, 0, 0 } }; + extern "C" void initlibboost_python() { - static PyMethodDef initial_methods[] = { { 0, 0, 0, 0 } }; - Py_InitModule("libbpl", initial_methods); + Py_InitModule("libboost_python", initial_methods); } struct find_and_open_file @@ -105,7 +105,7 @@ void aix_init_module( static bool initialized; if (!initialized) { - char const* const name = "libbpl.so"; + char const* const name = "libboost_python.so"; find_and_open_file dynlib("LIBPATH", name); if (dynlib.fp == 0) { @@ -113,8 +113,8 @@ void aix_init_module( return; } - std::string::size_type pos = pos = dynlib.filename.find_first_of(".so",0); - if (pos == std::string::npos) + std::string::size_type pos = pos = dynlib.filename.rfind(".so"); + if (pos != dynlib.filename.size() - 3) { fprintf(stderr, "dynamic library %s must end with .so\n", dynlib.filename.c_str()); return;