summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-27 06:59:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-27 06:59:07 +0000
commit2d9f20e1cfdc7532a8acef4da9b8b7a788c4e99a (patch)
treeb3c6da4bbb46fd428cc7471f7e363110c9257896 /ext
parent69185464992f0773aa308e5e12926199314219d7 (diff)
psych_parser.c: fix compile error
* ext/psych/psych_parser.c (parse): fix declarations after statement, which cause compile error on mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/psych_parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/psych/psych_parser.c b/ext/psych/psych_parser.c
index 4b18c94761..ca196ddba4 100644
--- a/ext/psych/psych_parser.c
+++ b/ext/psych/psych_parser.c
@@ -292,6 +292,9 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
}
while(!done) {
+ VALUE event_args[5];
+ VALUE start_line, start_column, end_line, end_column;
+
if(!yaml_parser_parse(parser, &event)) {
VALUE exception;
@@ -302,9 +305,6 @@ static VALUE parse(int argc, VALUE *argv, VALUE self)
rb_exc_raise(exception);
}
- VALUE event_args[5];
- VALUE start_line, start_column, end_line, end_column;
-
start_line = INT2NUM((long)event.start_mark.line);
start_column = INT2NUM((long)event.start_mark.column);
end_line = INT2NUM((long)event.end_mark.line);