Patrick R. Michaud wrote:

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.)

In the long-term this won't be necessary. It's just a work-around until we get the full PDD 17 implemented (which will eliminate the need for delegation).

And, even so, the work-around is fairly unique to Capture. The Object PMC already performs the delegation step for all vtable entries, so it's not needed there. And even the methods could be modified so they rely on vtable functions for access to the delegated object. It didn't seem worth rethinking the way Capture works now, though, since it'll be shifted over to the PDD 17 way in a couple months. So, I did the simplest thing that could possibly work and just translated Capture's direct access to the delegated object to use the current interface.

Allison

Reply via email to