diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sds.c | 3 | ||||
-rw-r--r-- | src/sds.h | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -27,6 +27,7 @@ #include <assert.h> #include <ctype.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -388,7 +389,7 @@ void sdstrim(sds s, const char *cset) { * s = sdsnew("Hello World"); * sdsrange(s,1,-1); => "ello World" */ -void sdsrange(sds s, int start, int end) { +void sdsrange(sds s, ptrdiff_t start, ptrdiff_t end) { struct sdshdr *sh = sdsheader(s); size_t newlen, len = sdslen(s); @@ -77,7 +77,7 @@ sds sdscatprintf(sds s, const char *fmt, ...); #endif void sdstrim(sds s, const char *cset); -void sdsrange(sds s, int start, int end); +void sdsrange(sds s, ptrdiff_t start, ptrdiff_t end); void sdsupdatelen(sds s); void sdsclear(sds s); int sdscmp(const sds s1, const sds s2); |