]> Nishi Git Mirror - gwion.git/commitdiff
:art: Improve vararg import
authorfennecdjay <fennecdjay@gwion.tk>
Thu, 5 Nov 2020 15:01:56 +0000 (16:01 +0100)
committerfennecdjay <fennecdjay@gwion.tk>
Thu, 5 Nov 2020 15:01:56 +0000 (16:01 +0100)
src/lib/vararg.c

index 2a3b13b968806573978a538dd243fc7b4da4e19c..c5a4789867f0e719c55d363bc4d7730c41b9b30a 100644 (file)
@@ -163,17 +163,17 @@ GWION_IMPORT(vararg) {
   const Type t_vararg  = gwi_class_ini(gwi, "Vararg", "Object");
   gwi_class_xtor(gwi, NULL, vararg_dtor);
   gwi_gack(gwi, t_vararg, gack_vararg);
-  CHECK_BB(gwi_item_ini(gwi, "@internal", "@data"))
-  CHECK_BB(gwi_item_end(gwi, ae_flag_none, NULL))
-  CHECK_BB(gwi_item_ini(gwi, "int", "@inLoop"))
-  CHECK_BB(gwi_item_end(gwi, ae_flag_none, NULL))
-  CHECK_BB(gwi_item_ini(gwi, "int", "@len"))
-  CHECK_BB(gwi_item_end(gwi, ae_flag_none, NULL))
-  CHECK_BB(gwi_func_ini(gwi, "Vararg", "cpy"))
-  CHECK_BB(gwi_func_end(gwi, mfun_vararg_cpy, ae_flag_none))
+  GWI_BB(gwi_item_ini(gwi, "@internal", "@data"))
+  GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+  GWI_BB(gwi_item_ini(gwi, "int", "@inLoop"))
+  GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+  GWI_BB(gwi_item_ini(gwi, "int", "@len"))
+  GWI_BB(gwi_item_end(gwi, ae_flag_none, NULL))
+  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))
-  SET_FLAG(t_vararg, abstract);
-  CHECK_BB(gwi_set_global_type(gwi, t_vararg, et_vararg))
+  SET_FLAG(t_vararg, abstract | ae_flag_final);
+  GWI_BB(gwi_set_global_type(gwi, t_vararg, et_vararg))
   GWI_BB(gwi_oper_ini(gwi, "nonnull Vararg", (m_str)OP_ANY_TYPE, NULL))
   GWI_BB(gwi_oper_add(gwi, opck_vararg_cast))
   GWI_BB(gwi_oper_emi(gwi, opem_vararg_cast))