From be14f37b51a010f4c43b98f049dc48ac92ffa71f Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 11 Jul 2020 12:16:16 -0400 Subject: MNT: also use Py_SET_REFCNT instead of Py_REFCNT This is required to support Python 3.10. --- numpy/core/src/multiarray/array_coercion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/src') diff --git a/numpy/core/src/multiarray/array_coercion.c b/numpy/core/src/multiarray/array_coercion.c index 8fe996ed2..9285122b4 100644 --- a/numpy/core/src/multiarray/array_coercion.c +++ b/numpy/core/src/multiarray/array_coercion.c @@ -434,7 +434,7 @@ PyArray_Pack(PyArray_Descr *descr, char *item, PyObject *value) .flags = NPY_ARRAY_WRITEABLE, /* assume array is not behaved. */ }; Py_SET_TYPE(&arr_fields, &PyArray_Type); - Py_REFCNT(&arr_fields) = 1; + Py_SET_REFCNT(&arr_fields, 1); if (NPY_UNLIKELY(descr->type_num == NPY_OBJECT)) { /* -- cgit v1.2.1