mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-24 22:25:10 +00:00
Rename embedded_module object's name (#2282)
This avoids a potential conflict with names in the same scope of the same name as the embedded module, like namespaces or other global variables. Fixes #2172
This commit is contained in:
parent
964ab956e0
commit
b2f52225fa
@ -61,7 +61,8 @@
|
||||
} \
|
||||
} \
|
||||
PYBIND11_EMBEDDED_MODULE_IMPL(name) \
|
||||
pybind11::detail::embedded_module name(PYBIND11_TOSTRING(name), \
|
||||
pybind11::detail::embedded_module PYBIND11_CONCAT(pybind11_module_, name) \
|
||||
(PYBIND11_TOSTRING(name), \
|
||||
PYBIND11_CONCAT(pybind11_init_impl_, name)); \
|
||||
void PYBIND11_CONCAT(pybind11_init_, name)(pybind11::module &variable)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user