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:
@@ -144,8 +144,12 @@ static PyObject *pygpu_IndexBuf__tp_new(PyTypeObject *UNUSED(type), PyObject *ar
|
||||
goto finally;
|
||||
}
|
||||
|
||||
ok = PyC_AsArray_FAST(
|
||||
values, seq_fast_item, verts_per_prim, &PyLong_Type, false, error_prefix) == 0;
|
||||
ok = PyC_AsArray_FAST(values,
|
||||
sizeof(*values),
|
||||
seq_fast_item,
|
||||
verts_per_prim,
|
||||
&PyLong_Type,
|
||||
error_prefix) == 0;
|
||||
|
||||
if (ok) {
|
||||
for (uint j = 0; j < verts_per_prim; j++) {
|
||||
|
||||
Reference in New Issue
Block a user