diff options
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/psych_emitter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/psych/psych_emitter.c b/ext/psych/psych_emitter.c index 2154470781..bb4c4b226b 100644 --- a/ext/psych/psych_emitter.c +++ b/ext/psych/psych_emitter.c @@ -192,8 +192,8 @@ static VALUE start_document(VALUE self, VALUE version, VALUE tags, VALUE imp) name = rb_str_export_to_enc(name, encoding); value = rb_str_export_to_enc(value, encoding); - tail->handle = (yaml_char_t *)RSTRING_PTR(name); - tail->prefix = (yaml_char_t *)RSTRING_PTR(value); + tail->handle = (yaml_char_t *)StringValueCStr(name); + tail->prefix = (yaml_char_t *)StringValueCStr(value); tail++; } |