[前][次][番号順一覧][スレッド一覧]

ruby-changes:48802

From: nobu <ko1@a...>
Date: Mon, 27 Nov 2017 15:59:13 +0900 (JST)
Subject: [ruby-changes:48802] nobu:r60919 (trunk): psych_parser.c: fix compile error

nobu	2017-11-27 15:59:07 +0900 (Mon, 27 Nov 2017)

  New Revision: 60919

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60919

  Log:
    psych_parser.c: fix compile error
    
    * ext/psych/psych_parser.c (parse): fix declarations after
      statement, which cause compile error on mswin.

  Modified files:
    trunk/ext/psych/psych_parser.c
Index: ext/psych/psych_parser.c
===================================================================
--- ext/psych/psych_parser.c	(revision 60918)
+++ ext/psych/psych_parser.c	(revision 60919)
@@ -292,6 +292,9 @@ static VALUE parse(int argc, VALUE *argv https://github.com/ruby/ruby/blob/trunk/ext/psych/psych_parser.c#L292
     }
 
     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 https://github.com/ruby/ruby/blob/trunk/ext/psych/psych_parser.c#L305
 	    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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]