ruby-changes:30170
From: nobu <ko1@a...>
Date: Mon, 29 Jul 2013 14:53:01 +0900 (JST)
Subject: [ruby-changes:30170] nobu:r42222 (trunk): vm_eval.c: fix argument type
nobu 2013-07-29 14:52:50 +0900 (Mon, 29 Jul 2013) New Revision: 42222 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42222 Log: vm_eval.c: fix argument type * vm_eval.c (eval_string_from_file_helper): fix callback argument type. rb_protect passes a VALUE not a pointer. Modified files: trunk/vm_eval.c Index: vm_eval.c =================================================================== --- vm_eval.c (revision 42221) +++ vm_eval.c (revision 42222) @@ -1358,7 +1358,7 @@ struct eval_string_from_file_arg { https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1358 }; static VALUE -eval_string_from_file_helper(void *data) +eval_string_from_file_helper(VALUE data) { const struct eval_string_from_file_arg *const arg = (struct eval_string_from_file_arg*)data; return eval_string(rb_vm_top_self(), rb_str_new2(arg->str), Qnil, arg->filename, 1); @@ -1370,7 +1370,7 @@ ruby_eval_string_from_file_protect(const https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1370 struct eval_string_from_file_arg arg; arg.str = str; arg.filename = filename; - return rb_protect((VALUE (*)(VALUE))eval_string_from_file_helper, (VALUE)&arg, state); + return rb_protect(eval_string_from_file_helper, (VALUE)&arg, state); } /** -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/