| 5097 | |
| 5098 | |
| 5099 | NPY_NO_EXPORT PyObject * |
| 5100 | ufunc_seterr(PyObject *NPY_UNUSED(dummy), PyObject *arg) |
| 5101 | { |
| 5102 | PyObject *thedict; |
| 5103 | int res; |
| 5104 | PyObject *val = arg; |
| 5105 | static char *msg = "Error object must be a list of length 3"; |
| 5106 | |
| 5107 | if (!PyList_CheckExact(val) || PyList_GET_SIZE(val) != 3) { |
| 5108 | PyErr_SetString(PyExc_ValueError, msg); |
| 5109 | return NULL; |
| 5110 | } |
| 5111 | thedict = PyThreadState_GetDict(); |
| 5112 | if (thedict == NULL) { |
| 5113 | thedict = PyEval_GetBuiltins(); |
| 5114 | } |
| 5115 | res = PyDict_SetItem(thedict, npy_um_str_pyvals_name, val); |
| 5116 | if (res < 0) { |
| 5117 | return NULL; |
| 5118 | } |
| 5119 | #if USE_USE_DEFAULTS==1 |
| 5120 | if (ufunc_update_use_defaults() < 0) { |
| 5121 | return NULL; |
| 5122 | } |
| 5123 | #endif |
| 5124 | Py_RETURN_NONE; |
| 5125 | } |
| 5126 | |
| 5127 | |
| 5128 |
nothing calls this directly
no test coverage detected