From a6cc127fb1c762cc5fb70c67679fd9efc1286685 Mon Sep 17 00:00:00 2001 From: ykiko Date: Sun, 22 Sep 2024 20:07:55 +0800 Subject: [PATCH] fix export name. --- include/pybind11/internal/module.h | 2 +- include/pybind11/tests/module.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/internal/module.h b/include/pybind11/internal/module.h index 69047341..3355e2a3 100644 --- a/include/pybind11/internal/module.h +++ b/include/pybind11/internal/module.h @@ -52,7 +52,7 @@ using module_ = module; #define PYBIND11_MODULE(name, variable) \ static void _pkbind_register_##name(::pkbind::module& variable); \ - extern "C" bool pybind_module_initialize() { \ + extern "C" bool py_module_initialize() { \ auto m = ::pkbind::module::create(#name); \ _pkbind_register_##name(m); \ return true; \ diff --git a/include/pybind11/tests/module.cpp b/include/pybind11/tests/module.cpp index b6af6720..4d8b2fa3 100644 --- a/include/pybind11/tests/module.cpp +++ b/include/pybind11/tests/module.cpp @@ -64,7 +64,7 @@ TEST_F(PYBIND11_TEST, raw_module) { } TEST_F(PYBIND11_TEST, module3) { - pybind_module_initialize(); + py_module_initialize(); py::exec("import example3"); EXPECT_EVAL_EQ("example3.add(1, 2)", 3);