What prompted this? I'm not keen on changing the parser unless there is
some benefit. Speed, portability, fixing a reported issue, etc. The
one risk I see here is that isxdigit() is a LOCALE-aware function, so
first, it is likely slower than what it replaces here, and second, a
messed up LOCALE
I think the current code is better and not to mention faster. Shorter
code in this case does not mean better code.
On 24-May-07, at 7:50 PM, Martin Majlis wrote:
Just small refactoring. Replacing self-made function with functions
from standard headers.
Index: JSON_parser.c
=
Just small refactoring. Replacing self-made function with functions
from standard headers.
Index: JSON_parser.c
===
RCS file: /repository/php-src/ext/json/JSON_parser.c,v
retrieving revision 1.1.2.8
diff -u -u -r1.1.2.8 JSON_parser.c