From 18915488280ee7d2526b3fbbc59bf2beb35d023f Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Fri, 13 Sep 2024 17:32:57 +0200 Subject: [PATCH] Do not export built-in types --- Sources/integrations/kope.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Sources/integrations/kope.c b/Sources/integrations/kope.c index f1cece9..876fe0d 100644 --- a/Sources/integrations/kope.c +++ b/Sources/integrations/kope.c @@ -297,12 +297,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 (g->type == float_id) { - } - else if (g->type == tex2d_type_id || g->type == texcube_type_id || g->type == sampler_type_id) { + if (g->type == tex2d_type_id || g->type == texcube_type_id || g->type == sampler_type_id) { fprintf(output, "extern int %s;\n", get_name(g->name)); } - else { + else if (!get_type(g->type)->built_in) { type *t = get_type(g->type); char name[256]; @@ -542,7 +540,7 @@ 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 (g->type != tex2d_type_id && g->type != texcube_type_id && g->type != sampler_type_id && g->type != float_id) { + if (g->type != tex2d_type_id && g->type != texcube_type_id && g->type != sampler_type_id && !get_type(g->type)->built_in) { type *t = get_type(g->type); char type_name[256];