From 06c3a591021055dad2a35575d976f68b31275f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Thu, 14 Nov 2013 01:29:23 +0100 Subject: [PATCH] [Py3] Fix C module declaration for Py2. --- Modules/ldapmodule.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Modules/ldapmodule.c b/Modules/ldapmodule.c index 027084b..06ac756 100644 --- a/Modules/ldapmodule.c +++ b/Modules/ldapmodule.c @@ -11,7 +11,11 @@ #include "LDAPObject.h" +#if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit__ldap(void); +#else +PyMODINIT_FUNC init_ldap(void); +#endif /* dummy module methods */ @@ -23,7 +27,11 @@ static PyMethodDef methods[] = { PyMODINIT_FUNC +#if PY_MAJOR_VERSION >= 3 PyInit__ldap() +#else +init_ldap() +#endif { PyObject *m, *d;