diff --git a/src/dynpmc/dynlexpad.pmc b/src/dynpmc/dynlexpad.pmc index 1164615a77..15fa3a3680 100644 --- a/src/dynpmc/dynlexpad.pmc +++ b/src/dynpmc/dynlexpad.pmc @@ -37,6 +37,7 @@ lexinfo. =cut */ + VTABLE void init_pmc(PMC* lexinfo) { Hash *hash; @@ -63,6 +64,7 @@ Initialize the LexPad PMC and remember the associate context. =cut */ + VTABLE void set_pointer(void* ctx) { PMC *std_pad = PARROT_DYNLEXPAD(SELF)->init; if (std_pad) @@ -71,6 +73,34 @@ Initialize the LexPad PMC and remember the associate context. /* +=item C + +Return the raw Hash pointer, for use in iterators + +=cut + +*/ + + VTABLE void *get_pointer() { + return PARROT_DYNLEXPAD(SELF)->hash; + } + +/* + +=item C + +Get an iterator for items in the DynLexPad + +=cut + +*/ + + VTABLE PMC *get_iter() { + return Parrot_pmc_new_init(INTERP, enum_class_HashIterator, SELF); + } + +/* + =item C Returns the number of elements in the hash. @@ -78,12 +108,15 @@ Returns the number of elements in the hash. =cut */ + VTABLE INTVAL elements() { return parrot_hash_size(INTERP, PARROT_DYNLEXPAD(SELF)->hash); } /* +/* + =item C =item C