changeset 730:8f1583faf9ea

farray.sh: Rename farray_destroy() to farray_release() and falist_destroy() to falist_release()
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 07 Oct 2024 12:57:29 +0200
parents 05a325c7d5c5
children cf0f18d3d41b
files sbin/ftjail sbin/fzfs share/local-bsdtools/farray.sh tests/farray-alist.t tests/farray-array.t tests/farray-object.t
diffstat 6 files changed, 134 insertions(+), 128 deletions(-) [+]
line wrap: on
line diff
--- a/sbin/ftjail	Mon Oct 07 12:44:00 2024 +0200
+++ b/sbin/ftjail	Mon Oct 07 12:57:29 2024 +0200
@@ -1124,9 +1124,9 @@
     # Warnings do not influence the return code
     _print_check_warnings _warnings
 
-    farray_destroy _errors
-    farray_destroy _warnings
-    falist_destroy _opt_snapshots
+    farray_release _errors
+    farray_release _warnings
+    falist_release _opt_snapshots
     return ${_rc}
 }
 
@@ -1428,7 +1428,7 @@
     fi
     echo "Done."
 
-    falist_destroy _opt_snapshots
+    falist_release _opt_snapshots
 }
 
 
--- a/sbin/fzfs	Mon Oct 07 12:44:00 2024 +0200
+++ b/sbin/fzfs	Mon Oct 07 12:57:29 2024 +0200
@@ -243,7 +243,7 @@
                     ;;
             esac
         done
-        farray_destroy _mounted_datasets
+        farray_release _mounted_datasets
         return 0
     }
 }
@@ -663,8 +663,8 @@
         fi
         _idx=$((${_idx} + 1))
     done
-    farray_destroy _cloned_datasets
-    farray_destroy _args_other_clone_props
+    farray_release _cloned_datasets
+    farray_release _args_other_clone_props
     return 0
 }
 
--- a/share/local-bsdtools/farray.sh	Mon Oct 07 12:44:00 2024 +0200
+++ b/share/local-bsdtools/farray.sh	Mon Oct 07 12:57:29 2024 +0200
@@ -1158,7 +1158,10 @@
 
 
 #:
-#: Destroy and unset an array and all its elements.
+#: Release an array.
+#:
+#: Decrement its reference count. If it reaches zero then destroy and
+#: unset an array and all its elements.
 #:
 #: Args:
 #:   $1 (str): The name of an array. The array may exist or not.
@@ -1167,7 +1170,7 @@
 #:   - A truthy value if the array existed and has been deleted.
 #:   - A falsy value if the array does not exist.
 #:
