[ruby/json] Rename parse_float into parse_number

https://github.com/ruby/json/commit/e51e796697
This commit is contained in:
Jean Boussier 2024-11-07 08:49:53 +01:00 committed by Hiroshi SHIBATA
parent c991f75c19
commit 58317328b6
2 changed files with 6 additions and 6 deletions

View File

@ -422,7 +422,7 @@ static const rb_data_type_t JSON_Parser_type;
static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result); static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result);
static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting); static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting); static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result); static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result);
static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting); static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
@ -1149,7 +1149,7 @@ tr3:
raise_parse_error("unexpected token at '%s'", p); raise_parse_error("unexpected token at '%s'", p);
} }
} }
np = JSON_parse_float(json, p, pe, result); np = JSON_parse_number(json, p, pe, result);
if (np != NULL) { if (np != NULL) {
{p = (( np))-1;} {p = (( np))-1;}
} }
@ -1531,7 +1531,7 @@ enum {JSON_float_en_main = 1};
#line 742 "parser.rl" #line 742 "parser.rl"
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result) static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result)
{ {
int cs = EVIL; int cs = EVIL;
bool is_float = false; bool is_float = false;

View File

@ -420,7 +420,7 @@ static const rb_data_type_t JSON_Parser_type;
static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result); static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result);
static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting); static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting); static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result); static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result);
static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting); static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
@ -626,7 +626,7 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu
raise_parse_error("unexpected token at '%s'", p); raise_parse_error("unexpected token at '%s'", p);
} }
} }
np = JSON_parse_float(json, fpc, pe, result); np = JSON_parse_number(json, fpc, pe, result);
if (np != NULL) { if (np != NULL) {
fexec np; fexec np;
} }
@ -741,7 +741,7 @@ static char *JSON_decode_integer(JSON_Parser *json, char *p, VALUE *result)
) (^[0-9Ee.\-]? @exit )); ) (^[0-9Ee.\-]? @exit ));
}%% }%%
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result) static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result)
{ {
int cs = EVIL; int cs = EVIL;
bool is_float = false; bool is_float = false;