Is there a reason we have the current two-pointer stack setup, instead
of a struct stack or something to abstract the pointers away?  The
current setup is hard to use and easy to confuse.  (I know I confused
myself with the stacks in the regexp code... :^) )

typedef struct _stack {
        struct StackChunk *base;
        struct Stack_Entry *top;
} GenericStack;

GenericStack_push(struct Parrot_Interp *interp, GenericStack *mystack,
void *data, INTVAL type, void (*cleanup)(struct GenericStack *)) {
        /* what exactly is cleanup used for, anyway? */
        push_generic_entry(interp, &mystack->top, data, type, cleanup);
}

GenericStack_pop(struct Parrot_Interp *interp, GenericStack *mystack,
void *data, INTVAL type) {
        pop_generic_entry(interp, &mystack->top, data, type);
}

INTVAL GenericStack_depth(struct Parrot_Interp *interp, GenericStack
*mystack) {
        return stack_depth(interp, &mystack->base);
}
/* etc. */

--Brent Dax
[EMAIL PROTECTED]
Configure pumpking for Perl 6

When I take action, I’m not going to fire a $2 million missile at a $10
empty tent and hit a camel in the butt.
    --Dubya

Reply via email to