ANN m_int gwi_item_ini(const Gwi gwi, const m_str type, const m_str name);
ANN2(1) m_int gwi_item_end(const Gwi gwi, const ae_flag flag, union value_data);
-//#define gwi_item_end(a, b, c) gwi_item_end(a, (const ae_flag)(b), c)
+#define gwi_item_end(a, b, member, c) gwi_item_end(a, (ae_flag)(b), (union value_data){.member=c})
ANN void ck_clean_item(MemPool, ImportCK*);
#endif
-Subproject commit 70680a9f3ca9abb4b9003c9f69b1b9f33b81557e
+Subproject commit 9b46c464a70f7f11d87796d97ad9fe57edcd5893
gwi->gwion->type[et_array] = t_array;
gwi_class_xtor(gwi, NULL, array_dtor);
GWI_BB(gwi_item_ini(gwi, "@internal", "@array"))
- GWI_BB(gwi_item_end(gwi, 0, NULL))
+ GWI_BB(gwi_item_end(gwi, 0, num, 0))
GWI_BB(gwi_item_ini(gwi, "@internal", "@ctor_data"))
- GWI_BB(gwi_item_end(gwi, 0, NULL))
+ GWI_BB(gwi_item_end(gwi, 0, num, 0))
GWI_BB(gwi_func_ini(gwi, "int", "size"))
GWI_BB(gwi_func_end(gwi, vm_vector_size, ae_flag_none))
gwi->gwion->type[et_event] = t_event; // use func
GWI_BB(gwi_item_ini(gwi, "@internal", "@shreds"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_func_ini(gwi, "void", "signal"))
GWI_BB(gwi_func_end(gwi, event_signal, ae_flag_none))
GWI_BB(gwi_func_ini(gwi, "void", "broadcast"))
const Type t_foreach = gwi_struct_ini(gwi, "@Foreach:[A]");
set_tflag(t_foreach, tflag_ntmpl | tflag_infer);
GWI_BB(gwi_item_ini(gwi, "@internal", "val"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_struct_end(gwi))
GWI_BB(gwi_oper_ini(gwi, "@Foreach", NULL, NULL))
GWI_BB(gwi_oper_add(gwi, opck_foreach_scan))
VM* vm = gwi_vm(gwi);
const m_float sr = vm->bbq->si->sr;
gwi_item_ini(gwi, "float", "samplerate");
- gwi_item_end(gwi, ae_flag_const, sr);
+ gwi_item_end(gwi, ae_flag_const, fnum, sr);
gwi_item_ini(gwi, "float", "pi");
- gwi_item_end(gwi, ae_flag_const, (m_float)M_PI);
+ gwi_item_end(gwi, ae_flag_const, fnum, M_PI);
gwi_item_ini(gwi, "dur", "d_zero");
- gwi_item_end(gwi, ae_flag_const, (m_float)0.0);
+ gwi_item_end(gwi, ae_flag_const, fnum, 0.0);
gwi_item_ini(gwi, "dur", "samp");
- gwi_item_end(gwi, ae_flag_const, (m_float)1.0);
+ gwi_item_end(gwi, ae_flag_const, fnum, 1.0);
gwi_item_ini(gwi, "dur", "ms");
- gwi_item_end(gwi, ae_flag_const, (m_float)(sr/1000.0));
+ gwi_item_end(gwi, ae_flag_const, fnum, sr/1000.0);
gwi_item_ini(gwi, "dur", "second");
- gwi_item_end(gwi, ae_flag_const, sr);
+ gwi_item_end(gwi, ae_flag_const, fnum, sr);
gwi_item_ini(gwi, "dur", "minute");
- gwi_item_end(gwi, ae_flag_const, (m_float)(sr*60.0));
+ gwi_item_end(gwi, ae_flag_const, fnum, sr*60.0);
gwi_item_ini(gwi, "dur", "hour");
- gwi_item_end(gwi, ae_flag_const, (m_float)(sr*60*60));
+ gwi_item_end(gwi, ae_flag_const, fnum, sr*60*60);
gwi_item_ini(gwi, "time", "t_zero");
- gwi_item_end(gwi, ae_flag_const, (m_float)0.0);
+ gwi_item_end(gwi, ae_flag_const, fnum, 0.0);
return GW_OK;
}
gwi->gwion->type[et_ptr] = t_ptr;
GWI_BB(gwi_gack(gwi, t_ptr, gack_ptr))
GWI_BB(gwi_item_ini(gwi, "@internal", "@val"))
- GWI_BB(gwi_item_end(gwi, 0, NULL))
+ GWI_BB(gwi_item_end(gwi, 0, num, 0))
GWI_BB(gwi_class_end(gwi))
set_tflag(t_ptr, tflag_ntmpl);
GWI_BB(gwi_oper_ini(gwi, "Ptr", NULL, NULL))
gwi_class_xtor(gwi, NULL, shred_dtor);
gwi_item_ini(gwi, "@internal", "@me");
- GWI_BB(gwi_item_end(gwi, ae_flag_const, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_const, num, 0))
gwi_item_ini(gwi, "int", "cancel");
- GWI_BB((o_shred_cancel = gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((o_shred_cancel = gwi_item_end(gwi, ae_flag_const, num, 0)))
gwi_func_ini(gwi, "void", "exit");
GWI_BB(gwi_func_end(gwi, gw_shred_exit, ae_flag_none))
gwi->gwion->type[et_fork] = t_fork;
gwi_item_ini(gwi, "@internal", "@thread");
- GWI_BB((o_fork_thread = gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((o_fork_thread = gwi_item_end(gwi, ae_flag_const, num, 0)))
gwi_item_ini(gwi, "@internal", "@cond");
- GWI_BB((o_fork_cond = gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((o_fork_cond = gwi_item_end(gwi, ae_flag_const, num, 0)))
gwi_item_ini(gwi, "@internal", "@mutex");
- GWI_BB((o_fork_mutex = gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((o_fork_mutex = gwi_item_end(gwi, ae_flag_const, num, 0)))
gwi_item_ini(gwi, "int", "is_done");
- GWI_BB((o_fork_done = gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((o_fork_done = gwi_item_end(gwi, ae_flag_const, num, 0)))
gwi_item_ini(gwi, "Event", "ev");
- GWI_BB((o_fork_ev = gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((o_fork_ev = gwi_item_end(gwi, ae_flag_const, num, 0)))
gwi_item_ini(gwi, "int", "retsize");
- GWI_BB((o_fork_retsize = gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((o_fork_retsize = gwi_item_end(gwi, ae_flag_const, num, 0)))
gwi_func_ini(gwi, "void", "join");
GWI_BB(gwi_func_end(gwi, fork_join, ae_flag_none))
gwi_func_ini(gwi, "void", "test_cancel");
const Type t_typed = gwi_class_ini(gwi, "TypedFork:[A]", "Fork");
gwi_item_ini(gwi, "A", "retval");
- GWI_BB((gwi_item_end(gwi, ae_flag_const, NULL)))
+ GWI_BB((gwi_item_end(gwi, ae_flag_const, num, 0)))
GWI_BB(gwi_class_end(gwi))
SET_FLAG(t_typed, abstract | ae_flag_final);
set_tflag(t_typed, tflag_ntmpl);
GWI_BB(gwi_gack(gwi, t_string, gack_string))
gwi_item_ini(gwi, "@internal", "@data");
- GWI_BB(gwi_item_end(gwi, ae_flag_const, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_const, num, 0))
gwi_func_ini(gwi, "int", "size");
GWI_BB(gwi_func_end(gwi, string_len, ae_flag_none))
ugen_gen(vm->gwion, u, imp->tick, (void*)imp->vm, 0);
vector_add(&vm->ugen, (vtype)u);
gwi_item_ini(gwi, "UGen", imp->name);
- gwi_item_end(gwi, ae_flag_const, o);
+ gwi_item_end(gwi, ae_flag_const, obj, o);
return u;
}
gwi->gwion->type[et_ugen] = t_ugen; // use func
GWI_BB(gwi_item_ini(gwi, "@internal", "@ugen"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_func_ini(gwi, "UGen", "chan"))
GWI_BB(gwi_func_arg(gwi, "int", "arg0"))
const Type t_union = gwi_class_ini(gwi, "@Union", "Object");
gwi_class_xtor(gwi, NULL, UnionDtor);
GWI_BB(gwi_item_ini(gwi, "int", "@index"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_func_ini(gwi, "bool", "is"))
GWI_BB(gwi_func_arg(gwi, "int", "member"))
GWI_BB(gwi_func_end(gwi, union_is, ae_flag_none))
gwi_class_xtor(gwi, NULL, vararg_dtor);
gwi_gack(gwi, t_vararg, gack_vararg);
GWI_BB(gwi_item_ini(gwi, "@internal", "@data"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_item_ini(gwi, "int", "@inLoop"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_item_ini(gwi, "int", "@len"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_item_ini(gwi, "int", "@o"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_item_ini(gwi, "int", "@i"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_item_ini(gwi, "int", "@s"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
GWI_BB(gwi_func_ini(gwi, "Vararg", "cpy"))
GWI_BB(gwi_func_end(gwi, mfun_vararg_cpy, ae_flag_none))
GWI_BB(gwi_class_end(gwi))