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

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


#ifndef PARROT_PMC_COROUTINE_H_GUARD
#define PARROT_PMC_COROUTINE_H_GUARD

PARROT_EXPORT VTABLE* Parrot_Coroutine_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_Coroutine_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_Coroutine_get_vtable(PARROT_INTERP);
PARROT_EXPORT VTABLE* Parrot_Coroutine_ro_get_vtable(PARROT_INTERP);
PARROT_EXPORT PMC*    Parrot_Coroutine_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_EXPORT Hash*   Parrot_Coroutine_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));

/* Coroutine PMC's underlying struct. */
typedef struct Parrot_Coroutine_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;
    INTVAL yield;
    INTVAL autoreset;
    opcode_t          * address;
    PackFile_ByteCode * caller_seg;
} Parrot_Coroutine_attributes;

/* Macro to access underlying structure of a Coroutine PMC. */
#define PARROT_COROUTINE(o) ((Parrot_Coroutine_attributes *) PMC_data(o))


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


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


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


/* Generated macro accessors for 'HLL_id' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_HLL_id(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->HLL_id = (value); \
    } while (0)


/* Generated macro accessors for 'namespace_name' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_namespace_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->namespace_name = (value); \
    } while (0)


/* Generated macro accessors for 'namespace_stash' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_namespace_stash(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->namespace_stash = (value); \
    } while (0)


/* Generated macro accessors for 'name' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->name = (value); \
    } while (0)


/* Generated macro accessors for 'method_name' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_method_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->method_name = (value); \
    } while (0)


/* Generated macro accessors for 'ns_entry_name' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_ns_entry_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->ns_entry_name = (value); \
    } while (0)


/* Generated macro accessors for 'subid' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_subid(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->subid = (value); \
    } while (0)


/* Generated macro accessors for 'vtable_index' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_vtable_index(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->vtable_index = (value); \
    } while (0)


/* Generated macro accessors for 'multi_signature' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_multi_signature(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->multi_signature = (value); \
    } while (0)


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


/* Generated macro accessors for 'lex_info' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_lex_info(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->lex_info = (value); \
    } while (0)


/* Generated macro accessors for 'outer_sub' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_outer_sub(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->outer_sub = (value); \
    } while (0)


/* Generated macro accessors for 'ctx' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_ctx(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_attributes *)PMC_data(pmc))->ctx; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "ctx")); \
        } \
    } while (0)
#define SETATTR_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->ctx = (value); \
    } while (0)


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


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


/* Generated macro accessors for 'outer_ctx' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_outer_ctx(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_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_Coroutine_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_Coroutine_attributes *)PMC_data(pmc))->outer_ctx = (value); \
    } while (0)


/* Generated macro accessors for 'yield' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_yield(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_attributes *)PMC_data(pmc))->yield; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "yield")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)
#define SETATTR_Coroutine_yield(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, "yield"), attr_value); \
        } \
        else \
            ((Parrot_Coroutine_attributes *)PMC_data(pmc))->yield = (value); \
    } while (0)


/* Generated macro accessors for 'autoreset' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_autoreset(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_attributes *)PMC_data(pmc))->autoreset; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "autoreset")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)
#define SETATTR_Coroutine_autoreset(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, "autoreset"), attr_value); \
        } \
        else \
            ((Parrot_Coroutine_attributes *)PMC_data(pmc))->autoreset = (value); \
    } while (0)


/* Generated macro accessors for 'address' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_address(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_attributes *)PMC_data(pmc))->address; \
        } \
        else { \
            Parrot_ex_throw_from_c_noargs(interp, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'opcode_t          *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)
#define SETATTR_Coroutine_address(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_noargs(interp, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'opcode_t          *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_Coroutine_attributes *)PMC_data(pmc))->address = (value); \
    } while (0)


/* Generated macro accessors for 'caller_seg' attribute of Coroutine PMC. */
#define GETATTR_Coroutine_caller_seg(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Coroutine_attributes *)PMC_data(pmc))->caller_seg; \
        } \
        else { \
            Parrot_ex_throw_from_c_noargs(interp, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'PackFile_ByteCode *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)
#define SETATTR_Coroutine_caller_seg(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_noargs(interp, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'PackFile_ByteCode *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_Coroutine_attributes *)PMC_data(pmc))->caller_seg = (value); \
    } while (0)


#endif /* PARROT_PMC_COROUTINE_H_GUARD */

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

