better alignment + support size_t

This commit is contained in:
Anatol Belski 2015-02-10 15:59:33 +01:00
parent 830d3d79b3
commit ca9ab1c993
4 changed files with 487 additions and 488 deletions

File diff suppressed because it is too large Load Diff

View File

@ -81,7 +81,7 @@ static int php_json_ucs2_to_int(php_json_scanner *s, int size)
return php_json_ucs2_to_int_ex(s, size, 1);
}
void php_json_scanner_init(php_json_scanner *s, char *str, int str_len, long options)
void php_json_scanner_init(php_json_scanner *s, char *str, size_t str_len, int options)
{
s->cursor = (php_json_ctype *) str;
s->limit = (php_json_ctype *) str + str_len;

View File

@ -32,15 +32,15 @@ typedef struct _php_json_scanner {
php_json_ctype *ctxmarker; /* marker position for context backtracking */
php_json_ctype *str_start; /* start position of the string */
php_json_ctype *pstr; /* string pointer for escapes conversion */
zval value; /* value */
int str_esc; /* number of extra characters for escaping */
int state; /* condition state */
zval value; /* value */
long options; /* options */
int options; /* options */
php_json_error_code errcode; /* error type if there is an error */
} php_json_scanner;
void php_json_scanner_init(php_json_scanner *scanner, char *str, int str_len, long options);
void php_json_scanner_init(php_json_scanner *scanner, char *str, size_t str_len, int options);
int php_json_scan(php_json_scanner *s);
#endif /* PHP_JSON_SCANNER_H */

View File

@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 */
/* Generated by re2c 0.13.6 */
enum YYCONDTYPE {
yycJS,