Cleanup: pass sizeof array element to PyC_AsArray
Replace the is_double argument which was only used for single/double precision floats. This allows supporting different sized int types more easily.
This commit is contained in:
@@ -242,7 +242,7 @@ static int py_imbuf_ppm_set(Py_ImBuf *self, PyObject *value, void *UNUSED(closur
|
||||
PY_IMBUF_CHECK_INT(self);
|
||||
double ppm[2];
|
||||
|
||||
if (PyC_AsArray(ppm, value, 2, &PyFloat_Type, true, "ppm") == -1) {
|
||||
if (PyC_AsArray(ppm, sizeof(*ppm), value, 2, &PyFloat_Type, "ppm") == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user