sdsMakeRoomFor() exposed as public API. sdsIncrLen() added. Both the changes make it possible to copy stuff from a system call to an sds buffer without the need of an additional buffer and copying overhead.

This commit is contained in:
antirez
2011-11-02 16:50:59 +01:00
parent 3526724594
commit d0b2a9b223
2 changed files with 57 additions and 1 deletions

View File

@ -88,4 +88,8 @@ sds *sdssplitargs(char *line, int *argc);
void sdssplitargs_free(sds *argv, int argc);
sds sdsmapchars(sds s, char *from, char *to, size_t setlen);
/* Low level functions exposed to the user API */
sds sdsMakeRoomFor(sds s, size_t addlen);
void sdsIncrLen(sds s, int incr);
#endif