Re: [PATCH] eruby on tiger
Brian Candler <[email protected]> Tue, 19 Jul 2005 12:40:15 +0100
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 19, 2005 at 11:57:53AM +0200, Jb Evain wrote:
> Not much, this way, we use unsigned char * as arguments to functions
> such as strncmp or rb_str_new and gcc 4 complains.
>
> This is not very cute, but we could write stuff like:
>
> char *s;
> if (isspace ((int) (unsigned char) s [0])) {}
if (isspace ( *(unsigned char *)s ) ) { ... }
[There is no need to cast an unsigned char to int - it happens
automatically.]
Brian.