From dfdf805106bd4b9451555b762bfd87b61eefa5e6 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 5 Oct 2002 20:11:57 +0000 Subject: [PATCH] Make AIX work again [SVN r15743] --- src/aix_init_module.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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;