Peter Gibbs wrote:
Leopold Toetsch wrote:
- insert more const decls (e.g. string_trans_code doesn't modify its src, so ...At one stage all the source strings were defined as const; I believe this changed with the introduction of COW strings. For example, string_transcode may call string_copy if no conversion is required;
string_transcode may call string_copy, when the types/encodings are the same. This is:
- UUOST (useless use of string_trancode ;-)
- catched on calling string_transcode
- abuse of string_transcode to make a COW string copy
IMHO this part should be tossed, so string_transcode can take a const str.
I suspect that whatever we do, some compiler will find something to complain about; all we can do is try to keep the overall noise level as low as possible.
This warning WRT (void*) buffer was introduced for tcc, says the comment. Can we put a
#ifdef __tcc__ / #endif around this - does tcc define something like this?
leo