On Tue, Oct 16, 2007 at 01:39:21PM -0700, [EMAIL PROTECTED] wrote: > Modified: branches/pdd15oo/src/pmc/capture.pmc > ============================================================================== > --- branches/pdd15oo/src/pmc/capture.pmc (original) > +++ branches/pdd15oo/src/pmc/capture.pmc Tue Oct 16 13:39:20 2007 > @@ -434,8 +434,12 @@ > PMC *capt = SELF; > /* XXX: This workaround is for when we get here as > part of a subclass of Capture */ > - if (PObj_is_object_TEST(SELF)) > - capt = get_attrib_num(PMC_data(SELF), 0); > + if (PObj_is_object_TEST(SELF)) { > + STRING * classname = string_from_literal(INTERP, "Capture"); > + PMC * classobj = Parrot_oo_get_class_str(INTERP, classname); > + capt = VTABLE_get_attr_keyed(interp, SELF, > + classobj, CONST_STRING(interp, "proxy")); > + }
I'm curious... is this code implying that any PMC class that may be subclassed in PIR needs to explicitly check for when that is happening and delegate to the proxy somehow? Originally that was the reason for the "if (PObj_is_object_TEST(SELF)) ..." portion of the code above, but I was somehow hoping that with the new object model we could eliminate the need for such specific tests. If that's not the case, then we probably need to write some documentation for PMC authors that explains how to make them work properly with classes and proxies. (Apologies if this exists already and I've just missed it.) Pm