mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/psych/yaml/loader.c: Cast the difference of pointers to int
instead of casting a pointer to int.
Follow up of 39622232c7
.
This commit is contained in:
parent
2403f9ac3a
commit
58a478bce4
1 changed files with 3 additions and 3 deletions
|
@ -300,7 +300,7 @@ yaml_parser_load_scalar(yaml_parser_t *parser, yaml_event_t *first_event)
|
|||
|
||||
if (!PUSH(parser, parser->document->nodes, node)) goto error;
|
||||
|
||||
index = (int)parser->document->nodes.top - (int)parser->document->nodes.start;
|
||||
index = (int)(parser->document->nodes.top - parser->document->nodes.start);
|
||||
|
||||
if (!yaml_parser_register_anchor(parser, index,
|
||||
first_event->data.scalar.anchor)) return 0;
|
||||
|
@ -347,7 +347,7 @@ yaml_parser_load_sequence(yaml_parser_t *parser, yaml_event_t *first_event)
|
|||
|
||||
if (!PUSH(parser, parser->document->nodes, node)) goto error;
|
||||
|
||||
index = (int)parser->document->nodes.top - (int)parser->document->nodes.start;
|
||||
index = (int)(parser->document->nodes.top - parser->document->nodes.start);
|
||||
|
||||
if (!yaml_parser_register_anchor(parser, index,
|
||||
first_event->data.sequence_start.anchor)) return 0;
|
||||
|
@ -410,7 +410,7 @@ yaml_parser_load_mapping(yaml_parser_t *parser, yaml_event_t *first_event)
|
|||
|
||||
if (!PUSH(parser, parser->document->nodes, node)) goto error;
|
||||
|
||||
index = (int)parser->document->nodes.top - (int)parser->document->nodes.start;
|
||||
index = (int)(parser->document->nodes.top - parser->document->nodes.start);
|
||||
|
||||
if (!yaml_parser_register_anchor(parser, index,
|
||||
first_event->data.mapping_start.anchor)) return 0;
|
||||
|
|
Loading…
Reference in a new issue