1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-17 00:37:39 +00:00

Add support for weak references in arrays.

Also change weak table syntax to not require keyword arguments.
This commit is contained in:
Calvin Rose
2023-09-30 10:56:43 -05:00
parent 6efb965dab
commit 84ad161f1e
7 changed files with 95 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
(def weak-k (table/new 10 :k))
(def weak-v (table/new 10 :v))
(def weak-kv (table/new 10 :kv))
(def weak-k (table/weak-keys 10))
(def weak-v (table/weak-values 10))
(def weak-kv (table/weak 10))
(put weak-kv (gensym) 10)
(put weak-kv :hello :world)