mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
5256d10265
commit
df45be0472
2 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu May 20 16:17:14 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* ext/psych/emitter: C99(gcc)-ism.
|
||||
|
||||
Thu May 20 12:59:49 2010 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||
|
||||
* ext/psych/lib/psych/stream.rb: adding YAML streaming API for
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue