On Mon, 26 Mar 2007, Steve Peters wrote: > # 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.
Yes. I sent in this same patch last week. I didn't send it to RT since I thought it was so obvious that someone would apply it right away and I'd spare that same someone the nuisance of closing the RT ticket. My mistake. I shouldn't have assumed. Anyway, it's worth noting that although one of functions actually doesn't return anything, it is documented as returning a PMC *. So either the documentation or the function is wrong in parrotobject.pmc and should be fixed. > > 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); > } > -- Andy Dougherty [EMAIL PROTECTED] Dept. of Physics Lafayette College, Easton PA 18042