diff options
Diffstat (limited to 'ext/psych/psych_emitter.c')
-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 371c285183..b26da9e965 100644 --- a/ext/psych/psych_emitter.c +++ b/ext/psych/psych_emitter.c @@ -198,8 +198,8 @@ static VALUE start_document(VALUE self, VALUE version, VALUE tags, VALUE imp) value = rb_str_export_to_enc(value, encoding); #endif - 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++; } |