summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/psych/yaml/loader.c6
-rw-r--r--ext/psych/yaml/scanner.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/psych/yaml/loader.c b/ext/psych/yaml/loader.c
index db8501ac742..aa75cf57abd 100644
--- a/ext/psych/yaml/loader.c
+++ b/ext/psych/yaml/loader.c
@@ -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 = parser->document->nodes.top - parser->document->nodes.start;
+ index = (int)parser->document->nodes.top - (int)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 = parser->document->nodes.top - parser->document->nodes.start;
+ index = (int)parser->document->nodes.top - (int)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 = parser->document->nodes.top - parser->document->nodes.start;
+ index = (int)parser->document->nodes.top - (int)parser->document->nodes.start;
if (!yaml_parser_register_anchor(parser, index,
first_event->data.mapping_start.anchor)) return 0;
diff --git a/ext/psych/yaml/scanner.c b/ext/psych/yaml/scanner.c
index 359f1072f1f..204593d910b 100644
--- a/ext/psych/yaml/scanner.c
+++ b/ext/psych/yaml/scanner.c
@@ -1227,7 +1227,7 @@ yaml_parser_roll_indent(yaml_parser_t *parser, ptrdiff_t column,
return 0;
}
- parser->indent = column;
+ parser->indent = (int)column;
/* Create a token and insert it into the queue. */