From d2b531bd103cb07ea4d092169ae5b6c26c3e17297a3bb454a5ca56bd7015e406 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 24 Jun 2025 15:46:44 +0300 Subject: [PATCH] "b" type is more clear than "?" --- c/lib/schema.c | 2 +- go/schema/check.go | 2 +- spec/schema/cmds | 2 +- tcl/schema.tcl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/c/lib/schema.c b/c/lib/schema.c index ace4b58..88ef1ee 100644 --- a/c/lib/schema.c +++ b/c/lib/schema.c @@ -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"; diff --git a/go/schema/check.go b/go/schema/check.go index d88cc16..1dde03e 100644 --- a/go/schema/check.go +++ b/go/schema/check.go @@ -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) diff --git a/spec/schema/cmds b/spec/schema/cmds index 6fed256..f5f6574 100644 --- a/spec/schema/cmds +++ b/spec/schema/cmds @@ -33,7 +33,7 @@ TYPE | ["T", T0 [, T1, ...]] "B"(IN) (BL)"O"(B) - "?" for BOOL + "b"OOL "H"(EXLET) "I"(NT) "L"(IST) diff --git a/tcl/schema.tcl b/tcl/schema.tcl index c1b6d36..db7007d 100755 --- a/tcl/schema.tcl +++ b/tcl/schema.tcl @@ -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 -- 2.50.0