Should MuCString be const?
In muapi.h the type MuCString
is defined as typedef char *MuCString
. It is used by some functions such as gen_sym
, which is often called with a string literal argument. Should we make MuCString
a typedef for const char*
as I don't believe gen_sym
(or any other functions that take a MuCString
) has a reason to modify the parsed string. I am current using muapi.h with C++, and so I haved to use a const_cast
(which is unsafe, the other alternative is to create a temporary buffer for the string, copy it into the buffer and then free it after the call (this would be perfectly safe but is probably unnecessary)).