summaryrefslogtreecommitdiff
path: root/numpy/linalg/lapack_litemodule.c
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2020-01-03 13:23:52 -0800
committerSebastian Berg <sebastian@sipsolutions.net>2020-01-03 15:23:52 -0600
commite1aecb08f99321b72959cc50eb7b47454b613f52 (patch)
tree369d1ad3168c7a160072d39768217d680dac3e0a /numpy/linalg/lapack_litemodule.c
parentf30b2564d3923b2c307a026e4a22d20bc19872f0 (diff)
downloadnumpy-e1aecb08f99321b72959cc50eb7b47454b613f52.tar.gz
MAINT: Remove Python2 specific C module setup (gh-15231)
Dropping the support for python 2, the difference in module setup do not have to be accounted for anymore. This removes the macros and ifdef's related to module setup code and python 2 support.
Diffstat (limited to 'numpy/linalg/lapack_litemodule.c')
-rw-r--r--numpy/linalg/lapack_litemodule.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/numpy/linalg/lapack_litemodule.c b/numpy/linalg/lapack_litemodule.c
index 56f38364f..362a593a6 100644
--- a/numpy/linalg/lapack_litemodule.c
+++ b/numpy/linalg/lapack_litemodule.c
@@ -377,7 +377,6 @@ static struct PyMethodDef lapack_lite_module_methods[] = {
};
-#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"lapack_lite",
@@ -389,27 +388,14 @@ static struct PyModuleDef moduledef = {
NULL,
NULL
};
-#endif
/* Initialization function for the module */
-#if PY_MAJOR_VERSION >= 3
-#define RETVAL(x) x
PyMODINIT_FUNC PyInit_lapack_lite(void)
-#else
-#define RETVAL(x)
-PyMODINIT_FUNC
-initlapack_lite(void)
-#endif
{
PyObject *m,*d;
-#if PY_MAJOR_VERSION >= 3
m = PyModule_Create(&moduledef);
-#else
- m = Py_InitModule4("lapack_lite", lapack_lite_module_methods,
- "", (PyObject*)NULL,PYTHON_API_VERSION);
-#endif
if (m == NULL) {
- return RETVAL(NULL);
+ return NULL;
}
import_array();
d = PyModule_GetDict(m);
@@ -422,5 +408,5 @@ initlapack_lite(void)
PyDict_SetItemString(d, "_ilp64", Py_False);
#endif
- return RETVAL(m);
+ return m;
}