aboutsummaryrefslogtreecommitdiffstats
path: root/sds.c
AgeCommit message (Collapse)AuthorFilesLines
2014-02-06SDS Header pointer math rewritten in a more elegant form.antirez1-17/+17
As suggested by unwind in the Hacker News site the calculation of "sh" could be improved. In his own words: "Since the entire idea is that the pointer on the left-hand side is to the type whose size should be subtracted, I think it's better not to repeat the type but to "lock it" to the pointer instead. This also (of course) means we can drop the parenthesis with sizeof, since those are only needed when its argument is a type name."
2014-02-06Join functions improved.antirez1-2/+14
The original implementation of sdsjoin did not allowed a binary separator nor was able to handle sds strings contaning bianry data. sdsjoin() was modified to get a spearator length. sdsjoinsds() was added to join arrays of SDS strings.
2014-02-06sdscatrepr() test added.antirez1-0/+7
2014-02-06sdstrim() return type changed to void.antirez1-3/+3
2014-02-02Test fixed to work with new sdsrange() API.antirez1-6/+12
2014-02-02Use standard malloc() instead of zmalloc().antirez1-16/+16
2014-02-02Copyright year updated to 2014.antirez1-2/+2
2014-02-02Forked from sds.c in Redis to create a standalone project.antirez1-0/+882