* eval.c (ruby_init): rename top_cref to ruby_top_cref and export,
along with ruby_cref, for use by the sandbox. [ruby-core:08762] * node.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b22fc4ebb6
commit
a6487b236a
@ -1,3 +1,10 @@
|
|||||||
|
Thu Aug 31 13:12:06 2006 why the lucky stiff <why@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (ruby_init): rename top_cref to ruby_top_cref and export,
|
||||||
|
along with ruby_cref, for use by the sandbox. [ruby-core:08762]
|
||||||
|
|
||||||
|
* node.h: ditto.
|
||||||
|
|
||||||
Wed Aug 30 12:01:57 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Aug 30 12:01:57 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* numeric.c (flo_hash): improve collision.
|
* numeric.c (flo_hash): improve collision.
|
||||||
|
10
eval.c
10
eval.c
@ -991,8 +991,8 @@ static struct tag *prot_tag;
|
|||||||
|
|
||||||
VALUE ruby_wrapper; /* security wrapper */
|
VALUE ruby_wrapper; /* security wrapper */
|
||||||
|
|
||||||
static NODE *ruby_cref = 0;
|
NODE *ruby_cref = 0;
|
||||||
static NODE *top_cref;
|
NODE *ruby_top_cref;
|
||||||
#define PUSH_CREF(c) ruby_cref = NEW_NODE(NODE_CREF,(c),0,ruby_cref)
|
#define PUSH_CREF(c) ruby_cref = NEW_NODE(NODE_CREF,(c),0,ruby_cref)
|
||||||
#define POP_CREF() ruby_cref = ruby_cref->nd_next
|
#define POP_CREF() ruby_cref = ruby_cref->nd_next
|
||||||
|
|
||||||
@ -1384,8 +1384,8 @@ ruby_init(void)
|
|||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
rb_call_inits();
|
rb_call_inits();
|
||||||
ruby_frame->self = ruby_top_self;
|
ruby_frame->self = ruby_top_self;
|
||||||
top_cref = rb_node_newnode(NODE_CREF,rb_cObject,0,0);
|
ruby_top_cref = rb_node_newnode(NODE_CREF,rb_cObject,0,0);
|
||||||
ruby_cref = top_cref;
|
ruby_cref = ruby_top_cref;
|
||||||
rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
|
rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
|
||||||
#ifdef __MACOS__
|
#ifdef __MACOS__
|
||||||
_macruby_init();
|
_macruby_init();
|
||||||
@ -6714,7 +6714,7 @@ rb_load(VALUE fname, int wrap)
|
|||||||
|
|
||||||
ruby_errinfo = Qnil; /* ensure */
|
ruby_errinfo = Qnil; /* ensure */
|
||||||
PUSH_VARS();
|
PUSH_VARS();
|
||||||
ruby_cref = top_cref;
|
ruby_cref = ruby_top_cref;
|
||||||
if (!wrap) {
|
if (!wrap) {
|
||||||
rb_secure(4); /* should alter global state */
|
rb_secure(4); /* should alter global state */
|
||||||
ruby_wrapper = 0;
|
ruby_wrapper = 0;
|
||||||
|
3
node.h
3
node.h
@ -153,6 +153,9 @@ typedef struct RNode {
|
|||||||
} u3;
|
} u3;
|
||||||
} NODE;
|
} NODE;
|
||||||
|
|
||||||
|
extern NODE *ruby_cref;
|
||||||
|
extern NODE *ruby_top_cref;
|
||||||
|
|
||||||
#define RNODE(obj) (R_CAST(RNode)(obj))
|
#define RNODE(obj) (R_CAST(RNode)(obj))
|
||||||
|
|
||||||
/* 0..4:T_TYPES, 5:FL_MARK, 6:reserved, 7:NODE_NEWLINE */
|
/* 0..4:T_TYPES, 5:FL_MARK, 6:reserved, 7:NODE_NEWLINE */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user