diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-20 07:18:04 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-20 07:18:04 +0000 |
commit | df45be0472a8bb87e1a7fb10f19cb7f35fd6e8e2 (patch) | |
tree | 81b3fa05ac4cb26ad341bc9f3d9decb7d0c95fb2 /ext | |
parent | 5256d1026505b01f75669c1087c74c04dacd05ba (diff) | |
download | ruby-df45be0472a8bb87e1a7fb10f19cb7f35fd6e8e2.tar.gz |
* ext/psych/emitter: f..king C99(gcc)-ism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/psych/emitter.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/psych/emitter.c b/ext/psych/emitter.c index ad1fe36d35..0400f7e9ba 100644 --- a/ext/psych/emitter.c +++ b/ext/psych/emitter.c @@ -207,12 +207,15 @@ static VALUE scalar( ) { 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 @@ static VALUE start_mapping( ) { 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); |