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 <campbell@blender.org>2022-03-14 06:25:33 +0300
committerCampbell Barton <campbell@blender.org>2022-03-14 06:25:33 +0300
commit541ba689913e8359216a61a67a60425837af88a9 (patch)
treed74b3170e86db69571593a2265c8d4503fd392a3 /source/blender/makesrna/intern/rna_text_api.c
parenta5571fd0e8cddeb19fd7191896bc57ded44bdd7d (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/makesrna/intern/rna_text_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_text_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c
index 0c0b8a85023..a5eadd1f36c 100644
--- a/source/blender/makesrna/intern/rna_text_api.c
+++ b/source/blender/makesrna/intern/rna_text_api.c
@@ -40,7 +40,9 @@ static void rna_Text_from_string(Text *text, const char *str)
static void rna_Text_as_string(Text *text, int *r_result_len, const char **result)
{
- *result = txt_to_buf(text, r_result_len);
+ size_t result_len;
+ *result = txt_to_buf(text, &result_len);
+ *r_result_len = result_len;
}
static void rna_Text_select_set(Text *text, int startl, int startc, int endl, int endc)