Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-07-27 15:26:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-07-27 15:36:01 +0300
commit58eacb8e7c7ae95bf34896d9cdd868e7a11e044e (patch)
tree7e62d569d7196bbfc20be0b4a5cb3e822eaa8bc4 /source/blender/python/gpu/gpu_py_shader.c
parentb1a2abd6b2ba92c0b9134ae72b502a375556a417 (diff)
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.
Diffstat (limited to 'source/blender/python/gpu/gpu_py_shader.c')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index 00e876aee7d..b3f1c186716 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -309,7 +309,8 @@ static PyObject *pygpu_shader_uniform_bool(BPyGPUShader *self, PyObject *args)
ret = -1;
}
else {
- ret = PyC_AsArray_FAST(values, seq_fast, length, &PyLong_Type, false, error_prefix);
+ ret = PyC_AsArray_FAST(
+ values, sizeof(*values), seq_fast, length, &PyLong_Type, error_prefix);
}
Py_DECREF(seq_fast);
}
@@ -448,7 +449,8 @@ static PyObject *pygpu_shader_uniform_int(BPyGPUShader *self, PyObject *args)
ret = -1;
}
else {
- ret = PyC_AsArray_FAST(values, seq_fast, length, &PyLong_Type, false, error_prefix);
+ ret = PyC_AsArray_FAST(
+ values, sizeof(*values), seq_fast, length, &PyLong_Type, error_prefix);
}
Py_DECREF(seq_fast);
}