-farray_destroy() {
+farray_release() {
     local __farr_name
 
     local __farr_token __farr_gvrname __farr_len
@@ -1936,7 +1939,10 @@
 
 
 #:
-#: Destroy and unset an alist
+#: Release an alist.
+#:
+#: Decrement its reference count. If it reaches zero then destroy and
+#: unset an alist and all its items.
 #:
 #: Args:
 #:   $1 (str): The name of an alist. The alist may exist or not.
@@ -1945,7 +1951,7 @@
 #:   - A truthy value if the alist existed and has been deleted.
 #:   - A falsy value if the alist does not exist.
 #:
-falist_destroy() {
+falist_release() {
     local __farr_name
 
     local __farr_token __farr_objname __farr_keyname __farr_valname __farr_len
@@ -3071,11 +3077,11 @@
             return 0
             ;;
         "${_farr_array_token_prefix}"*)
-            farray_destroy "$1"
+            farray_release "$1"
             # let the return value pass through
             ;;
         "${_farr_alist_token_prefix}"*)
-            falist_destroy "$1"
+            falist_release "$1"
             # let the return value pass through
             ;;
         *)
--- a/tests/farray-alist.t	Mon Oct 07 12:44:00 2024 +0200
+++ b/tests/farray-alist.t	Mon Oct 07 12:57:29 2024 +0200
@@ -30,8 +30,8 @@
   $ falist_debug LIST
   DEBUG: alist `LIST' has length 0
 
-  $ falist_destroy LIST
-  $ ( falist_destroy LIST )
+  $ falist_release LIST
+  $ ( falist_release LIST )
   ERROR: object `LIST' not created properly: token empty
   [1]
 
@@ -66,7 +66,7 @@
   $ falist_print_length LIST
   0 (no-eol)
 
-  $ falist_destroy LIST
+  $ falist_release LIST
   $ falist_istrue LIST
   ERROR: object `LIST' not created properly: token empty
   [1]
@@ -126,7 +126,7 @@
   DEBUG:     `K2' -> `V2 2'
   DEBUG:     `K3' -> `" 111222333" \'444555 '
   DEBUG:     `K4' -> `V4'
-  $ falist_destroy LIST
+  $ falist_release LIST
   $ check_no_alist_artifacts
 
 
@@ -179,8 +179,8 @@
   EACH: _farr_KV\[\?,\?\]:[a-f0-9]+ key `K3', value `" 111222333" \\'444555 ' at idx 3 (re)
 
   $ falist_clear LIST
-  $ falist_destroy LIST
-  $ falist_destroy LIST
+  $ falist_release LIST
+  $ falist_release LIST
   ERROR: object `LIST' not created properly: token empty
   [1]
 
@@ -216,7 +216,7 @@
   $ falist_tryget_item_at_index _k _v LIST -3
   [1]
 
-  $ falist_destroy LIST
+  $ falist_release LIST
   $ check_no_alist_artifacts
 
 
@@ -247,7 +247,7 @@
   $ printf '%s' "$_var"
   value 4 (no-eol)
 
-  $ falist_destroy LIST
+  $ falist_release LIST
 
   $ check_no_alist_artifacts
 
@@ -293,10 +293,10 @@
   $ falist_clear LIST3
   $ falist_are_equal_with_order LIST2 LIST3
 
-  $ falist_destroy LIST1
-  $ falist_destroy LIST2
-  $ falist_destroy LIST3
-  $ falist_destroy LIST4
+  $ falist_release LIST1
+  $ falist_release LIST2
+  $ falist_release LIST3
+  $ falist_release LIST4
 
   $ check_no_alist_artifacts
 
@@ -335,10 +335,10 @@
   DEBUG:     `Key 1' -> `Value 1'
   DEBUG:     `Key 2' -> `Value 2 ''
 
-  $ falist_destroy ARR
-  $ falist_destroy UPDATE1
-  $ falist_destroy UPDATE2
-  $ falist_destroy EMPTY
+  $ falist_release ARR
+  $ falist_release UPDATE1
+  $ falist_release UPDATE2
+  $ falist_release EMPTY
 
   $ check_no_alist_artifacts
 
@@ -371,10 +371,10 @@
   DEBUG:     1: `Value 1'
   DEBUG:     2: `Value 2 ''
 
-  $ falist_destroy LIST
-  $ farray_destroy KEYS
-  $ farray_destroy VALUES
-  $ farray_destroy ITEMS
+  $ falist_release LIST
+  $ farray_release KEYS
+  $ farray_release VALUES
+  $ farray_release ITEMS
 
   $ check_no_alist_artifacts
 
@@ -386,7 +386,7 @@
   $ (farray_append LIST value)
   ERROR: object `LIST' is not an array
   [70]
-  $ falist_destroy LIST
+  $ falist_release LIST
   $ check_no_alist_artifacts
 
 
@@ -409,7 +409,7 @@
   $ falist_type LIST
   alist (no-eol)
   $ falist_isalist LIST
-  $ falist_destroy LIST
+  $ falist_release LIST
   $ check_no_alist_artifacts
 
 
@@ -437,7 +437,7 @@
   $ falist_set LIST K1 V1
   $ falist_create ITEM1 K11 V11 K22 V22
   $ falist_set LIST K2 "$ITEM1"
-  $ falist_destroy ITEM1
+  $ falist_release ITEM1
   $ falist_debug LIST
   DEBUG: alist `LIST' has length 2
   DEBUG:     `K1' -> `V1'
@@ -445,5 +445,5 @@
       DEBUG: alist with token `[a-f0-9]+' has length 2 (re)
       DEBUG:     `K11' -> `V11'
       DEBUG:     `K22' -> `V22'
-  $ falist_destroy LIST
+  $ falist_release LIST
   $ check_no_alist_artifacts
--- a/tests/farray-array.t	Mon Oct 07 12:44:00 2024 +0200
+++ b/tests/farray-array.t	Mon Oct 07 12:57:29 2024 +0200
@@ -26,7 +26,7 @@
   [1]
   $ farray_debug EMPTY
   DEBUG: array `EMPTY' has length 0
-  $ farray_destroy EMPTY
+  $ farray_release EMPTY
   $ check_no_array_artifacts
 
 Create and destroy an array
@@ -53,7 +53,7 @@
 #  DEBUG:     3: `2'
 #  DEBUG:     4: `3  4   5'
 #  DEBUG:     5: `" 678" \'90 '
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Create, clear and destroy an array
@@ -79,7 +79,7 @@
   0 (no-eol)
   $ farray_length _var TEST
   $ test ${_var} -eq 0
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ farray_istrue TEST
   ERROR: object `TEST' not created properly: token empty
   [1]
@@ -88,8 +88,8 @@
 Duplicate destruction
 
   $ farray_create TEST 1 2 3
-  $ farray_destroy TEST
-  $ farray_destroy TEST
+  $ farray_release TEST
+  $ farray_release TEST
   ERROR: object `TEST' not created properly: token empty
   [1]
   $ check_no_array_artifacts
@@ -103,8 +103,8 @@
   $ farray_create TEST1
   $ farray_create TEST2
   $ farray_are_equal TEST1 TEST2
-  $ farray_destroy TEST1
-  $ farray_destroy TEST2
+  $ farray_release TEST1
+  $ farray_release TEST2
   $ check_no_array_artifacts
 
 Equality (non-empty)
@@ -112,8 +112,8 @@
   $ farray_create TEST1 0 1 2 '3  4   5' $'" 678" \\\'90 '
   $ farray_create TEST2 0 1 2 '3  4   5' $'" 678" \\\'90 '
   $ farray_are_equal TEST1 TEST2
-  $ farray_destroy TEST1
-  $ farray_destroy TEST2
+  $ farray_release TEST1
+  $ farray_release TEST2
   $ check_no_array_artifacts
 
 In-Equality (non-empty, same length)
@@ -122,8 +122,8 @@
   $ farray_create TEST2 0 1 2 '3  4   5' $'" 678" \\\'90'
   $ farray_are_equal TEST1 TEST2
   [1]
-  $ farray_destroy TEST1
-  $ farray_destroy TEST2
+  $ farray_release TEST1
+  $ farray_release TEST2
   $ check_no_array_artifacts
 
 In-Equality (non-empty, different length)
@@ -132,8 +132,8 @@
   $ farray_create TEST2   1 2 '3  4   5' $'" 678" \\\'90 '
   $ farray_are_equal TEST1 TEST2
   [1]
-  $ farray_destroy TEST1
-  $ farray_destroy TEST2
+  $ farray_release TEST1
+  $ farray_release TEST2
   $ check_no_array_artifacts
 
 
@@ -190,7 +190,7 @@
   ERROR: array index out of bounds
   [70]
 
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -207,7 +207,7 @@
   DEBUG:     3: `3  4   5'
   DEBUG:     4: `" 678" \'910 '
   DEBUG:     5: `11'
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
   $ farray_create TEST 0 1 2 '3  4   5' $'" 678" \\\'910 ' 11
@@ -220,7 +220,7 @@
   DEBUG:     3: `2'
   DEBUG:     4: `3  4   5'
   DEBUG:     5: `" 678" \'910 '
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
   $ farray_create TEST 0 1 2 '3  4   5' $'" 678" \\\'910 ' 11
@@ -233,7 +233,7 @@
   DEBUG:     3: `2'
   DEBUG:     4: `" 678" \'910 '
   DEBUG:     5: `11'
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
   $ farray_create TEST 0 1 2 '3  4   5' $'" 678" \\\'910 ' 11
@@ -241,7 +241,7 @@
   ERROR: array index out of bounds
   [70]
 
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
   $ farray_create TEST 0 1 2 '3  4   5' $'" 678" \\\'910 ' 11
@@ -249,7 +249,7 @@
   ERROR: array index out of bounds
   [70]
 
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -270,7 +270,7 @@
   DEBUG:     5: `" 678" \'910 '
   DEBUG:     6: `11'
   DEBUG:     7: `the new value \ ''
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Append (explicit)
@@ -287,7 +287,7 @@
   DEBUG:     5: `" 678" \'910 '
   DEBUG:     6: `11'
   DEBUG:     7: `the new value \ ''
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Replace the last element
@@ -303,7 +303,7 @@
   DEBUG:     4: `3  4   5'
   DEBUG:     5: `" 678" \'910 '
   DEBUG:     6: `the new replaced value \ ''
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Replace the first element
@@ -319,7 +319,7 @@
   DEBUG:     4: `3  4   5'
   DEBUG:     5: `" 678" \'910 '
   DEBUG:     6: `11'
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Replace some element in the middle
@@ -335,7 +335,7 @@
   DEBUG:     4: `3  4   5'
   DEBUG:     5: `the new replaced value \ ' 2 '
   DEBUG:     6: `11'
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Out of bounds
@@ -344,7 +344,7 @@
   $ ( farray_set TEST 8 )
   ERROR: array index out of bounds (cannot create holes)
   [70]
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -375,9 +375,9 @@
   DEBUG:     1: ` I 1 '
   DEBUG:     2: ` I 2 '
   DEBUG:     3: ` I 3 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Insert at the beginning (prepend)
@@ -403,9 +403,9 @@
   DEBUG:     10: ` v 7 '
   DEBUG:     11: ` v 8 '
   DEBUG:     12: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Insert at the end (extend)
@@ -431,9 +431,9 @@
   DEBUG:     10: ` I 1 '
   DEBUG:     11: ` I 2 '
   DEBUG:     12: ` I 3 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Insert in the middle
@@ -459,9 +459,9 @@
   DEBUG:     10: ` v 7 '
   DEBUG:     11: ` v 8 '
   DEBUG:     12: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 "Clear" (empty inserted)
@@ -484,9 +484,9 @@
   DEBUG:     9: ` v 9 '
   $ farray_debug TEST
   DEBUG: array `TEST' has length 0
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 "Clear" (no inserted)
@@ -508,8 +508,8 @@
   DEBUG:     9: ` v 9 '
   $ farray_debug TEST
   DEBUG: array `TEST' has length 0
-  $ farray_destroy DELETED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Cut out some part in the middle
@@ -532,8 +532,8 @@
   DEBUG:     2: ` v 7 '
   DEBUG:     3: ` v 8 '
   DEBUG:     4: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Cut out some part from the beginning
@@ -556,8 +556,8 @@
   DEBUG:     1: ` v 7 '
   DEBUG:     2: ` v 8 '
   DEBUG:     3: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Cut out some part at the end (1)
@@ -580,8 +580,8 @@
   DEBUG:     6: ` v 6 '
   DEBUG:     7: ` v 7 '
   DEBUG:     8: ` v 8 '
-  $ farray_destroy DELETED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Cut out some part at the end (1)
@@ -604,8 +604,8 @@
   DEBUG:     5: ` v 5 '
   DEBUG:     6: ` v 6 '
   DEBUG:     7: ` v 7 '
-  $ farray_destroy DELETED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice at the beginning (shrink)
@@ -632,9 +632,9 @@
   DEBUG:     6: ` v 7 '
   DEBUG:     7: ` v 8 '
   DEBUG:     8: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice at the end (shrink)
@@ -661,9 +661,9 @@
   DEBUG:     6: ` I 1 '
   DEBUG:     7: ` I 2 '
   DEBUG:     8: ` I 3 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice in the middle (shrink)
@@ -690,9 +690,9 @@
   DEBUG:     6: ` v 7 '
   DEBUG:     7: ` v 8 '
   DEBUG:     8: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice at the beginning (grow)
@@ -719,9 +719,9 @@
   DEBUG:     8: ` v 7 '
   DEBUG:     9: ` v 8 '
   DEBUG:     10: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice at the end (grow)
@@ -748,9 +748,9 @@
   DEBUG:     8: ` I 1 '
   DEBUG:     9: ` I 2 '
   DEBUG:     10: ` I 3 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice in the middle (grow)
@@ -777,9 +777,9 @@
   DEBUG:     8: ` v 7 '
   DEBUG:     9: ` v 8 '
   DEBUG:     10: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice at the beginning (no length change)
@@ -806,9 +806,9 @@
   DEBUG:     7: ` v 7 '
   DEBUG:     8: ` v 8 '
   DEBUG:     9: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice at the end (no length change)
@@ -835,9 +835,9 @@
   DEBUG:     7: ` I 1 '
   DEBUG:     8: ` I 2 '
   DEBUG:     9: ` I 3 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 Splice in the middle (no length change)
@@ -864,9 +864,9 @@
   DEBUG:     7: ` v 7 '
   DEBUG:     8: ` v 8 '
   DEBUG:     9: ` v 9 '
-  $ farray_destroy DELETED
-  $ farray_destroy INSERTED
-  $ farray_destroy TEST
+  $ farray_release DELETED
+  $ farray_release INSERTED
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -919,7 +919,7 @@
   $ farray_contains TEST '0 '
   [1]
 
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -998,7 +998,7 @@
   EACH: _farr_A\[\?\]:[a-f0-9]+ at idx 2: value is `1' (re)
   EACH: _farr_A\[\?\]:[a-f0-9]+ at idx 1: value is `0' (re)
 
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -1065,7 +1065,7 @@
   $ farray_join _var TEST '---'
   $ echo "/${_var}/"
   //
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -1097,7 +1097,7 @@
   _farr_A_[0-9a-f]+__\=0 (re)
   [1]
 
-  $ farray_destroy DUP
+  $ farray_release DUP
   $ check_no_array_artifacts
 
 
@@ -1108,7 +1108,7 @@
   $ (falist_set TEST key value)
   ERROR: object `TEST' is not an alist
   [70]
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -1131,7 +1131,7 @@
   $ falist_type TEST
   array (no-eol)
   $ farray_isarray TEST
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
 
 
@@ -1160,7 +1160,7 @@
   $ farray_create TEST i1 i2
   $ farray_create ITEM1 i11 i22
   $ farray_append TEST "$ITEM1"
-  $ farray_destroy ITEM1
+  $ farray_release ITEM1
   $ farray_debug TEST
   DEBUG: array `TEST' has length 3
   DEBUG:   its contents:
@@ -1171,5 +1171,5 @@
       DEBUG:   its contents:
       DEBUG:     1: `i11'
       DEBUG:     2: `i22'
-  $ farray_destroy TEST
+  $ farray_release TEST
   $ check_no_array_artifacts
--- a/tests/farray-object.t	Mon Oct 07 12:44:00 2024 +0200
+++ b/tests/farray-object.t	Mon Oct 07 12:57:29 2024 +0200
@@ -18,11 +18,11 @@
   $ farray_create ARRAY1 i1 i2
   $ farray_create ITEM1 i11 i22
   $ farray_append ARRAY1 "$ITEM1"
-  $ farray_destroy ITEM1
+  $ farray_release ITEM1
   $ falist_create LIST2 k1 v1 k2 v2 k3 v3
 This also transfers ownership
   $ farray_append ARRAY1 "$LIST2"
-  $ falist_destroy LIST2
+  $ falist_release LIST2
   $ farray_debug ARRAY1
   DEBUG: array `ARRAY1' has length 4
   DEBUG:   its contents:
@@ -38,7 +38,7 @@
       DEBUG:     `k1' -> `v1'
       DEBUG:     `k2' -> `v2'
       DEBUG:     `k3' -> `v3'
-  $ farray_destroy ARRAY1
+  $ farray_release ARRAY1
   $ check_no_array_artifacts
   $ check_no_alist_artifacts
 
@@ -49,10 +49,10 @@
   $ falist_create LIST1 k1 v1
   $ falist_create ITEM1 k11 v11 k22 v22 k33 v33 k44 v44
   $ falist_set LIST1 k2 "$ITEM1"
-  $ falist_destroy ITEM1
+  $ falist_release ITEM1
   $ farray_create ARRAY2 a1 a2 a3
   $ falist_set LIST1 k3 "$ARRAY2"
-  $ farray_destroy ARRAY2
+  $ farray_release ARRAY2
   $ falist_debug LIST1
   DEBUG: alist `LIST1' has length 3
   DEBUG:     `k1' -> `v1'
@@ -69,6 +69,6 @@
       DEBUG:     2: `a2'
       DEBUG:     3: `a3'
 
-  $ falist_destroy LIST1
+  $ falist_release LIST1
   $ check_no_array_artifacts
   $ check_no_alist_artifacts