/*
Copyright (C) 2001-2008, The Perl Foundation.
$Id: /mirror/trunk/src/pmc/pccmethod_test.pmc 33726 2008-12-09T05:16:33.974298Z allison  $

=head1 NAME

src/pmc/pmethod_test.pmc - METHOD_Test PMC

=cut

*/

#include "parrot/parrot.h"

pmclass PCCMETHOD_Test need_ext provides hash {


    METHOD test_method()
    {
        UNUSED(SELF);
        Parrot_io_printf(interp, "test_method\n");
    }

    METHOD test_method0(int a1)
    {
        UNUSED(SELF);
        Parrot_io_printf(interp, "test_method0\n");
        Parrot_io_printf(interp, "%d\n", a1);
    }

    METHOD test_method1(int a1, int a2, int a3, int a4, int a5, int a6)
    {
        UNUSED(SELF);
        Parrot_io_printf(interp, "test_method1\n");
        Parrot_io_printf(interp, "%d,%d,%d,%d,%d,%d\n", a1, a2, a3, a4, a5, a6);
    }

    METHOD test_method2(int a1 :optional, int a1o :opt_flag,
                           PMC *slurpy_pos :slurpy)
    {
        STRING *kevin = CONST_STRING(interp, "KEVIN");
        UNUSED(SELF);
        Parrot_io_printf(interp, "test_method2\n");
        Parrot_io_printf(interp, "%d, %d, %Ss %Ss\n", a1, a1o,
            VTABLE_name(interp, slurpy_pos),
            VTABLE_get_repr(interp, slurpy_pos));

        RETURN(int 1000, STRING *kevin);
    }

    METHOD test_method3(PMC *a1 :named("a1name"), PMC *a2  :named("a2name"))
    {
        UNUSED(SELF);
        Parrot_io_printf(interp, "test_method3\n");
        Parrot_io_printf(interp, "%Ps, %Ps\n", a1, a2);
    }

    METHOD test_method4(int george :optional, int g_f :opt_flag,
            PMC *slurpy_pos :slurpy, PMC *slurpy_named :slurpy :named)
    {
        UNUSED(SELF);
        UNUSED(george);
        UNUSED(g_f);
        UNUSED(slurpy_pos);
        UNUSED(slurpy_named);
        Parrot_io_printf(interp, "test_method4\n");
    }
}

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