fix export name.

This commit is contained in:
ykiko 2024-09-22 20:07:55 +08:00
parent 890ad4c804
commit a6cc127fb1
2 changed files with 2 additions and 2 deletions

View File

@ -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; \

View File

@ -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);