| 166 | |
| 167 | template <class ArrayT> |
| 168 | Py_ssize_t |
| 169 | getreadbuf (PyObject *obj, Py_ssize_t segment, void **buf) |
| 170 | { |
| 171 | if (segment != 0) |
| 172 | { |
| 173 | PyErr_SetString (PyExc_ValueError, "FixedArrays are not segmented"); |
| 174 | return -1; |
| 175 | } |
| 176 | |
| 177 | boost::python::extract<ArrayT> eObj (obj); |
| 178 | if (!eObj.check()) |
| 179 | { |
| 180 | PyErr_SetString (PyExc_ValueError, "Cannot extract FixedArray"); |
| 181 | return -1; |
| 182 | } |
| 183 | |
| 184 | ArrayT array = eObj(); |
| 185 | return bufferInfo<ArrayT> (array, buf); |
| 186 | } |
| 187 | |
| 188 | |
| 189 | template <class ArrayT> |
nothing calls this directly
no outgoing calls
no test coverage detected