Skip to content

Commit

Permalink
Correct function signature of module init function generated PYBIND11…
Browse files Browse the repository at this point in the history
…_PLUGIN_IMPL macro for Python 2.x (pybind#602)
  • Loading branch information
stukowski authored and wjakob committed Jan 13, 2017
1 parent 53a338c commit 05bc1ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/pybind11/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@
#define PYBIND11_STR_TYPE ::pybind11::bytes
#define PYBIND11_OB_TYPE(ht_type) (ht_type).ob_type
#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

#if PY_VERSION_HEX >= 0x03050000 && PY_VERSION_HEX < 0x03050200
Expand Down

0 comments on commit 05bc1ff

Please sign in to comment.