mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval_load.c (load_ext, rb_require_safe): pass VALUE instead of
pointer. [ruby-Bugs-11659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9fa80b19a6
commit
f91ec98d43
3 changed files with 24 additions and 18 deletions
|
@ -409,10 +409,10 @@ load_failed(VALUE fname)
|
|||
}
|
||||
|
||||
static VALUE
|
||||
load_ext(VALUE arg)
|
||||
load_ext(VALUE path)
|
||||
{
|
||||
SCOPE_SET(NOEX_PUBLIC);
|
||||
return (VALUE)dln_load((const char *)arg);
|
||||
return (VALUE)dln_load(RSTRING_PTR(path));
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
@ -456,7 +456,7 @@ rb_require_safe(VALUE fname, int safe)
|
|||
ruby_sourcefile = rb_source_filename(RSTRING_PTR(path));
|
||||
ruby_sourceline = 0;
|
||||
handle = (long)rb_vm_call_cfunc(ruby_top_self, load_ext,
|
||||
ruby_source_filename, 0, path);
|
||||
path, 0, path);
|
||||
rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue