]> Nishi Git Mirror - gwion.git/commitdiff
:art: Remove add_type_decl_array
authorfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 13 Oct 2019 12:49:56 +0000 (14:49 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Sun, 13 Oct 2019 12:49:56 +0000 (14:49 +0200)
ast
src/lib/import.c
tests/import/extend_array.c

diff --git a/ast b/ast
index 3b10e725ee684180ba46f8b7166fc07ce8cacb9a..22881b6f0a64d5c80d4142bd92dc67e9152961fa 160000 (submodule)
--- a/ast
+++ b/ast
@@ -1 +1 @@
-Subproject commit 3b10e725ee684180ba46f8b7166fc07ce8cacb9a
+Subproject commit 22881b6f0a64d5c80d4142bd92dc67e9152961fa
index 2eda223f0c35785f3f3c11fa4324feb5a9bafbc2..ee621c4047100c03deb8172e645086780649fc0a 100644 (file)
@@ -450,10 +450,10 @@ ANN Type_Decl* import_td(const Gwi gwi, const m_str name) {
   DECL_OO(const ID_List, type_path, = str2list(env, name, &array_depth, gwi->loc))
   Type_Decl* type_decl = new_type_decl(env->gwion->mp, type_path);
   if(array_depth) {
-    Array_Sub array_sub = new_array_sub(env->gwion->mp, NULL);
+    Array_Sub array = new_array_sub(env->gwion->mp, NULL);
     for(m_uint i = 1; i < array_depth; i++)
-      array_sub = prepend_array_sub(array_sub, NULL);
-    type_decl = add_type_decl_array(type_decl, array_sub);
+      array = prepend_array_sub(array, NULL);
+    type_decl->array = array;
   }
   return type_decl;
 }
index 9c4bc4a4cfdf876b5be05042ede31436fc3c9188..55bac891fddeedbbc712164a2d326433cc6582f9 100644 (file)
@@ -21,7 +21,7 @@ GWION_IMPORT(extend_array_test) {
   Type_Decl* td = new_type_decl(gwi->gwion->st->p, new_id_list(gwi->gwion->st->p, insert_symbol(gwi->gwion->st, "float"), GWI_LOC));
   Exp e = new_exp_prim_int(gwi->gwion->st->p, 1, GWI_LOC);
   Array_Sub array = new_array_sub(gwi->gwion->st->p, e);
-  add_type_decl_array(td, array);
+  td->array = array;
   GWI_BB(gwi_class_ext(gwi, td))
   GWI_BB(gwi_class_end(gwi))
   return GW_OK;