script: Added stub for reference counting
authorLukas Krickl <lukas@krickl.dev>
Sun, 8 Mar 2026 14:55:13 +0000 (15:55 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 8 Mar 2026 14:55:13 +0000 (15:55 +0100)
src/l_lsl.h

index 34d4f424f388488dbb9c938d97c71535a55b729c..515d7fd330fa7b8bff677684998e7676c9ef5e6f 100644 (file)
@@ -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;
 };