summaryrefslogtreecommitdiffstats
path: root/eval_load.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 20:33:04 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 20:33:04 +0000
commit1c08a457a28bba0b1b94c6e200e77a65720b4f72 (patch)
tree88b03ca1962b2997f5f8e749c5f3e9c04965f100 /eval_load.c
parente7beb46b822b527f70eb12ee6783dd38dde9d766 (diff)
downloadruby-1c08a457a28bba0b1b94c6e200e77a65720b4f72.tar.gz
ruby-1c08a457a28bba0b1b94c6e200e77a65720b4f72.tar.xz
ruby-1c08a457a28bba0b1b94c6e200e77a65720b4f72.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_load.c')
-rw-r--r--eval_load.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/eval_load.c b/eval_load.c
index c71880292..49a4afaa8 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);