summaryrefslogtreecommitdiff
path: root/src/sds.h
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2021-06-22 17:22:40 +0300
committerGitHub <noreply@github.com>2021-06-22 17:22:40 +0300
commitae418eca24ba53a7dca07b0e7065f856e625469b (patch)
tree96f9079712d04b8922e7efc5217e08ff425e6cc1 /src/sds.h
parenta49b766860fa5c942d2fe6b21e545afb5cdda70c (diff)
downloadredis-ae418eca24ba53a7dca07b0e7065f856e625469b.tar.gz
Adjustments to recent RM_StringTruncate fix (#3718) (#9125)
- Introduce a new sdssubstr api as a building block for sdsrange. The API of sdsrange is many times hard to work with and also has corner case that cause bugs. sdsrange is easy to work with and also simplifies the implementation of sdsrange. - Revert the fix to RM_StringTruncate and just use sdssubstr instead of sdsrange. - Solve valgrind warnings from the new tests introduced by the previous PR.
Diffstat (limited to 'src/sds.h')
-rw-r--r--src/sds.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sds.h b/src/sds.h
index 8392c2064..9b01b4e4e 100644
--- a/src/sds.h
+++ b/src/sds.h
@@ -238,6 +238,7 @@ sds sdscatprintf(sds s, const char *fmt, ...);
sds sdscatfmt(sds s, char const *fmt, ...);
sds sdstrim(sds s, const char *cset);
+void sdssubstr(sds s, size_t start, size_t len);
void sdsrange(sds s, ssize_t start, ssize_t end);
void sdsupdatelen(sds s);
void sdsclear(sds s);