Skip to content
Browse files

fix build after https://trac.parrot.org/parrot/changeset/40958

Courtesy of bacek++
  • Loading branch information...
1 parent e1bcbe4 commit a58a57317830d669580c741f9f1917b5b0ae5e76 @fperrad committed Sep 3, 2009
Showing with 12 additions and 7 deletions.
  1. +4 −0 CREDITS
  2. +8 −7 src/pmc/luauserdata.pmc
View
4 CREDITS
@@ -127,6 +127,10 @@ N: Stephen Weeks
U: tene
D: Remove the second argument passed to exception handlers
+N: Vasily Chekalkin
+U: bacek
+D: Parrot_Context conversion
+
N: Will "Coke" Coleda
U: coke
D: #39217 - copyright cleanup
View
15 src/pmc/luauserdata.pmc
@@ -29,17 +29,18 @@ _LuaUserdata_get_metatable(PARROT_INTERP, PMC *obj) {
}
static PMC* curr_func(PARROT_INTERP) {
- Parrot_Context *sub_ctx = CONTEXT(interp)->caller_ctx;
+ PMC *sub_ctx = Parrot_pcc_get_caller_ctx(interp, CURRENT_CONTEXT(interp));
while (1) {
PMC *cont;
- if (sub_ctx->current_sub
- && _LuaFunction_get_environment(interp, sub_ctx->current_sub))
- return sub_ctx->current_sub;
- cont = sub_ctx->current_cont;
- if (!cont)
+ PMC *current_sub = Parrot_pcc_get_sub(interp, sub_ctx);
+ if (!PMC_IS_NULL(current_sub)
+ && _LuaFunction_get_environment(interp, current_sub))
+ return current_sub;
+ cont = Parrot_pcc_get_continuation(interp, sub_ctx);
+ if (PMC_IS_NULL(cont))
break;
sub_ctx = PMC_cont(cont)->to_ctx;
- if (!sub_ctx)
+ if (PMC_IS_NULL(sub_ctx))
break;
}
return NULL;

0 comments on commit a58a573

Please sign in to comment.
Something went wrong with that request. Please try again.