Author: Craig Silverstein Date: To: pcre-dev CC: seppi, pcre-dev Subject: Re: [pcre-dev] bugs in PCRE
} > 3. pcrepp.c lines 657,665 call isspace() and isdigit() on a const char, but
} > they require an unsigned char. Since their signature allows for 'int',
} > there's no implicit conversion taking place.
}
} I will pass that comment on to the maintainer of the C++ wrapper. I
} myself am not a C++ programmer.
This isn't C++ actually; it's the normal C isspace() etc. I don't
understand what you mean about these functions "requiring" an unsigned
char. As you note, their signature takes an int. Passing a signed
char to these functions is just fine: any number that would be
interpreted as negative (that is, ascii >= 128) will have isspace()
and isdigit() return false, which is what we want.
That said, there's no harm explicitly casting to an unsigned number.
But I don't believe it's necessary for correctness.