diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-28 03:06:01 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-28 06:14:31 +0300 |
commit | 83c274ccfc86c168657af9de9939cd96b0fc3f41 (patch) | |
tree | 6bd70f43b81d6352aba7d08a4ee93d2a1bbbcb44 /source/blender/python/intern | |
parent | 77155ae1c03e6bd430c4a3a1b9a09bd6d245a156 (diff) |
Cleanup: use "num" as a suffix in: source/blender/python
See T85728
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_app_handlers.c | 10 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_array.c | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index ba3e6a3d74b..34ffef03e66 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -24,7 +24,7 @@ void bpy_app_generic_callback(struct Main *main, struct PointerRNA **pointers, - const int num_pointers, + const int pointers_num, void *arg); static PyTypeObject BlenderAppCbType; @@ -305,7 +305,7 @@ static PyObject *choose_arguments(PyObject *func, PyObject *args_all, PyObject * /* the actual callback - not necessarily called from py */ void bpy_app_generic_callback(struct Main *UNUSED(main), struct PointerRNA **pointers, - const int num_pointers, + const int pointers_num, void *arg) { PyObject *cb_list = py_cb_array[POINTER_AS_INT(arg)]; @@ -320,14 +320,14 @@ void bpy_app_generic_callback(struct Main *UNUSED(main), Py_ssize_t pos; /* setup arguments */ - for (int i = 0; i < num_pointers; ++i) { + for (int i = 0; i < pointers_num; ++i) { PyTuple_SET_ITEM(args_all, i, pyrna_struct_CreatePyObject(pointers[i])); } - for (int i = num_pointers; i < num_arguments; ++i) { + for (int i = pointers_num; i < num_arguments; ++i) { PyTuple_SET_ITEM(args_all, i, Py_INCREF_RET(Py_None)); } - if (num_pointers == 0) { + if (pointers_num == 0) { PyTuple_SET_ITEM(args_single, 0, Py_INCREF_RET(Py_None)); } else { diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index f5bec247250..8506ec97bc3 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -377,15 +377,15 @@ static int validate_array(PyObject *rvalue, totdim); return -1; } - if (pymat->num_col != dimsize[0] || pymat->num_row != dimsize[1]) { + if (pymat->col_num != dimsize[0] || pymat->row_num != dimsize[1]) { PyErr_Format(PyExc_ValueError, "%s %.200s.%.200s, matrix assign dimension size mismatch, " "is %dx%d, expected be %dx%d", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), - pymat->num_col, - pymat->num_row, + pymat->col_num, + pymat->row_num, dimsize[0], dimsize[1]); return -1; @@ -473,7 +473,7 @@ static char *copy_values(PyObject *seq, if (dim == 0) { if (MatrixObject_Check(seq)) { MatrixObject *pymat = (MatrixObject *)seq; - const size_t allocsize = pymat->num_col * pymat->num_row * sizeof(float); + const size_t allocsize = pymat->col_num * pymat->row_num * sizeof(float); /* read callback already done by validate */ /* since this is the first iteration we can assume data is allocated */ |