/*
 * $Id: /mirror/trunk/src/dynpmc/foo.pmc 31699 2008-10-05T11:30:01.049343Z allison  $
 * Copyright (C) 2003-2008, The Perl Foundation.
 */

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

pmclass Foo dynpmc provides scalar extends Integer {

    VTABLE INTVAL get_integer() {
        return 42;
    }

    MULTI PMC* subtract(Integer value, PMC *dest) {
        if (!dest)
            dest = 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 = 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:
 */
