GWION_IMPORT(array_test) {
GWI_OB(gwi_class_ini(gwi, "ArrayTest", NULL))
GWI_BB(gwi_item_ini(gwi, "int[]", "int_array"))
- GWI_BB(gwi_item_end(gwi, 0, NULL)) // import array var
+ GWI_BB(gwi_item_end(gwi, 0, obj, NULL)) // import array var
GWI_BB(gwi_func_ini(gwi, "float[][]", "f"))
GWI_BB(gwi_func_end(gwi, test_mfun, ae_flag_none))
GWI_BB(gwi_func_ini(gwi, "float[][]", "g"))
GWI_OB(gwi_class_ini(gwi, ":[A,B]ClassTemplate", NULL))
gwi_class_xtor(gwi, class_template_ctor, NULL);
GWI_BB(gwi_item_ini(gwi, "A[]", "key"))
- GWI_BB((o_map_key = gwi_item_end(gwi, ae_flag_none, NULL)))
+ GWI_BB((o_map_key = gwi_item_end(gwi, ae_flag_none, obj, NULL)))
GWI_BB(gwi_item_ini(gwi, "B[]", "value"))
- GWI_BB((o_map_value = gwi_item_end(gwi, ae_flag_none, NULL)))
+ GWI_BB((o_map_value = gwi_item_end(gwi, ae_flag_none, obj, NULL)))
GWI_BB(gwi_func_ini(gwi, "int", ":[C,D]test"))
GWI_BB(gwi_func_end(gwi, (f_xfun)1, ae_flag_none))
GWI_BB(gwi_class_end(gwi))
GWI_BB(gwi_item_ini(gwi, ":[:[int]Ptr,int[]]ClassTemplate", "testObject"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, obj, NULL))
return GW_OK;
}
GWION_IMPORT(class_template) {
GWI_OB(gwi_class_ini(gwi, "ClassTemplate:[A,B]", NULL))
GWI_BB(gwi_item_ini(gwi, "A[]", "key"))
- GWI_BB((o_map_key = gwi_item_end(gwi, ae_flag_none, NULL)))
+ GWI_BB((o_map_key = gwi_item_end(gwi, ae_flag_none, obj, NULL)))
GWI_BB(gwi_item_ini(gwi, "B[]", "value"))
- GWI_BB((o_map_value = gwi_item_end(gwi, ae_flag_none, NULL)))
+ GWI_BB((o_map_value = gwi_item_end(gwi, ae_flag_none, obj, NULL)))
GWI_BB(gwi_func_ini(gwi, "int", "test:[C,D]"))
GWI_BB(gwi_func_end(gwi, (f_xfun)1, ae_flag_none))
GWI_BB(gwi_class_end(gwi))
GWI_BB(gwi_item_ini(gwi, "ClassTemplate:[:[int]Ptr,int[]]", "testObject"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, obj, NULL))
return GW_OK;
}
GWI_BB(gwi_func_ini(gwi, "float", "f"))
GWI_BB(gwi_func_end(gwi, coverage_float, ae_flag_static))
- ALLOC_PTR(gwi->gwion->mp, i, m_uint, 5);
GWI_BB(gwi_item_ini(gwi,"int", "s_i"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static, i))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static, num, 5))
- ALLOC_PTR(gwi->gwion->mp, f, m_float, 2.1);
GWI_BB(gwi_item_ini(gwi,"int", "s_f"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static, (void*)f))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static, fnum, 2.1))
- ALLOC_PTR(gwi->gwion->mp, ci, m_uint, 5);
GWI_BB(gwi_item_ini(gwi,"int", "sc_i"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, ci))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, num, 5))
- ALLOC_PTR(gwi->gwion->mp, cf, m_float, 2.1);
GWI_BB(gwi_item_ini(gwi,"float", "sc_f"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, (void*)cf))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, fnum, 2.1))
GWI_BB(gwi_item_ini(gwi,"int[][]", "test_array"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, obj, NULL))
GWI_BB(gwi_class_end(gwi))
return GW_OK;
GWI_BB(gwi_func_ini(gwi, "void", "test_func"))
GWI_BB(gwi_func_end(gwi, test_func, ae_flag_static))
GWI_BB(gwi_item_ini(gwi, "PtrType", "ptr"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static, obj, NULL))
GWI_BB(gwi_class_end(gwi))
return GW_OK;
}
GWION_IMPORT(too_many_args) {
GWI_BB(gwi_func_ini(gwi, "Ptr:[int]", "test:[A]"))
GWI_BB(gwi_func_arg(gwi, "int", "i[][]"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
return GW_OK;
}
GWION_IMPORT(global_var_test) {
- const M_Object obj = new_object(gwi->gwion->mp, NULL, gwi->gwion->type[et_string]);
- STRING(obj) = s_name(insert_symbol(gwi->gwion->st, "test"));
+ const M_Object o = new_object(gwi->gwion->mp, NULL, gwi->gwion->type[et_string]);
+ STRING(o) = s_name(insert_symbol(gwi->gwion->st, "test"));
GWI_BB(gwi_item_ini(gwi,"string", "i"))
- GWI_BB(gwi_item_end(gwi, 0, obj))
+ GWI_BB(gwi_item_end(gwi, 0, obj, o))
GWI_BB(gwi_item_ini(gwi,"float", "f"))
- GWI_BB(gwi_item_end(gwi, 0, (m_float)2.1))
+ GWI_BB(gwi_item_end(gwi, 0, fnum, 2.1))
return GW_OK;
}
GWION_IMPORT(invalid_type1_test) {
GWI_OB(gwi_class_ini(gwi, "invalid_var_type", NULL))
GWI_BB(gwi_item_ini(gwi,"i|nt", "test"))
- GWI_BB(gwi_item_end(gwi, 0, NULL))
+ GWI_BB(gwi_item_end(gwi, 0, num, 0))
GWI_BB(gwi_class_end(gwi))
return GW_OK;
}
GWION_IMPORT(invalid_type2_test) {
GWI_OB(gwi_class_ini(gwi, "invalid_var_type", NULL))
GWI_BB(gwi_item_ini(gwi,".int", "test"))
- GWI_BB(gwi_item_end(gwi, 0, NULL))
+ GWI_BB(gwi_item_end(gwi, 0, num, 0))
GWI_BB(gwi_class_end(gwi))
return GW_OK;
}
GWION_IMPORT(invalid_type3_test) {
GWI_OB(gwi_class_ini(gwi, "InvalidVarType", NULL))
GWI_BB(gwi_item_ini(gwi,".int", "test"))
- GWI_BB(gwi_item_end(gwi, 0, NULL))
+ GWI_BB(gwi_item_end(gwi, 0, num, 0))
GWI_BB(gwi_class_end(gwi))
return GW_OK;
}
#include "gwi.h"
GWION_IMPORT(static_string_test) {
- const M_Object obj = new_object(gwi->gwion->mp, NULL, gwi->gwion->type[et_string]);
- STRING(obj) = s_name(insert_symbol(gwi->gwion->st, "test static string"));
+ const M_Object o = new_object(gwi->gwion->mp, NULL, gwi->gwion->type[et_string]);
+ STRING(o) = s_name(insert_symbol(gwi->gwion->st, "test static string"));
GWI_BB(gwi_item_ini(gwi, "string", "self"))
- GWI_BB(gwi_item_end(gwi, ae_flag_global, obj))
+ GWI_BB(gwi_item_end(gwi, ae_flag_global, obj, o))
return GW_OK;
}
GWION_IMPORT(global_var_test) {
GWI_BB(gwi_item_ini(gwi,"SoemClass.child", "i"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, num, 0))
return GW_OK;
}
GWI_BB(gwi_func_ini(gwi, "float", "f"))
GWI_BB(gwi_func_end(gwi, coverage_float, ae_flag_static))
- ALLOC_PTR(gwi->gwion->mp, i, m_uint, 5);
- GWI_BB(gwi_item_ini(gwi,"int", "s_i"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static, i))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static, num, 5))
- ALLOC_PTR(gwi->gwion->mp, f, m_float, 2.1);
GWI_BB(gwi_item_ini(gwi,"int", "s_f"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static, (void*)f))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static, fnum, 2.1))
- ALLOC_PTR(gwi->gwion->mp, ci, m_uint, 5);
GWI_BB(gwi_item_ini(gwi,"int", "sc_i"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, ci))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, num, 5))
- ALLOC_PTR(gwi->gwion->mp, cf, m_float, 2.1);
GWI_BB(gwi_item_ini(gwi,"float", "sc_f"))
- GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, (void*)cf))
+ GWI_BB(gwi_item_end(gwi, ae_flag_static | ae_flag_const, fnum, 2.1))
GWI_BB(gwi_item_ini(gwi,"int[][]", "test_array"))
- GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+ GWI_BB(gwi_item_end(gwi, ae_flag_none, obj, NULL))
GWI_BB(gwi_struct_end(gwi))
return GW_OK;