3 ms·
In the case of disadvantage #1: s = sdscat(s,"Some more data"); You could fix that by adding a "remote pointer" header field. Inside of sdscat, you would alloc
by oh_sigh 13y ago
In the case of disadvantage #1: s = sdscat(s,"Some more data");
You could fix that by adding a "remote pointer" header field. Inside of sdscat, you would allocate a new sds struct, and set the remote pointer header field in `s` to the new sds structs location. You could also try to do a realloc and maybe youll get the same starting pointer back again.