@@ -20,11 +20,11 @@ get_array_function(PyObject *obj)
2020{
2121 /* Fast return for ndarray */
2222 if (PyArray_CheckExact (obj )) {
23- Py_INCREF (npy_ma_static_data .ndarray_array_function );
24- return npy_ma_static_data .ndarray_array_function ;
23+ Py_INCREF (npy_static_pydata .ndarray_array_function );
24+ return npy_static_pydata .ndarray_array_function ;
2525 }
2626
27- PyObject * array_function = PyArray_LookupSpecial (obj , npy_ma_str .array_function );
27+ PyObject * array_function = PyArray_LookupSpecial (obj , npy_interned_str .array_function );
2828 if (array_function == NULL && PyErr_Occurred ()) {
2929 PyErr_Clear (); /* TODO[gh-14801]: propagate crashes during attribute access? */
3030 }
@@ -125,7 +125,7 @@ get_implementing_args_and_methods(PyObject *relevant_args,
125125static int
126126is_default_array_function (PyObject * obj )
127127{
128- return obj == npy_ma_static_data .ndarray_array_function ;
128+ return obj == npy_static_pydata .ndarray_array_function ;
129129}
130130
131131
@@ -153,7 +153,7 @@ array_function_method_impl(PyObject *func, PyObject *types, PyObject *args,
153153 }
154154 }
155155
156- PyObject * implementation = PyObject_GetAttr (func , npy_ma_str .implementation );
156+ PyObject * implementation = PyObject_GetAttr (func , npy_interned_str .implementation );
157157 if (implementation == NULL ) {
158158 return NULL ;
159159 }
@@ -233,10 +233,10 @@ set_no_matching_types_error(PyObject *public_api, PyObject *types)
233233 /* No acceptable override found, raise TypeError. */
234234 npy_cache_import ("numpy._core._internal" ,
235235 "array_function_errmsg_formatter" ,
236- & npy_ma_thread_unsafe_state .array_function_errmsg_formatter );
237- if (npy_ma_thread_unsafe_state .array_function_errmsg_formatter != NULL ) {
236+ & npy_thread_unsafe_state .array_function_errmsg_formatter );
237+ if (npy_thread_unsafe_state .array_function_errmsg_formatter != NULL ) {
238238 PyObject * errmsg = PyObject_CallFunctionObjArgs (
239- npy_ma_thread_unsafe_state .array_function_errmsg_formatter ,
239+ npy_thread_unsafe_state .array_function_errmsg_formatter ,
240240 public_api , types , NULL );
241241 if (errmsg != NULL ) {
242242 PyErr_SetObject (PyExc_TypeError , errmsg );
@@ -299,12 +299,12 @@ array_implement_c_array_function_creation(
299299 }
300300
301301 /* The like argument must be present in the keyword arguments, remove it */
302- if (PyDict_DelItem (kwargs , npy_ma_str .like ) < 0 ) {
302+ if (PyDict_DelItem (kwargs , npy_interned_str .like ) < 0 ) {
303303 goto finish ;
304304 }
305305
306306 /* Fetch the actual symbol (the long way right now) */
307- numpy_module = PyImport_Import (npy_ma_str .numpy );
307+ numpy_module = PyImport_Import (npy_interned_str .numpy );
308308 if (numpy_module == NULL ) {
309309 goto finish ;
310310 }
0 commit comments