ruby-changes:15971
From: usa <ko1@a...>
Date: Thu, 20 May 2010 16:18:16 +0900 (JST)
Subject: [ruby-changes:15971] Ruby:r27916 (trunk): * ext/psych/emitter: f..king C99(gcc)-ism.
usa 2010-05-20 16:18:04 +0900 (Thu, 20 May 2010) New Revision: 27916 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27916 Log: * ext/psych/emitter: f..king C99(gcc)-ism. Modified files: trunk/ChangeLog trunk/ext/psych/emitter.c Index: ChangeLog =================================================================== --- ChangeLog (revision 27915) +++ ChangeLog (revision 27916) @@ -1,3 +1,7 @@ +Thu May 20 16:17:14 2010 NAKAMURA Usaku <usa@r...> + + * ext/psych/emitter: C99(gcc)-ism. + Thu May 20 12:59:49 2010 Aaron Patterson <aaron@t...> * ext/psych/lib/psych/stream.rb: adding YAML streaming API for Index: ext/psych/emitter.c =================================================================== --- ext/psych/emitter.c (revision 27915) +++ ext/psych/emitter.c (revision 27916) @@ -207,12 +207,15 @@ ) { yaml_emitter_t * emitter; yaml_event_t event; +#ifdef HAVE_RUBY_ENCODING_H + rb_encoding *encoding; +#endif Data_Get_Struct(self, yaml_emitter_t, emitter); Check_Type(value, T_STRING); #ifdef HAVE_RUBY_ENCODING_H - rb_encoding * encoding = rb_utf8_encoding(); + encoding = rb_utf8_encoding(); value = rb_str_export_to_enc(value, encoding); @@ -324,10 +327,13 @@ ) { yaml_emitter_t * emitter; yaml_event_t event; +#ifdef HAVE_RUBY_ENCODING_H + rb_encoding *encoding; +#endif Data_Get_Struct(self, yaml_emitter_t, emitter); #ifdef HAVE_RUBY_ENCODING_H - rb_encoding * encoding = rb_utf8_encoding(); + encoding = rb_utf8_encoding(); if(!NIL_P(anchor)) { Check_Type(anchor, T_STRING); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/