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

#include "parrot/parrot.h"

pmclass Foo dynpmc does scalar extends Integer {

    INTVAL get_integer() {
        return 42;
    }

    PMC* subtract(PMC* value, PMC* dest) {
MMD_Integer: {
        if (!dest)
            dest = pmc_new(INTERP, SELF->vtable->base_type);
        VTABLE_set_integer_native(INTERP, dest, 144);
        return dest;
        }
MMD_DEFAULT: {
        if (!dest)
            dest = 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:
 */
