/*
 * $Id: foo.pmc 46300 2010-05-05 03:58:50Z jimmy $
 * Copyright (C) 2003-2008, Parrot Foundation.
 */

/*
 * Sample Foo class used to verify dynamic loading and
 * proper inheritance - for testing only
 */

pmclass Foo dynpmc group foo_group provides scalar extends Integer auto_attrs {

    VTABLE INTVAL get_integer() {
        return 42;
    }

    MULTI PMC* subtract(Integer value, PMC *dest) {
        if (!dest)
            dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
        VTABLE_set_integer_native(INTERP, dest, 144);
        return dest;
    }

    MULTI PMC* subtract(DEFAULT value, PMC *dest) {
        if (!dest)
            dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
        VTABLE_set_integer_native(INTERP, dest, 244);
        return dest;
    }
}


/*
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4:
 */
