| 41 | "- :class:`Vector`,\n"); |
| 42 | |
| 43 | static int mathutils_array_parse_fast(float *array, |
| 44 | int size, |
| 45 | PyObject *value_fast, |
| 46 | const char *error_prefix) |
| 47 | { |
| 48 | PyObject *item; |
| 49 | PyObject **value_fast_items = PySequence_Fast_ITEMS(value_fast); |
| 50 | |
| 51 | int i; |
| 52 | |
| 53 | i = size; |
| 54 | do { |
| 55 | i--; |
| 56 | if (((array[i] = PyFloat_AsDouble(item = value_fast_items[i])) == -1.0f) && PyErr_Occurred()) { |
| 57 | PyErr_Format(PyExc_TypeError, |
| 58 | "%.200s: sequence index %d expected a number, " |
| 59 | "found '%.200s' type, ", |
| 60 | error_prefix, |
| 61 | i, |
| 62 | Py_TYPE(item)->tp_name); |
| 63 | size = -1; |
| 64 | break; |
| 65 | } |
| 66 | } while (i); |
| 67 | |
| 68 | return size; |
| 69 | } |
| 70 | |
| 71 | Py_hash_t mathutils_array_hash(const float *array, size_t array_len) |
| 72 | { |
no outgoing calls
no test coverage detected