/* ex: set ro ft=c:
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 *
 * This file is generated automatically from './src/pmc/eventhandler.pmc'
 * by tools/build/pmc2c.pl.
 *
 * Any changes made here will be lost!
 *
 */

/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */


#ifndef PARROT_PMC_EVENTHANDLER_H_GUARD
#define PARROT_PMC_EVENTHANDLER_H_GUARD

PARROT_EXPORT VTABLE* Parrot_EventHandler_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_EventHandler_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_EventHandler_get_vtable(PARROT_INTERP);
PARROT_EXPORT VTABLE* Parrot_EventHandler_ro_get_vtable(PARROT_INTERP);
PARROT_EXPORT PMC*    Parrot_EventHandler_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_EXPORT Hash*   Parrot_EventHandler_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));

/* EventHandler PMC's underlying struct. */
typedef struct Parrot_EventHandler_attributes {
    PackFile_ByteCode * seg;
    size_t start_offs;
    size_t end_offs;
    INTVAL HLL_id;
    PMC               * namespace_name;
    PMC               * namespace_stash;
    STRING            * name;
    STRING            * method_name;
    STRING            * ns_entry_name;
    STRING            * subid;
    INTVAL vtable_index;
    PMC               * multi_signature;
    UINTVAL n_regs_used[4];
    PMC               * lex_info;
    PMC               * outer_sub;
    PMC               * ctx;
    UINTVAL comp_flags;
    Parrot_sub_arginfo * arg_info;
    PMC               * outer_ctx;
    STRING * type;
    PMC    * code;
    PMC    * interp;
    INTVAL priority;
} Parrot_EventHandler_attributes;

/* Macro to access underlying structure of a EventHandler PMC. */
#define PARROT_EVENTHANDLER(o) ((Parrot_EventHandler_attributes *) PMC_data(o))


/* Generated macro accessors for 'seg' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_seg(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->seg; \
        } \
        else { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'PackFile_ByteCode *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)

#define SETATTR_EventHandler_seg(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'PackFile_ByteCode *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->seg = (value); \
    } while (0)


/* Generated macro accessors for 'start_offs' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_start_offs(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->start_offs; \
        } \
        else { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'size_t' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)

#define SETATTR_EventHandler_start_offs(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'size_t' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->start_offs = (value); \
    } while (0)


/* Generated macro accessors for 'end_offs' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_end_offs(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->end_offs; \
        } \
        else { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'size_t' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)

#define SETATTR_EventHandler_end_offs(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'size_t' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->end_offs = (value); \
    } while (0)


/* Generated macro accessors for 'HLL_id' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_HLL_id(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->HLL_id; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "HLL_id")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_HLL_id(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "HLL_id"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->HLL_id = (value); \
    } while (0)


/* Generated macro accessors for 'namespace_name' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_namespace_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->namespace_name; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "namespace_name")); \
        } \
    } while (0)

#define SETATTR_EventHandler_namespace_name(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "namespace_name"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->namespace_name = (value); \
    } while (0)


/* Generated macro accessors for 'namespace_stash' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_namespace_stash(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->namespace_stash; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "namespace_stash")); \
        } \
    } while (0)

#define SETATTR_EventHandler_namespace_stash(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "namespace_stash"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->namespace_stash = (value); \
    } while (0)


/* Generated macro accessors for 'name' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->name; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "name")); \
            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_name(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
            VTABLE_set_string_native(interp, attr_value, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "name"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->name = (value); \
    } while (0)


/* Generated macro accessors for 'method_name' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_method_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->method_name; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "method_name")); \
            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_method_name(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
            VTABLE_set_string_native(interp, attr_value, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "method_name"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->method_name = (value); \
    } while (0)


/* Generated macro accessors for 'ns_entry_name' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_ns_entry_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->ns_entry_name; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "ns_entry_name")); \
            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_ns_entry_name(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
            VTABLE_set_string_native(interp, attr_value, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "ns_entry_name"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->ns_entry_name = (value); \
    } while (0)


/* Generated macro accessors for 'subid' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_subid(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->subid; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "subid")); \
            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_subid(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
            VTABLE_set_string_native(interp, attr_value, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "subid"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->subid = (value); \
    } while (0)


/* Generated macro accessors for 'vtable_index' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_vtable_index(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->vtable_index; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "vtable_index")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_vtable_index(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "vtable_index"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->vtable_index = (value); \
    } while (0)


/* Generated macro accessors for 'multi_signature' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_multi_signature(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->multi_signature; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "multi_signature")); \
        } \
    } while (0)

#define SETATTR_EventHandler_multi_signature(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "multi_signature"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->multi_signature = (value); \
    } while (0)


/* Generated macro accessors for 'n_regs_used' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_n_regs_used(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->n_regs_used; \
        } \
        else { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'UINTVAL' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)

#define SETATTR_EventHandler_n_regs_used(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'UINTVAL' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->n_regs_used = (value); \
    } while (0)


/* Generated macro accessors for 'lex_info' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_lex_info(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->lex_info; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "lex_info")); \
        } \
    } while (0)

#define SETATTR_EventHandler_lex_info(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "lex_info"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->lex_info = (value); \
    } while (0)


/* Generated macro accessors for 'outer_sub' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_outer_sub(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->outer_sub; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "outer_sub")); \
        } \
    } while (0)

#define SETATTR_EventHandler_outer_sub(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "outer_sub"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->outer_sub = (value); \
    } while (0)


/* Generated macro accessors for 'ctx' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_ctx(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->ctx; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "ctx")); \
        } \
    } while (0)

#define SETATTR_EventHandler_ctx(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "ctx"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->ctx = (value); \
    } while (0)


/* Generated macro accessors for 'comp_flags' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_comp_flags(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->comp_flags; \
        } \
        else { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'UINTVAL' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)

#define SETATTR_EventHandler_comp_flags(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'UINTVAL' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->comp_flags = (value); \
    } while (0)


/* Generated macro accessors for 'arg_info' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_arg_info(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->arg_info; \
        } \
        else { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'Parrot_sub_arginfo *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)

#define SETATTR_EventHandler_arg_info(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'Parrot_sub_arginfo *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->arg_info = (value); \
    } while (0)


/* Generated macro accessors for 'outer_ctx' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_outer_ctx(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->outer_ctx; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "outer_ctx")); \
        } \
    } while (0)

#define SETATTR_EventHandler_outer_ctx(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "outer_ctx"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->outer_ctx = (value); \
    } while (0)


/* Generated macro accessors for 'type' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_type(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->type; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "type")); \
            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_type(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
            VTABLE_set_string_native(interp, attr_value, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "type"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->type = (value); \
    } while (0)


/* Generated macro accessors for 'code' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_code(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->code; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "code")); \
        } \
    } while (0)

#define SETATTR_EventHandler_code(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "code"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->code = (value); \
    } while (0)


/* Generated macro accessors for 'interp' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_interp(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->interp; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "interp")); \
        } \
    } while (0)

#define SETATTR_EventHandler_interp(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "interp"), value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->interp = (value); \
    } while (0)


/* Generated macro accessors for 'priority' attribute of EventHandler PMC. */
#define GETATTR_EventHandler_priority(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_EventHandler_attributes *)PMC_data(pmc))->priority; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "priority")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_EventHandler_priority(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "priority"), attr_value); \
        } \
        else \
            ((Parrot_EventHandler_attributes *)PMC_data(pmc))->priority = (value); \
    } while (0)


#endif /* PARROT_PMC_EVENTHANDLER_H_GUARD */

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

