diff options
author | Oran Agra <oran@redislabs.com> | 2021-06-22 17:22:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 17:22:40 +0300 |
commit | ae418eca24ba53a7dca07b0e7065f856e625469b (patch) | |
tree | 96f9079712d04b8922e7efc5217e08ff425e6cc1 /src/sds.h | |
parent | a49b766860fa5c942d2fe6b21e545afb5cdda70c (diff) | |
download | redis-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |