From 114c4fc47e2a0cb3f4de122507583c7756f34821 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Sat, 19 Oct 2024 16:55:17 +0200 Subject: [PATCH] Create even less code for arrays --- Sources/integrations/kope.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/integrations/kope.c b/Sources/integrations/kope.c index 5f06c96..500fc0e 100644 --- a/Sources/integrations/kope.c +++ b/Sources/integrations/kope.c @@ -889,7 +889,10 @@ void kope_export(char *directory, api_kind api) { for (global_id i = 0; get_global(i) != NULL && get_global(i)->type != NO_TYPE; ++i) { global *g = get_global(i); - if (!get_type(g->type)->built_in) { + + type_id base_type = get_type(g->type)->kind == TYPE_ARRAY ? get_type(g->type)->array.base : g->type; + + if (!get_type(base_type)->built_in) { type *t = get_type(g->type); char type_name[256];