diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-26 23:36:13 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-26 23:36:13 -0700 |
commit | fd76e1c22a0c4a639d10c458733dea7a46390492 (patch) | |
tree | 2fb8553171ac3ce134435365b753e4ca6f3f9a5a | |
parent | 4f9d7c2a74e025da75e1eaa52ab2ef06a5a37cb6 (diff) | |
download | psych-fd76e1c22a0c4a639d10c458733dea7a46390492.zip |
eliminating warnings
-rw-r--r-- | ext/psych/parser.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/psych/parser.c b/ext/psych/parser.c index 4ae3625..698eb37 100644 --- a/ext/psych/parser.c +++ b/ext/psych/parser.c @@ -9,8 +9,8 @@ static VALUE parse_string(VALUE self, VALUE string) yaml_parser_set_input_string( &parser, - StringValuePtr(string), - RSTRING_LEN(string) + (const unsigned char *)StringValuePtr(string), + (size_t)RSTRING_LEN(string) ); int done = 0; @@ -48,8 +48,8 @@ static VALUE parse_string(VALUE self, VALUE string) event.data.document_start.tag_directives.end; for(; start != end; start++) { VALUE pair = rb_ary_new3((long)2, - start->handle ? rb_str_new2(start->handle) : Qnil, - start->prefix ? rb_str_new2(start->prefix) : Qnil + start->handle ? rb_str_new2((const char *)start->handle) : Qnil, + start->prefix ? rb_str_new2((const char *)start->prefix) : Qnil ); rb_ary_push(tag_directives, pair); } @@ -68,15 +68,15 @@ static VALUE parse_string(VALUE self, VALUE string) case YAML_ALIAS_EVENT: rb_funcall(handler, rb_intern("alias"), 1, event.data.alias.anchor ? - rb_str_new2(event.data.alias.anchor) : + rb_str_new2((const char *)event.data.alias.anchor) : Qnil ); break; case YAML_SCALAR_EVENT: { VALUE val = rb_str_new( - event.data.scalar.value, - event.data.scalar.length + (const char *)event.data.scalar.value, + (long)event.data.scalar.length ); rb_funcall(handler, rb_intern("scalar"), 1, val); } |