diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-14 06:25:33 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-14 06:25:33 +0300 |
commit | 541ba689913e8359216a61a67a60425837af88a9 (patch) | |
tree | d74b3170e86db69571593a2265c8d4503fd392a3 /source/blender/python | |
parent | a5571fd0e8cddeb19fd7191896bc57ded44bdd7d (diff) |
Cleanup: use size_t for BLF text API functions
Also minor cleanup to txt_sel_to_buf:
- Use memcpy instead of strncpy as the strings don't contain nil bytes.
- Replace while loops with for loops.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_interface_run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c index 500221c3c50..8db122470b8 100644 --- a/source/blender/python/intern/bpy_interface_run.c +++ b/source/blender/python/intern/bpy_interface_run.c @@ -102,7 +102,7 @@ static bool python_script_exec( fn_dummy_py = PyC_UnicodeFromByte(fn_dummy); - int buf_len_dummy; + size_t buf_len_dummy; buf = txt_to_buf(text, &buf_len_dummy); text->compiled = Py_CompileStringObject(buf, fn_dummy_py, Py_file_input, NULL, -1); MEM_freeN(buf); |