Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename module to mod
  • Loading branch information
o01eg committed Apr 4, 2026
commit 40105f07b87ba2a2acead3bfb75ceab0532cf5cf
8 changes: 4 additions & 4 deletions include/boost/python/module_init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ BOOST_PYTHON_DECL PyObject* init_module(char const* name, void(*)());

# if defined(HAS_CXX11) && (PY_VERSION_HEX >= 0x030D0000)
# define _BOOST_PYTHON_MODULE_MULTI_PHASE_INIT(name, ...) \
int BOOST_PP_CAT(exec_module_,name)(PyObject* module) \
int BOOST_PP_CAT(exec_module_,name)(PyObject* mod) \
{ \
return boost::python::detail::exec_module( \
module, BOOST_PP_CAT(init_module_, name) ); \
mod, BOOST_PP_CAT(init_module_, name) ); \
} \
extern "C" BOOST_SYMBOL_EXPORT PyObject* BOOST_PP_CAT(PyInit_, name)() \
{ \
Expand Down Expand Up @@ -162,10 +162,10 @@ BOOST_PYTHON_DECL PyObject* init_module(char const* name, void(*)());
void BOOST_PP_CAT(init_module_, name)()
# else // ! HAS_CXX11 && Python 3.13+
# define _BOOST_PYTHON_MODULE_MULTI_PHASE_INIT(name) \
int BOOST_PP_CAT(exec_module_,name)(PyObject* module) \
int BOOST_PP_CAT(exec_module_,name)(PyObject* mod) \
{ \
return boost::python::detail::exec_module( \
module, BOOST_PP_CAT(init_module_, name) ); \
mod, BOOST_PP_CAT(init_module_, name) ); \
} \
extern "C" BOOST_SYMBOL_EXPORT PyObject* BOOST_PP_CAT(PyInit_, name)() \
{ \
Expand Down
4 changes: 2 additions & 2 deletions src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ BOOST_PYTHON_DECL PyObject* init_module(PyModuleDef& moduledef,

# if PY_VERSION_HEX >= 0x03050000

BOOST_PYTHON_DECL int exec_module(PyObject* module, void(*init_function)())
BOOST_PYTHON_DECL int exec_module(PyObject* mod, void(*init_function)())
{
PyObject* retval = init_module_in_scope(
module,
mod,
init_function);
return retval ? 0 : -1;
}
Expand Down