Variant

#include <jnc_Variant.h>

// enums

enum {
    @6::jnc_Variant_DataSize = sizeof(void*)* 6,
};

// structs

struct jnc_Variant;

// global variables

JNC_SELECT_ANY jnc_Variant jnc_g_nullVariant = { 0 };

// global functions

bool_t
jnc_Variant_cast(
    const jnc_Variant* variant,
    jnc_Type* type,
    void* buffer
);

bool_t
jnc_Variant_unaryOperator(
    const jnc_Variant* variant,
    jnc_UnOpKind opKind,
    jnc_Variant* result
);

bool_t
jnc_Variant_binaryOperator(
    const jnc_Variant* variant,
    const jnc_Variant* variant2,
    jnc_BinOpKind opKind,
    jnc_Variant* result
);

bool_t
jnc_Variant_relationalOperator(
    const jnc_Variant* variant,
    const jnc_Variant* variant2,
    jnc_BinOpKind opKind,
    bool_t* result
);

bool_t
jnc_Variant_getMember(
    const jnc_Variant* variant,
    const char* name,
    jnc_Variant* result
);

bool_t
jnc_Variant_setMember(
    jnc_Variant* variant,
    const char* name,
    jnc_Variant value
);

bool_t
jnc_Variant_getElement(
    const jnc_Variant* variant,
    size_t index,
    jnc_Variant* result
);

bool_t
jnc_Variant_setElement(
    jnc_Variant* variant,
    size_t index,
    jnc_Variant value
);

static
bool_t
jnc_Variant_isNull(const jnc_Variant* variant);

static
bool_t
jnc_Variant_isEqual(
    const jnc_Variant* variant,
    const jnc_Variant* variant2
);

size_t
jnc_Variant_hash(const jnc_Variant* variant);

bool_t
jnc_Variant_create(
    jnc_Variant* variant,
    const void* p,
    jnc_Type* type
);

const char*
jnc_Variant_format_v(
    const jnc_Variant* variant,
    const char* fmtSpecifier
);