diff options
author | Thomas A Caswell <tcaswell@gmail.com> | 2020-05-28 13:04:59 -0400 |
---|---|---|
committer | Thomas A Caswell <tcaswell@gmail.com> | 2020-05-29 11:02:35 -0400 |
commit | 405c6dec7987324395f7113eab02492b3044a9ed (patch) | |
tree | 03496b4a57b218f5f84c99fb963617280491bb6a /numpy/f2py/tests/src/array_from_pyobj | |
parent | 076c599f25255d991f59056bd16f80aa72631ffe (diff) | |
download | numpy-405c6dec7987324395f7113eab02492b3044a9ed.tar.gz |
MNT: support python 3.10
In https://github.com/python/cpython/pull/20290 CPython changed
`Py_TYPE` from a macro to an inline function. This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.
In https://github.com/python/cpython/pull/20429 CPython changed
`Py_SIZE` from a macro to an inline function. This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.
Diffstat (limited to 'numpy/f2py/tests/src/array_from_pyobj')
-rw-r--r-- | numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c index 83c0da2cf..0db33e714 100644 --- a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +++ b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c @@ -144,7 +144,7 @@ static struct PyModuleDef moduledef = { PyMODINIT_FUNC PyInit_test_array_from_pyobj_ext(void) { PyObject *m,*d, *s; m = wrap_module = PyModule_Create(&moduledef); - Py_TYPE(&PyFortran_Type) = &PyType_Type; + Py_SET_TYPE(&PyFortran_Type, &PyType_Type); import_array(); if (PyErr_Occurred()) Py_FatalError("can't initialize module wrap (failed to import numpy)"); |