Skip to content

Commit 5831732

Browse files
byroothsbt
authored andcommitted
[ruby/json] Rename parse_float into parse_number
ruby/json@e51e796697
1 parent c991f75 commit 5831732

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ext/json/parser/parser.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ static const rb_data_type_t JSON_Parser_type;
422422
static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result);
423423
static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
424424
static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
425-
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result);
425+
static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result);
426426
static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
427427

428428

@@ -1149,7 +1149,7 @@ cs = 0;
11491149
raise_parse_error("unexpected token at '%s'", p);
11501150
}
11511151
}
1152-
np = JSON_parse_float(json, p, pe, result);
1152+
np = JSON_parse_number(json, p, pe, result);
11531153
if (np != NULL) {
11541154
{p = (( np))-1;}
11551155
}
@@ -1531,7 +1531,7 @@ enum {JSON_float_en_main = 1};
15311531
#line 742 "parser.rl"
15321532

15331533

1534-
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result)
1534+
static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result)
15351535
{
15361536
int cs = EVIL;
15371537
bool is_float = false;

ext/json/parser/parser.rl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static const rb_data_type_t JSON_Parser_type;
420420
static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result);
421421
static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
422422
static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
423-
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result);
423+
static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result);
424424
static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
425425

426426

@@ -626,7 +626,7 @@ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *resu
626626
raise_parse_error("unexpected token at '%s'", p);
627627
}
628628
}
629-
np = JSON_parse_float(json, fpc, pe, result);
629+
np = JSON_parse_number(json, fpc, pe, result);
630630
if (np != NULL) {
631631
fexec np;
632632
}
@@ -741,7 +741,7 @@ static char *JSON_decode_integer(JSON_Parser *json, char *p, VALUE *result)
741741
) (^[0-9Ee.\-]? @exit ));
742742
}%%
743743

744-
static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result)
744+
static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result)
745745
{
746746
int cs = EVIL;
747747
bool is_float = false;

0 commit comments

Comments
 (0)