diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-25 16:40:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-25 16:40:44 +0300 |
commit | 77a1a2f14e969176133d53a1504dc0f0b92e8b00 (patch) | |
tree | 52a265fcb0ecc2d0bdacdb42e34bfd28797d407f /source/blender/blenlib/BLI_string.h | |
parent | 21e0eff89712435708d4c8d931e988777a9f865a (diff) |
use size_t rather then int for passing lengths to string functions since this is what guarded-malloc uses as well as stdlib.h.
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r-- | source/blender/blenlib/BLI_string.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index 4694f4c413f..635c38e1d13 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -58,7 +58,7 @@ char *BLI_strdup(const char *str); * @param len The number of bytes to duplicate * @retval Returns the duplicated string */ -char *BLI_strdupn(const char *str, int len); +char *BLI_strdupn(const char *str, const size_t len); /** * Appends the two strings, and returns new mallocN'ed string @@ -78,7 +78,7 @@ char *BLI_strdupcat(const char *str1, const char *str2); * the size of dst) * @retval Returns dst */ -char *BLI_strncpy(char *dst, const char *src, const int maxncpy); +char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy); /* Makes a copy of the text within the "" that appear after some text 'blahblah' * i.e. for string 'pose["apples"]' with prefix 'pose[', it should grab "apples" @@ -106,7 +106,7 @@ char *BLI_replacestr(char *str, const char *oldText, const char *newText); /* * Replacement for snprintf */ -int BLI_snprintf(char *buffer, size_t count, const char *format, ...) +size_t BLI_snprintf(char *buffer, size_t len, const char *format, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 3, 4))) #endif @@ -138,7 +138,7 @@ int BLI_strcaseeq(const char *a, const char *b); char *BLI_strcasestr(const char *s, const char *find); int BLI_strcasecmp(const char *s1, const char *s2); -int BLI_strncasecmp(const char *s1, const char *s2, int n); +int BLI_strncasecmp(const char *s1, const char *s2, size_t len); int BLI_natstrcmp(const char *s1, const char *s2); size_t BLI_strnlen(const char *str, size_t maxlen); |