[svn:parrot] r41907 - branches/pcc_reapply/src/pmc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat Oct 17 20:46:54 UTC 2009


Author: chromatic
Date: Sat Oct 17 20:46:54 2009
New Revision: 41907
URL: https://trac.parrot.org/parrot/changeset/41907

Log:
[PMC] Explicitly initialized return values before PCC calls in Exception and
Role PMCs.

Modified:
   branches/pcc_reapply/src/pmc/exception.pmc
   branches/pcc_reapply/src/pmc/role.pmc

Modified: branches/pcc_reapply/src/pmc/exception.pmc
==============================================================================
--- branches/pcc_reapply/src/pmc/exception.pmc	Sat Oct 17 20:46:53 2009	(r41906)
+++ branches/pcc_reapply/src/pmc/exception.pmc	Sat Oct 17 20:46:54 2009	(r41907)
@@ -731,7 +731,7 @@
 */
 
     METHOD backtrace() {
-        PMC *result = pmc_new(interp, enum_class_ResizablePMCArray);
+        PMC *result = PMCNULL;
         PMC *resume;
         PMC *cur_ctx;
         Parrot_Continuation_attributes    *cont;

Modified: branches/pcc_reapply/src/pmc/role.pmc
==============================================================================
--- branches/pcc_reapply/src/pmc/role.pmc	Sat Oct 17 20:46:53 2009	(r41906)
+++ branches/pcc_reapply/src/pmc/role.pmc	Sat Oct 17 20:46:54 2009	(r41907)
@@ -724,7 +724,8 @@
             PMC *alias_method       :optional :named("alias_method"),
             int  got_alias_method   :opt_flag) {
         Parrot_Role_attributes *role_info = PARROT_ROLE(SELF);
-        STRING *s_name, *r_name;
+        STRING *s_name   = NULL;
+        STRING *r_name   = NULL;
 
         (STRING *s_name) = PCCINVOKE(interp, SELF, "name");
         (STRING *r_name) = PCCINVOKE(interp, role, "name");


More information about the parrot-commits mailing list