aboutsummaryrefslogtreecommitdiff
path: root/autosetup/teaish/core.tcl
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-05-17 10:32:48 +0000
committerstephan <stephan@noemail.net>2025-05-17 10:32:48 +0000
commit9bb2548e3e8b5bae356f763c1f517c6b19a2eb46 (patch)
treea30c4b3552fb4c8ef29ac1e223919fbec16deffc /autosetup/teaish/core.tcl
parent1e24694b593ac2bcd792e81125cd32bee1580b45 (diff)
downloadsqlite-9bb2548e3e8b5bae356f763c1f517c6b19a2eb46.tar.gz
sqlite-9bb2548e3e8b5bae356f763c1f517c6b19a2eb46.zip
Rename feature-tests.tcl to feature.tcl. Haiku tcl portability fixes.
FossilOrigin-Name: 15bd9e581a6d6ebe281b091adc04dca4d1c7fa9bbb582bcbab8c401b4f976753
Diffstat (limited to 'autosetup/teaish/core.tcl')
-rw-r--r--autosetup/teaish/core.tcl19
1 files changed, 12 insertions, 7 deletions
diff --git a/autosetup/teaish/core.tcl b/autosetup/teaish/core.tcl
index 5476206ed..381597ec5 100644
--- a/autosetup/teaish/core.tcl
+++ b/autosetup/teaish/core.tcl
@@ -1512,30 +1512,35 @@ proc teaish-make-config-header {filename} {
}
#
-# @teaish-feature-cache-set ?$key? value
+# @teaish-feature-cache-set $key value
#
# Sets a feature-check cache entry with the given key.
-# See proj-cache-set for the key's semantics.
+# See proj-cache-set for the key's semantics. $key should
+# normally be 0.
#
-proc teaish-feature-cache-set {{key 0} val} {
- proj-cache-set $key 1 $val
+proc teaish-feature-cache-set {key val} {
+ proj-cache-set -key $key -level 1 $val
}
#
-# @teaish-feature-cache-check ?$key? tgtVarName
+# @teaish-feature-cache-check key tgtVarName
#
# Checks for a feature-check cache entry with the given key.
# See proj-cache-set for the key's semantics.
#
+# $key should also almost always be 0 but, due to a tclsh
+# incompatibility in 1 OS, it cannot have a default value unless it's
+# the second argument (but it should be the first one).
+#
# If the feature-check cache has a matching entry then this function
# assigns its value to tgtVar and returns 1, else it assigns tgtVar to
# "" and returns 0.
#
# See proj-cache-check for $key's semantics.
#
-proc teaish-feature-cache-check {{key 0} tgtVar} {
+proc teaish-feature-cache-check {key tgtVar} {
upvar $tgtVar tgt
- proj-cache-check $key 1 tgt
+ proj-cache-check -key $key -level 1 tgt
}
#