JB> WHy return char * and not const char *?

WS> because it is dynamically allocated, thus it can be left in a modifiable state without risking of causing unwanted side effects elsewhere in the code. Moreover, free requires a non-const pointer as argument.

JB> Why are we changing the signature of the function? It could cause other code to change behaviour (unlikely, but possible)

WS> it is an overload but I concede that it is not strictly required after all.