diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-24 20:33:04 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-24 20:33:04 +0000 |
commit | f58eb1e276a2db3ff2062c80a7acf97860aca8ca (patch) | |
tree | 88b03ca1962b2997f5f8e749c5f3e9c04965f100 /eval_load.c | |
parent | 6bd0345627f383f1d1b041edba2a255ea4cdfb9b (diff) | |
download | ruby-f58eb1e276a2db3ff2062c80a7acf97860aca8ca.tar.gz |
* eval.c: remove ruby_current_node and change eval() prototype.
fix to use rb_sourcefile/line() instead of ruby_sourcefile/line.
* error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c,
include/ruby/intern.h, parse.y, process.c, ruby.c: ditto.
* vm.c: fix spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_load.c')
-rw-r--r-- | eval_load.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/eval_load.c b/eval_load.c index c71880292c..49a4afaa8c 100644 --- a/eval_load.c +++ b/eval_load.c @@ -423,13 +423,11 @@ rb_require_safe(VALUE fname, int safe) volatile VALUE errinfo = th->errinfo; int state; struct { - NODE *node; int safe; } volatile saved; char *volatile ftptr = 0; PUSH_TAG(); - saved.node = ruby_current_node; saved.safe = rb_safe_level(); if ((state = EXEC_TAG()) == 0) { VALUE path; @@ -452,7 +450,6 @@ rb_require_safe(VALUE fname, int safe) break; case 's': - ruby_current_node = 0; ruby_sourcefile = rb_source_filename(RSTRING_PTR(path)); ruby_sourceline = 0; handle = (long)rb_vm_call_cfunc(ruby_top_self, load_ext, @@ -468,7 +465,6 @@ rb_require_safe(VALUE fname, int safe) POP_TAG(); load_unlock(ftptr); - ruby_current_node = saved.node; rb_set_safe_level_force(saved.safe); if (state) { JUMP_TAG(state); @@ -502,9 +498,9 @@ init_ext_call(VALUE arg) void ruby_init_ext(const char *name, void (*init)(void)) { - ruby_current_node = 0; ruby_sourcefile = rb_source_filename(name); ruby_sourceline = 0; + if (load_lock(name)) { rb_vm_call_cfunc(ruby_top_self, init_ext_call, (VALUE)init, 0, rb_str_new2(name)); rb_provide(name); |