Changeset 112
- Timestamp:
- 01/17/2007 00:49:22 (22 months ago)
- Files:
-
- 1 modified
-
trunk/ext/sand_table/sand_table.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ext/sand_table/sand_table.c
r111 r112 17 17 18 18 static VALUE Qimport, Qinit, Qload, Qenv, Qio, Qreal, Qref, Qall; 19 VALUE rb_cSandbox, rb_cSandboxFull, rb_cSandboxSafe, rb_eSandboxException, rb_cSandboxRef, rb_cSand wick;19 VALUE rb_cSandbox, rb_cSandboxFull, rb_cSandboxSafe, rb_eSandboxException, rb_cSandboxRef, rb_cSandboxWick; 20 20 static ID s_options; 21 21 … … 358 358 wick->scope = NULL; 359 359 wick->dyna_vars = NULL; 360 360 wick->self = Data_Wrap_Struct(rb_cSandboxWick, mark_sandwick, free_sandwick, wick); 361 361 rb_gc_register_address(&wick->self); 362 wick->self = Data_Wrap_Struct(rb_cSandwick, mark_sandwick, free_sandwick, wick);363 362 364 363 return wick; … … 429 428 VALUE link; 430 429 { 431 sandwick *wick = ALLOC(sandwick);430 sandwick *wick = alloc_sandwick(); 432 431 wick->calltype = SANDBOX_ACTION; 433 432 wick->action = action; … … 825 824 Data_Get_Struct( self, sandkit, kit ); 826 825 return kit->oMain; 827 }828 829 VALUE830 sandbox_dup_into( kit, obj )831 sandkit *kit;832 VALUE obj;833 {834 return sandbox_run(kit, sandbox_action_wick(rb_marshal_load, rb_marshal_dump(obj, Qnil)));835 826 } 836 827 … … 3004 2995 Init_kit_real(&base, 0); 3005 2996 3006 rb_cSandwick = rb_class_new(rb_cObject);3007 3008 2997 rb_cSandbox = rb_define_module("Sandbox"); 3009 2998 rb_cSandboxFull = rb_define_class_under(rb_cSandbox, "Full", rb_cObject); … … 3024 3013 rb_eSandboxException = rb_define_class_under(rb_cSandbox, "Exception", rb_eException); 3025 3014 rb_cSandboxRef = rb_define_class_under(rb_cSandbox, "Ref", rb_cObject); 3015 rb_cSandboxWick = rb_define_class_under(rb_cSandbox, "Wick", rb_cObject); 3026 3016 3027 3017 s_options = rb_intern("@options");
