diff options
| author | forsyth <forsyth@vitanuova.com> | 2011-05-16 23:28:07 +0100 |
|---|---|---|
| committer | forsyth <forsyth@vitanuova.com> | 2011-05-16 23:28:07 +0100 |
| commit | 2b69dba5038ffd0b59cf30a4c44bce549e5097f8 (patch) | |
| tree | 385d35337b2895a07a2df21bafeb80dd4536e25d /module/venti.m | |
| parent | d728e3107d7ae935bc511e72efc8a0c43fdbf0a0 (diff) | |
20110516-2327
Diffstat (limited to 'module/venti.m')
| -rw-r--r-- | module/venti.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/module/venti.m b/module/venti.m index 021d436c..440a276d 100644 --- a/module/venti.m +++ b/module/venti.m @@ -124,7 +124,10 @@ Venti: module { rtype: string; score: Venti->Score; # to a Dir block blocksize: int; # maximum block size - prev: Venti->Score; # last root block + prev: ref Venti->Score; # last root block + + pack: fn(r: self ref Root): array of byte; + unpack: fn(d: array of byte): ref Root; }; Entry: adt { @@ -135,6 +138,9 @@ Venti: module { flags: int; size: big; # (XXX should be unsigned) score: Venti->Score; + + pack: fn(e: self ref Entry): array of byte; + unpack: fn(d: array of byte): ref Entry; }; Score: adt { a: array of byte; @@ -153,7 +159,5 @@ Venti: module { sync: fn(s: self ref Session): int; rpc: fn(s: self ref Session, m: ref Vmsg): (ref Vmsg, string); }; - unpackentry: fn(d: array of byte): ref Entry; - unpackroot: fn(d: array of byte): ref Root; init: fn(); }; |
