mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
Correct function signature of module init function generated PYBIND11_PLUGIN_IMPL macro for Python 2.x (#602)
This commit is contained in:
parent
53a338c05a
commit
05bc1ffbe0
@ -139,7 +139,11 @@
|
|||||||
#define PYBIND11_STR_TYPE ::pybind11::bytes
|
#define PYBIND11_STR_TYPE ::pybind11::bytes
|
||||||
#define PYBIND11_OB_TYPE(ht_type) (ht_type).ob_type
|
#define PYBIND11_OB_TYPE(ht_type) (ht_type).ob_type
|
||||||
#define PYBIND11_PLUGIN_IMPL(name) \
|
#define PYBIND11_PLUGIN_IMPL(name) \
|
||||||
extern "C" PYBIND11_EXPORT PyObject *init##name()
|
static PyObject *pybind11_init_wrapper(); \
|
||||||
|
extern "C" PYBIND11_EXPORT void init##name() { \
|
||||||
|
(void)pybind11_init_wrapper(); \
|
||||||
|
} \
|
||||||
|
PyObject *pybind11_init_wrapper()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PY_VERSION_HEX >= 0x03050000 && PY_VERSION_HEX < 0x03050200
|
#if PY_VERSION_HEX >= 0x03050000 && PY_VERSION_HEX < 0x03050200
|
||||||
|
Loading…
Reference in New Issue
Block a user