[svn:parrot] r45287 - trunk/src

chromatic at svn.parrot.org chromatic at svn.parrot.org
Mon Mar 29 21:11:43 UTC 2010


Author: chromatic
Date: Mon Mar 29 21:11:42 2010
New Revision: 45287
URL: https://trac.parrot.org/parrot/changeset/45287

Log:
[src] Made Parrot_pmc_new_init_int() return instantiated PMC when creating a
new PIR object.  This needs tests, but it prevents awkward crashes and removes
a compiler warning.

Modified:
   trunk/src/pmc.c

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c	Mon Mar 29 20:06:11 2010	(r45286)
+++ trunk/src/pmc.c	Mon Mar 29 21:11:42 2010	(r45287)
@@ -586,8 +586,7 @@
         PMC * const initial =
           Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
         VTABLE_set_integer_native(interp, initial, init);
-        VTABLE_instantiate(interp, classobj, initial);
-        /* XXX Falls through to end of function without returning */
+        return VTABLE_instantiate(interp, classobj, initial);
     }
     else {
         PMC * const pmc = get_new_pmc_header(interp, base_type, 0);


More information about the parrot-commits mailing list