diff options
author | Seth Troisi <sethtroisi@google.com> | 2020-01-03 13:23:52 -0800 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2020-01-03 15:23:52 -0600 |
commit | e1aecb08f99321b72959cc50eb7b47454b613f52 (patch) | |
tree | 369d1ad3168c7a160072d39768217d680dac3e0a /doc | |
parent | f30b2564d3923b2c307a026e4a22d20bc19872f0 (diff) | |
download | numpy-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 'doc')
-rw-r--r-- | doc/Py3K.rst.txt | 2 | ||||
-rw-r--r-- | doc/source/user/c-info.ufunc-tutorial.rst | 16 |
2 files changed, 2 insertions, 16 deletions
diff --git a/doc/Py3K.rst.txt b/doc/Py3K.rst.txt index b23536ca5..3ff2f9c5d 100644 --- a/doc/Py3K.rst.txt +++ b/doc/Py3K.rst.txt @@ -225,6 +225,8 @@ A #define in config.h, defined when building for Py3. Currently, this is generated as a part of the config. Is this sensible (we could also use Py_VERSION_HEX)? + This is being cleaned up in the C code. + private/npy_3kcompat.h ---------------------- diff --git a/doc/source/user/c-info.ufunc-tutorial.rst b/doc/source/user/c-info.ufunc-tutorial.rst index 96a73f9a6..c5180d6a7 100644 --- a/doc/source/user/c-info.ufunc-tutorial.rst +++ b/doc/source/user/c-info.ufunc-tutorial.rst @@ -976,7 +976,6 @@ The C file is given below. static void *data[1] = {NULL}; - #if defined(NPY_PY3K) static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "struct_ufunc_test", @@ -988,31 +987,18 @@ The C file is given below. NULL, NULL }; - #endif - #if defined(NPY_PY3K) PyMODINIT_FUNC PyInit_struct_ufunc_test(void) - #else - PyMODINIT_FUNC initstruct_ufunc_test(void) - #endif { PyObject *m, *add_triplet, *d; PyObject *dtype_dict; PyArray_Descr *dtype; PyArray_Descr *dtypes[3]; - #if defined(NPY_PY3K) m = PyModule_Create(&moduledef); - #else - m = Py_InitModule("struct_ufunc_test", StructUfuncTestMethods); - #endif if (m == NULL) { - #if defined(NPY_PY3K) return NULL; - #else - return; - #endif } import_array(); @@ -1043,9 +1029,7 @@ The C file is given below. PyDict_SetItemString(d, "add_triplet", add_triplet); Py_DECREF(add_triplet); - #if defined(NPY_PY3K) return m; - #endif } .. index:: |