# New Ticket Created by  Steve Peters 
# Please include the string:  [perl #42110]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42110 >


A couple of functions in XX are trying to return values from void functions.
To some compilers, such as the standard HP-UX compilers, this is a big
no-no.  The patch below fixes this problem.

Steve Peters
[EMAIL PROTECTED]

Index: src/pmc/parrotobject.pmc
===================================================================
--- src/pmc/parrotobject.pmc    (revision 17781)
+++ src/pmc/parrotobject.pmc    (working copy)
@@ -207,8 +207,10 @@
         PMC *sub = Parrot_find_vtable_meth(interp, SELF, meth_v);
         if (PMC_IS_NULL(sub))
             sub = find_meth(interp, SELF, meth);
-        if (PMC_IS_NULL(sub))
-            return Parrot_set_attrib_by_num(INTERP, SELF, idx, value);
+        if (PMC_IS_NULL(sub)) {
+            Parrot_set_attrib_by_num(INTERP, SELF, idx, value);
+            return;
+        }
         (PMC*) Parrot_run_meth_fromc_args(interp, sub,
             SELF, meth, "vIP", idx, value);
     }
@@ -219,8 +221,10 @@
         PMC *sub = Parrot_find_vtable_meth(interp, SELF, meth_v);
         if (PMC_IS_NULL(sub))
             sub = find_meth(interp, SELF, meth);
-        if (PMC_IS_NULL(sub))
-            return Parrot_set_attrib_by_str(INTERP, SELF, idx, value);
+        if (PMC_IS_NULL(sub)) {
+            Parrot_set_attrib_by_str(INTERP, SELF, idx, value);
+            return;
+        }
         (PMC*) Parrot_run_meth_fromc_args(interp, sub,
             SELF, meth, "vSP", idx, value);
     }

Reply via email to