源程序
代码语言:javascript复制void sdsIncrLen(sds s,int incr)
{
struct sdshdr *sh = (void*)(s-(sizeof(struct sdshdr)));
if(incr >= 0)
assert(sh->free >=(unsigned int)incr);
else
assert(sh->len >= (unsigned int)(-incr));
sh->len = incr;
sh->free -= incr;
s[sh->len] = '