/*
 * Sample TestHlld class used to verify namespace method access
 */

pmclass TestHlld
    extends  String
    provides string
    dynpmc
    hll      Squaak
    maps     String {

    /* lame but adequate string increment function for testing */
    VTABLE void increment() {
        Parrot_TestHlld_attributes *attrs = PARROT_TESTHLLD(SELF);
        STRING            *str   = Parrot_unCOW_string(interp, attrs->str_val);
        char              *start = str->strstart;
        char * end   = start + Parrot_str_byte_length(INTERP, str);

        if (end > start) {
            end[-1]++;
        }
    }

    METHOD return_int_marker() {
        PMC *result = pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp,
            enum_class_Integer));
        UINTVAL i = 42;
        VTABLE_set_integer_native(INTERP, result, (INTVAL)i);
        RETURN(PMC *result);
    }

}


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