summaryrefslogtreecommitdiffhomepage
path: root/types.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-07-20 14:49:18 +0200
committerJo-Philipp Wich <jo@mein.io>2022-07-30 00:41:56 +0200
commit41114a02a38a65956010bab95c4bff19af7ac1ed (patch)
treed993746857c6a57ff61dfefc315537825c1ee63f /types.c
parent70ae3040fb384e7a77ef43ca6b426269f9acdcab (diff)
source: add tracking of exported symbols
Extend abstract source objects to maintain a list of exported symbols and add functions to append and lookup exported names. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/types.c b/types.c
index e7c9afa..2fba207 100644
--- a/types.c
+++ b/types.c
@@ -292,7 +292,11 @@ ucv_free(uc_value_t *uv, bool retain)
if (source->runpath != source->filename)
free(source->runpath);
+ for (i = 0; i < source->exports.count; i++)
+ ucv_put(source->exports.entries[i]);
+
uc_vector_clear(&source->lineinfo);
+ uc_vector_clear(&source->exports);
fclose(source->fp);
free(source->buffer);
break;