diff options
author | antirez <antirez@gmail.com> | 2015-01-07 10:25:31 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-01-08 09:52:44 +0100 |
commit | 32b10004e28ff6def8c310bbb264b70958460159 (patch) | |
tree | ed0f2d0d2b20133c7e79d2af0684cbbc330809a7 /src/sds.c | |
parent | f699b5e8019e264898048bac64282f57c5b7583e (diff) | |
download | redis-32b10004e28ff6def8c310bbb264b70958460159.tar.gz |
sdsnative() removed: New rdb.c API can load native strings.
Diffstat (limited to 'src/sds.c')
-rw-r--r-- | src/sds.c | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -88,17 +88,6 @@ void sdsfree(sds s) { zfree(s-sizeof(struct sdshdr)); } -/* Remove sds header so we can use buffer as malloc'd byte array. - * Returns the contents of 's' usable as a full malloc'd C string. */ -char *sdsnative(sds s) { - if (!s) return NULL; - - size_t len = sdslen(s); - char *base = s-sizeof(struct sdshdr); - memmove(base, s, len); - return zrealloc(base, len); -} - /* Set the sds string length to the length as obtained with strlen(), so * considering as content only up to the first null term character. * |