json_tokener: optimize parsing of integer values

speedup for 32-bit: ~8%
speedup for 64-bit: ~9%
This commit is contained in:
Ramiro Polla
2018-12-08 19:28:46 +01:00
parent d98fc501fb
commit c9a0ac5886
3 changed files with 42 additions and 13 deletions

View File

@@ -90,6 +90,7 @@ extern int json_object_to_fd(int fd, struct json_object *obj, int flags);
const char *json_util_get_last_err(void);
extern int json_parse_sanitized_int64(const char *buf, size_t len, int64_t *retval);
extern int json_parse_int64(const char *buf, int64_t *retval);
extern int json_parse_double(const char *buf, double *retval);