mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-05 19:20:17 +00:00
fix export name.
This commit is contained in:
parent
890ad4c804
commit
a6cc127fb1
@ -52,7 +52,7 @@ using module_ = module;
|
|||||||
|
|
||||||
#define PYBIND11_MODULE(name, variable) \
|
#define PYBIND11_MODULE(name, variable) \
|
||||||
static void _pkbind_register_##name(::pkbind::module& 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); \
|
auto m = ::pkbind::module::create(#name); \
|
||||||
_pkbind_register_##name(m); \
|
_pkbind_register_##name(m); \
|
||||||
return true; \
|
return true; \
|
||||||
|
|||||||
@ -64,7 +64,7 @@ TEST_F(PYBIND11_TEST, raw_module) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PYBIND11_TEST, module3) {
|
TEST_F(PYBIND11_TEST, module3) {
|
||||||
pybind_module_initialize();
|
py_module_initialize();
|
||||||
|
|
||||||
py::exec("import example3");
|
py::exec("import example3");
|
||||||
EXPECT_EVAL_EQ("example3.add(1, 2)", 3);
|
EXPECT_EVAL_EQ("example3.add(1, 2)", 3);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user