chiark / gitweb /
mask-map amend implemented, but untested
[chiark-tcl.git] / base / tables-examples.tct
index 235f770..9165827 100644 (file)
@@ -5,6 +5,8 @@ Type hbv:                       HBytes_Var @
 Init hbv                       @.hb=0; init_somethingv(&@.sth);
 Fini hbv                       fini_somethingv(ip, rc, &@.sth);
 
+Type constv(Tcl_ObjType*):     Tcl_Obj *@
+
 Type maskmapv:                 MaskMap_Var @
 Init maskmapv                  @.mm=0; init_somethingv(&@.sth);
 Fini maskmapv                  fini_somethingv(ip, rc, &@.sth);
@@ -34,20 +36,17 @@ Table toplevel TopLevel_Command
        ulong
                subcmd  enum(ULong_SubCommand,"ulong subcommand")
                ...     obj
-       mask-map
-               subcmd  enum(MaskMap_SubCommand, "hbytes mask-map subcommand")
-               ...     obj
 
 Table maskmap MaskMap_SubCommand
        lookup
-               map     maskmapv
+               map     constv(&maskmap_type)
                addr    hb
                ?def    obj
                =>      obj
        amend
                map     maskmapv
-               prefix  hb
-               preflen int
+               prefix  obj
+               preflen obj
                data    obj
 
 Table ulong ULong_SubCommand
@@ -182,6 +181,9 @@ Table hbytes HBytes_SubCommand
                prop    enum(HashAlgPropInfo, "prop")
                alg     enum(HashAlgInfo, "alg")
                =>      int
+       mask-map
+               subcmd  enum(MaskMap_SubCommand, "hbytes mask-map subcommand")
+               ...     obj
 
 Table padmethodinfo PadMethodInfo
        pkcs5