Suppose I have a function
void foo(char *)
which, internally, needs to treat its input as a block of NUL-terminated bytes (say, it's a hash function on strings). I could cast the argument to unsigned char*
in the function. I could also change the declaration to
void foo(unsigned char *)
Now, given that char
, signed char
and unsigned char
are three different types, would this constitute an interface change, under any reasonable definition of the term "interface" in C?
(This question is intended to settle a discussion raised by another question. I have my opinions, but will not accept an answer until one comes up as a "winner" by the votes of others.)