monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] Revision 00862d40b30f11d972198ffb53e61986d3ce7a


From: monotone
Subject: [Monotone-commits-diffs] Revision 00862d40b30f11d972198ffb53e61986d3ce7aac
Date: Mon, 17 Mar 2008 02:05:49 +0100

-----------------------------------------------------------------
Revision: 00862d40b30f11d972198ffb53e61986d3ce7aac
Ancestor: b48784545a83782ceee86899dc28b5ca17b42fbe
Author: address@hidden
Date: 2008-03-16T02:30:44
Branch: net.venge.monotone

Modified files:
        transforms.hh vocab.cc vocab.hh vocab_hash.hh
        vocab_macros.hh vocab_terms.hh

ChangeLog: 

Cleanup/simplification of vocab verification mechanism.  Major
advantage here is in comprehensibility, but will also help .db-compaction.

 * vocab_macros.hh (hh_ENCODING): These types now contain a bare
   immutable_string, not an instance of the encoded type.  Remove
   constructor variant that takes an instance of the encoded type.
   Remove all mention of the 'ok' field.  Streamline the comparison
   functions.
   (hh_ENCODING_NOVERIFY): New macro.
   (hh_DECORATE): Remove all mention of the 'ok' field.
   (hh_ATOMIC_HOOKED): Renamed from hh_ATOMIC to allow the possibility of
   having these befriend their verify functions, but do not do this by
   default.  Remove all mention of the 'ok' field.  Streamline the
   comparison functions.  Adjust code to be more clearly parallel with
   hh_ENCODING.  Do not refer to verify_full.  Do not define verify.
   (hh_ATOMIC, hh_ATOMIC_NOVERIFY): Just wrappers now.
   (cc_ATOMIC, cc_ENCODING, cc_DECORATE): Update to match.
   (cc_ATOMIC_NOVERIFY, cc_ENCODING_NOVERIFY): Define a dummy verify
   function here.
 * vocab_terms.hh (netsync_session_key, netsync_hmac_value): Define
   using ATOMIC_HOOKED.
   (gzip, base64): Define using ENCODING_NOVERIFY.
 * vocab.cc: Delete huge, now entirely obsolete comment on why the
   verifiers are so confusing; substitute simpler comment.  Rename all
   verify_full functions to verify.  Make verify(hexenc<id>) into a
   specialization of template verify(hexenc<T>); define the generic of
   that template as well.  Do not set val.ok anywhere.  Where possible,
   have verify functions take a const reference argument.  Update macro
   definitions and undefinitions around inclusion of vocab_terms.hh;
   remove unnecessary ifdef.
 * vocab.hh, vocab_hash.hh: Update macro definitions and undefinitions
   around inclusion of vocab_terms.hh.

 * transforms.hh (encode_base64<T>, encode_hexenc<T>): Remove
   unnecessary (and now forbidden) conversion to T.

Attachment: txtYV9Ejj2URb.txt
Description: Diff [b48784545a83782ceee86899dc28b5ca17b42fbe] -> [00862d40b30f11d972198ffb53e61986d3ce7aac]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]