[svn:parrot] r37778 - in trunk/src: call pmc

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Fri Mar 27 22:45:42 UTC 2009


Author: whiteknight
Date: Fri Mar 27 22:45:42 2009
New Revision: 37778
URL: https://trac.parrot.org/parrot/changeset/37778

Log:
Fix TT #321 using a patch from ronaldws++

Modified:
   trunk/src/call/pcc.c
   trunk/src/pmc/class.pmc

Modified: trunk/src/call/pcc.c
==============================================================================
--- trunk/src/call/pcc.c	Fri Mar 27 22:42:05 2009	(r37777)
+++ trunk/src/call/pcc.c	Fri Mar 27 22:45:42 2009	(r37778)
@@ -2972,7 +2972,12 @@
                                    sigs, indexes, ctx, sig_obj);
 
     /* Set up the context object for the function invokation */
-    interp->current_object       = PMCNULL;
+    if(strncmp(signature, "Pi", 2) == 0) {
+        interp->current_object = VTABLE_get_pmc_keyed_int(interp, sig_obj, 0);
+    }
+    else {
+        interp->current_object       = PMCNULL;
+    }
     interp->current_cont         = NEED_CONTINUATION;
     ctx->current_cont            = ret_cont;
     PMC_cont(ret_cont)->from_ctx = Parrot_context_ref(interp, ctx);

Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc	Fri Mar 27 22:42:05 2009	(r37777)
+++ trunk/src/pmc/class.pmc	Fri Mar 27 22:45:42 2009	(r37778)
@@ -335,7 +335,9 @@
         meth = Parrot_oo_find_vtable_override_for_class(interp, parent, name);
 
         if (!PMC_IS_NULL(meth)) {
-            Parrot_run_meth_fromc_args(interp, meth, object, name, "v");
+            PMC *sig_obj = Parrot_pcc_build_sig_object_from_varargs(interp, object, "->", NULL); 
+            Parrot_pcc_invoke_from_sig_object(interp, meth, sig_obj); 
+            gc_unregister_pmc(interp, sig_obj);
         }
     }
 }


More information about the parrot-commits mailing list