]> Cypherpunks repositories - keks.git/commitdiff
"b" type is more clear than "?"
authorSergey Matveev <stargrave@stargrave.org>
Tue, 24 Jun 2025 12:46:44 +0000 (15:46 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 24 Jun 2025 14:11:26 +0000 (17:11 +0300)
c/lib/schema.c
go/schema/check.go
spec/schema/cmds
tcl/schema.tcl

index ace4b58ad9521ea5019bd68c1650c4e89d0edb969b6728cdd4b8b68d1953b8b8..88ef1ee9d76b1bcf8ae7de9fb4438a33f6658a44d437ea0730d951e8f9daa743 100644 (file)
@@ -41,7 +41,7 @@ static const char CmdUTC[] = "UTC";
 
 static const char TypeBin[] = "B";
 static const char TypeBlob[] = "O";
-static const char TypeBool[] = "?";
+static const char TypeBool[] = "b";
 static const char TypeHexlet[] = "H";
 static const char TypeInt[] = "I";
 static const char TypeList[] = "L";
index d88cc16210d0e2463ccacf95b03ff69cee34585a94172a284f63db956f834fca..1dde03e758c00ba445152e3fbdba89b88bb3fc7e33db748ed5a881f9f43f1173 100644 (file)
@@ -294,7 +294,7 @@ func Check(schemaName string, schemas map[string][][]any, data any) error {
                                switch t {
                                case "N":
                                        expected = append(expected, types.NIL)
-                               case "?":
+                               case "b":
                                        expected = append(expected, types.Bool)
                                case "H":
                                        expected = append(expected, types.Hexlet)
index 6fed2563558ce7d6fc584125efd4c489075b11b7ea2513f40c16594586bc3ccb..f5f6574a026c614de41900e64eb5b529cbfc8080d85e9b30163270237605c0ca 100644 (file)
@@ -33,7 +33,7 @@ TYPE | ["T", T0 [, T1, ...]]
 
         "B"(IN)
         (BL)"O"(B)
-        "?" for BOOL
+        "b"OOL
         "H"(EXLET)
         "I"(NT)
         "L"(IST)
index c1b6d36b5a3def51416d3e0159141b1d505df41905dfa51a4d23fc1b00b20aa6..db7007d1be474386dcb9b41a8df05e00742a710a52c098ce8ad332182483000f 100755 (executable)
@@ -44,7 +44,7 @@ proc TAKE {k} {
 }
 
 set knownTypes [dict create \
-    bin B blob O bool ? hexlet H int I list L magic K map M nil N str S tai T]
+    bin B blob O bool b hexlet H int I list L magic K map M nil N str S tai T]
 
 proc TYPE {types} {
     variable knownTypes