Author: chromatic
Date: Tue Mar 27 11:48:35 2007
New Revision: 17793
Modified:
trunk/src/pmc/parrotobject.pmc
Log:
Actually apply the "Don't return stuff from void functions" patch (Steve
Peters, RT #42110).
Modified: trunk/src/pmc/parrotobject.pmc
==============================================================================
--- trunk/src/pmc/parrotobject.pmc (original)
+++ trunk/src/pmc/parrotobject.pmc Tue Mar 27 11:48:35 2007
@@ -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);
}