Re: [PHP4BETA] cvs: php4 /ext/standard/ Makefile.in basic_functions.clevenshtein.c php_string.h
[email protected] (Hartmut Holzgraefe)
| Newsgroups | php.version4 |
|---|---|
| Message-ID | <[email protected]> |
Sascha Schumann wrote:
> > /* swap if l2 longer than l1 */
> > if(l1<l2) {
> > (long)s1 ^= (long)s2; (long)s2 ^= (long)s1; (long)s1 ^= (long)s2;
>
> s1 and s2 are declared const. That translates to read-only in plain
> English. Either leave the variables untouched, or don't declare them
> const.
>
> Please fix it ASAP, because currently the build is broken on most non-gcc
> compilers.
they are declared 'const *', not 'const', that translates to
'you may not write through me', that 's1=...' is ok, but '*s1=...' never
is
(correct me if i'm wrong, i'm not yet to old to learn new tricks)
IMHO whats breaking is that the cast to (long) will drop the const
attribute,
thats another issue, but it was a dirty trick anyway
surely overoptimized ... :(
PS: i'm no longer working at media engineering (although the address
still works)
please use [email protected] instead, its shorter and delivery will be
faster