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-04-07 08:43:23 +0300
committerCampbell Barton <campbell@blender.org>2022-04-07 08:45:20 +0300
commite2f4c4db8d6cbe4694c24d599e16ee3889871bdd (patch)
treea3be9aecfcac72e0ddaf45471b56a29900101ebf /source/blender/blenkernel/BKE_text.h
parentf49a736ff4023231483c7e535ca2a7f2869d641d (diff)
Cleanup: pass the buffer length into `txt_insert_buf`
Also remove redundant NULL check.
Diffstat (limited to 'source/blender/blenkernel/BKE_text.h')
-rw-r--r--source/blender/blenkernel/BKE_text.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index a5b71d42cdc..b05abb5a73c 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -45,8 +45,8 @@ struct Text *BKE_text_load_ex(struct Main *bmain,
* \note Text data-blocks have no user by default, only the 'real user' flag.
*/
struct Text *BKE_text_load(struct Main *bmain, const char *file, const char *relpath);
-void BKE_text_clear(struct Text *text);
-void BKE_text_write(struct Text *text, const char *str);
+void BKE_text_clear(struct Text *text) ATTR_NONNULL(1);
+void BKE_text_write(struct Text *text, const char *str, int str_len) ATTR_NONNULL(1, 2);
/**
* \return codes:
* - 0 if file on disk is the same or Text is in memory only.
@@ -93,7 +93,8 @@ void txt_sel_clear(struct Text *text);
void txt_sel_line(struct Text *text);
void txt_sel_set(struct Text *text, int startl, int startc, int endl, int endc);
char *txt_sel_to_buf(struct Text *text, size_t *r_buf_strlen);
-void txt_insert_buf(struct Text *text, const char *in_buffer);
+void txt_insert_buf(struct Text *text, const char *in_buffer, int in_buffer_len)
+ ATTR_NONNULL(1, 2);
void txt_split_curline(struct Text *text);
void txt_backspace_char(struct Text *text);
void txt_backspace_word(struct Text *text);