Open drkameleon opened 4 years ago
I think you could make your own functions that take an sds pointer and assign to it with the original function, like
void sdscat_in_place(sds * sp, char * s){ *sp = sdscat(*sp,s); }
Otherwise I don't think there is any way for the original, which expects a copy of an address, to change the address of the original, which provided the copy.
As I've read in the reference and source when you pass an
sds
string to these two functions, you always have to assign the pointer back.Is there any workaround to make these functions work in-place? That is: pass them an
sds
and have it modified? (without changing the object's pointer)