| 201 | } |
| 202 | |
| 203 | static PyObject * |
| 204 | array_protocol_descr_get(PyArrayObject *self) |
| 205 | { |
| 206 | PyObject *res; |
| 207 | PyObject *dobj; |
| 208 | |
| 209 | res = arraydescr_protocol_descr_get(PyArray_DESCR(self), NULL); |
| 210 | if (res) { |
| 211 | return res; |
| 212 | } |
| 213 | PyErr_Clear(); |
| 214 | |
| 215 | /* get default */ |
| 216 | dobj = PyTuple_New(2); |
| 217 | if (dobj == NULL) { |
| 218 | return NULL; |
| 219 | } |
| 220 | PyTuple_SET_ITEM(dobj, 0, PyUnicode_FromString("")); |
| 221 | PyTuple_SET_ITEM(dobj, 1, array_typestr_get(self)); |
| 222 | res = PyList_New(1); |
| 223 | if (res == NULL) { |
| 224 | Py_DECREF(dobj); |
| 225 | return NULL; |
| 226 | } |
| 227 | PyList_SET_ITEM(res, 0, dobj); |
| 228 | return res; |
| 229 | } |
| 230 | |
| 231 | static PyObject * |
| 232 | array_protocol_strides_get(PyArrayObject *self) |
no test coverage detected