From 7710a02918c2c943f3a7796d912208f0b4b34dfd Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sun, 8 Mar 2026 15:55:13 +0100 Subject: [PATCH] script: Added stub for reference counting --- src/l_lsl.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/l_lsl.h b/src/l_lsl.h index 34d4f42..515d7fd 100644 --- a/src/l_lsl.h +++ b/src/l_lsl.h @@ -115,6 +115,17 @@ union l_lsl_tableent_data { struct l_lsl_tableent { /* string table entry */ u32 name; + /* reference count for the + * current entry. + * if rc is 0 this entry should be freed + * rc should increase when: + * - entry is assigned to a table + * - entry is pushed to a function + * rc should decrease when + * - a function returns where the table is assigned + * - a table entry is re-sassigned to a different reference + */ + u32 rc; enum l_lsl_data_type type; union l_lsl_tableent_data data; }; -- 2.30.2