1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (exec_under): add proper casts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-07-10 09:52:21 +00:00
parent a6e3d19f3a
commit 3ead5dcfb4
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Tue Jul 10 18:49:56 2007 Koichi Sasada <ko1@atdot.net>
* eval.c (exec_under): add proper casts.
Tue Jul 10 16:58:16 2007 Koichi Sasada <ko1@atdot.net>
* vm.c, insnhelper.ci: fix svar interface.

6
eval.c
View file

@ -1813,8 +1813,8 @@ exec_under(VALUE (*func) (VALUE), VALUE under, VALUE self, VALUE args)
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
stored_cref = vm_cfp_svar_get(th, cfp, -1);
vm_cfp_svar_set(th, cfp, -1, vm_cref_push(th, under, NOEX_PUBLIC));
stored_cref = (NODE *)vm_cfp_svar_get(th, cfp, (VALUE)-1);
vm_cfp_svar_set(th, cfp, (VALUE)-1, (VALUE)vm_cref_push(th, under, NOEX_PUBLIC));
PUSH_TAG();
if ((state = EXEC_TAG()) == 0) {
@ -1823,7 +1823,7 @@ exec_under(VALUE (*func) (VALUE), VALUE under, VALUE self, VALUE args)
POP_TAG();
/* restore environment */
vm_cfp_svar_set(th, cfp, -1, stored_cref);
vm_cfp_svar_set(th, cfp, (VALUE)-1, (VALUE)stored_cref);
pcfp->self = stored_self;
if (state) {