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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
da8406f0ac
commit
3168bfe856
@ -1358,7 +1358,7 @@ struct eval_string_from_file_arg {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static VALUE
|
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;
|
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);
|
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 char *str, const char *filename, int *s
|
|||||||
struct eval_string_from_file_arg arg;
|
struct eval_string_from_file_arg arg;
|
||||||
arg.str = str;
|
arg.str = str;
|
||||||
arg.filename = filename;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user