#ifndef __IMPORT_ENUM
#define __IMPORT_ENUM
-ANN2(1) m_int gwi_enum_ini(const Gwi gwi, const m_str type);
+__attribute__ ((visibility ("default")))
+ANN m_int gwi_enum_ini(const Gwi gwi, const m_str type);
ANN m_int gwi_enum_add(const Gwi gwi, const m_str name, const m_uint value);
ANN Type gwi_enum_end(const Gwi gwi);
ANN void ck_clean_edef(MemPool, ImportCK *);
: GW_OK;
}
-ANN static m_bool emit_enum_def(const Emitter emit, const Enum_Def edef) {
+ANN static m_bool emit_enum_def(const Emitter emit NUSED, const Enum_Def edef) {
LOOP_OPTIM
for (m_uint i = 0; i < vector_size(&edef->values); ++i) {
const Value v = (Value)vector_at(&edef->values, i);
//! \arg the importer
//! \arg string defining a primitive type
//! why is return type m_int ?
-ANN2(1) m_int gwi_enum_ini(const Gwi gwi, const m_str type) {
+
+__attribute__ ((visibility ("default")))
+ANN m_int gwi_enum_ini(const Gwi gwi, const m_str type) {
CHECK_BB(ck_ini(gwi, ck_edef));
- if (type) CHECK_OB((gwi->ck->xid = gwi_str2sym(gwi, type)));
+ CHECK_OB((gwi->ck->xid = gwi_str2sym(gwi, type)));
vector_init(&gwi->ck->v);
return GW_OK;
}
GWI_BB(gwi_oper_add(gwi, opck_class_call))
GWI_BB(gwi_oper_end(gwi, "=>", NULL))
+gwi_enum_ini(gwi, "@hidden_enum");
+gwi_enum_add(gwi, "@hidden_enum", 0);
+gwi_enum_end(gwi);
return GW_OK;
}
GWI_BB(gwi_set_global_type(gwi, t_bool, et_bool))
GWI_BB(gwi_gack(gwi, t_bool, gack_bool))
gwi_item_ini(gwi, "bool", "true");
- gwi_item_end(gwi, ae_flag_const, num, 0);
- gwi_item_ini(gwi, "bool", "false");
gwi_item_end(gwi, ae_flag_const, num, 1);
+ gwi_item_ini(gwi, "bool", "false");
+ gwi_item_end(gwi, ae_flag_const, num, 0);
GWI_BB(gwi_oper_ini(gwi, NULL, "int", "bool"))
GWI_BB(gwi_oper_add(gwi, opck_unary_meta))
GWI_BB(gwi_oper_add(gwi, opck_int_not))