Author: leo
Date: Fri Apr 29 06:27:21 2005
New Revision: 7944

Modified:
   trunk/src/exceptions.c
Log:
allow any Sub for pushaction

Modified: trunk/src/exceptions.c
==============================================================================
--- trunk/src/exceptions.c      (original)
+++ trunk/src/exceptions.c      Fri Apr 29 06:27:21 2005
@@ -172,8 +172,10 @@
 void
 Parrot_push_action(Interp * interpreter, PMC *sub)
 {
-    if (sub->vtable->base_type != enum_class_Sub)
+    if (!VTABLE_isa(interpreter, sub,
+                const_string(interpreter, "Sub"))) {
         internal_exception(1, "Tried to push a non Sub PMC action");
+    }
     stack_push(interpreter, &interpreter->ctx.control_stack, sub,
             STACK_ENTRY_ACTION, run_cleanup_action);
 }

Reply via email to