On Sat, Nov 04, 2006 at 05:18:22PM +0100, Leopold Toetsch wrote: > Am Samstag, 4. November 2006 16:17 schrieb Patrick R. Michaud: > > Because 'Match' doesn't define its own set_integer_keyed_int > > vtable entry, it ought to be inheriting the one from Capture. > > But unfortunately, the default.pmc function above gets in the > > way, and redispatches the keyed_int call as a keyed call, > > Class inheritance from PMCs is very static still (like PMC-only cases). I > hope > that the :vtable patches will provide the base for a better solution. For > now, you can only implement the mssing _integer_keyed cases in Match so that > default isn't triggered.
I don't think that's possible, is it? Match is implemented as a subclass of Capture, as in: $P0 = subclass 'Capture', 'Match' So, I can create the missing cases, but what do I put for the body of the method to get to the corresponding method of Capture? .namespace [ 'Match' ] .sub set_integer_keyed_int :vtable .param int key .param int value # ... how to do set_integer_keyed_int method of Capture? .end > We could of course remove the defaults too, but that > would need a very complete set of these keyed vtables on all PMCs. How many of these would there be? Doesn't this affect only those classes that are built using ParrotObject ? Pm