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

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


#ifndef PARROT_PMC_RATIONAL_H_GUARD
#define PARROT_PMC_RATIONAL_H_GUARD

#define PARROT_IN_EXTENSION
PARROT_DYNEXT_EXPORT VTABLE* Parrot_Rational_get_vtable_pointer(PARROT_INTERP);
PARROT_DYNEXT_EXPORT void    Parrot_Rational_class_init(PARROT_INTERP, int, int);
PARROT_DYNEXT_EXPORT VTABLE* Parrot_Rational_update_vtable(ARGMOD(VTABLE*));
PARROT_DYNEXT_EXPORT VTABLE* Parrot_Rational_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_DYNEXT_EXPORT VTABLE* Parrot_Rational_get_vtable(PARROT_INTERP);
PARROT_DYNEXT_EXPORT VTABLE* Parrot_Rational_ro_get_vtable(PARROT_INTERP);
PARROT_DYNEXT_EXPORT PMC*    Parrot_Rational_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_DYNEXT_EXPORT Hash*   Parrot_Rational_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));

/* Rational PMC's underlying struct. */
typedef struct Parrot_Rational_attributes {
    struct RATIONAL * rational;
} Parrot_Rational_attributes;

/* Macro to access underlying structure of a Rational PMC. */
#define PARROT_RATIONAL(o) ((Parrot_Rational_attributes *) PMC_data(o))


/* Generated macro accessors for 'rational' attribute of Rational PMC. */
#define GETATTR_Rational_rational(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_Rational_attributes *)PMC_data(pmc))->rational; \
        } \
        else { \
            Parrot_ex_throw_from_c_noargs(interp, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'struct RATIONAL *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
    } while (0)
#define SETATTR_Rational_rational(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            Parrot_ex_throw_from_c_noargs(interp, EXCEPTION_INVALID_OPERATION, \
                "Attributes of type 'struct RATIONAL *' cannot be " \
                "subclassed from a high-level PMC."); \
        } \
        else \
            ((Parrot_Rational_attributes *)PMC_data(pmc))->rational = (value); \
    } while (0)


PARROT_DYNEXT_EXPORT Parrot_PMC Parrot_lib_rational_load(PARROT_INTERP);

#ifndef PARROT_DYNPMC_CLASS_LOAD
PARROT_DATA INTVAL dynpmc_class_Rational;
#endif

#endif /* PARROT_PMC_RATIONAL_H_GUARD */

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

