summaryrefslogtreecommitdiff
path: root/src/zope/interface
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2010-11-15 19:22:22 +0000
committerTres Seaver <tseaver@palladion.com>2010-11-15 19:22:22 +0000
commit11f8bf0c4100b4e849cec9f3941978718538bbed (patch)
treebc49da1b9c15fa3f5ff037237907b149c24aaa1e /src/zope/interface
parent3e59749293cdf2738738e1507c6e26dddbedfc77 (diff)
downloadzope-interface-11f8bf0c4100b4e849cec9f3941978718538bbed.tar.gz
Specify return value type for C optimizations module init under Python 3.
Undeclared value caused warnings, and segfaults on some 64 bit architectures. Also, remove redundant conditional define of PyMODINIT_FUNC: it is present in 'pyport.h' on all Python versions we care about, and the conditional version here was wrong for Python 3. Fixes LP # 675064.
Diffstat (limited to 'src/zope/interface')
-rw-r--r--src/zope/interface/_zope_interface_coptimizations.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/zope/interface/_zope_interface_coptimizations.c b/src/zope/interface/_zope_interface_coptimizations.c
index 93e1136..7b0f816 100644
--- a/src/zope/interface/_zope_interface_coptimizations.c
+++ b/src/zope/interface/_zope_interface_coptimizations.c
@@ -1580,9 +1580,6 @@ static struct PyModuleDef _zic_module = {
};
#endif
-#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
-#define PyMODINIT_FUNC void
-#endif
static PyObject *
init(void)
{
@@ -1671,8 +1668,8 @@ init(void)
return m;
}
-#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC
+#if PY_MAJOR_VERSION < 3
init_zope_interface_coptimizations(void)
{
init();