mirror of
https://github.com/json-c/json-c.git
synced 2026-04-10 15:59:07 +08:00
Neither vertical tab nor formfeed are considered whitespace per the JSON spec, remove them from is_ws_char().
This commit is contained in:
@@ -59,17 +59,15 @@
|
|||||||
* compiler will also inline these functions, providing an additional
|
* compiler will also inline these functions, providing an additional
|
||||||
* speedup by saving on function calls.
|
* speedup by saving on function calls.
|
||||||
*/
|
*/
|
||||||
static int is_ws_char(char c)
|
static inline int is_ws_char(char c)
|
||||||
{
|
{
|
||||||
return c == ' '
|
return c == ' '
|
||||||
|| c == '\t'
|
|| c == '\t'
|
||||||
|| c == '\n'
|
|| c == '\n'
|
||||||
|| c == '\v'
|
|
||||||
|| c == '\f'
|
|
||||||
|| c == '\r';
|
|| c == '\r';
|
||||||
}
|
}
|
||||||
|
|
||||||
static int is_hex_char(char c)
|
static inline int is_hex_char(char c)
|
||||||
{
|
{
|
||||||
return (c >= '0' && c <= '9')
|
return (c >= '0' && c <= '9')
|
||||||
|| (c >= 'A' && c <= 'F')
|
|| (c >= 'A' && c <= 'F')
|
||||||
|
|||||||
Reference in New Issue
Block a user