sds
sds copied to clipboard
Simple Dynamic Strings library for C
In `sdssplitlen()`, `slots` starts with a default of 5. Then `tokens = malloc(sizeof(sds)*slots);` or generally 40 bytes. However, `if (len == 0) { *count = 0; return tokens;}` How do...
In the function sdsIncrLen, I think the statement "assert(sh->free >= 0) " is redundant, because "assert(sh->free >= incr)" makes sure this situation would not happen. void sdsIncrLen(sds s, int incr)...
I find that almost in every function, you write "struct sdshdr _sh = (void_)(s - sizeof *sh);" to get the address of sdshdr, I wonder why don't you make it...
valgrind reported sdsMakeRoomFor leaking some bytes but it was just the test cases not freeing strings. closes #41
There is something about sdsMakeRoomFor that leaks memory, at least according to valgrind: ``` ==31090== HEAP SUMMARY: ==31090== in use at exit: 40 bytes in 2 blocks ==31090== total heap...
@antirez: Thank you for a great library! I realize that supporting Visual Studio is probably not your highest priority. However, with the C99 support added in Visual Studio 2013, all...