In perl.git, the branch smueller/hash_vtable has been updated <http://perl5.git.perl.org/perl.git/commitdiff/0b5522d0e0c84d15711e650e6e4e92109e23a2af?hp=cbcc509d6cd1a435393639fdd1cf0514f998a554>
- Log ----------------------------------------------------------------- commit 0b5522d0e0c84d15711e650e6e4e92109e23a2af Author: Steffen Mueller <[email protected]> Date: Thu Feb 2 21:19:16 2017 +0100 Hash vtables: More TODO markers Including describing a potential plan to validate that we've (eventually) wrapped all hash access operations and nothing in core is violating any of the encapsulations. ----------------------------------------------------------------------- Summary of changes: hv_vtbl.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hv_vtbl.h b/hv_vtbl.h index a0158a150a..635f218e3b 100644 --- a/hv_vtbl.h +++ b/hv_vtbl.h @@ -40,6 +40,21 @@ struct hv_vtbl { /* TODO also wrap all the iteration primitives! */ /* TODO research what other primitives are missing! */ + /* TODO what about all the hash introspection macros? HvTOTALKEYS? etc etc? */ + /* TODO newHVhv for copying hashes? Can we provide a (potentially inefficient) default + * implementation of this so that not everyone has to reimplement before they can + * even test their data structure? */ + /* TODO What about hv_fill? Should we even bother implementing that? Or provide a default + * that returns 0? (IOW 'talk to the hand')? */ + /* TODO What about the "hash name" related stuff (for stashes?)? */ + /* TODO what about hv_magic? */ + /* TODO what about placeholders? */ + /* TODO hv_assert? Bother? */ + + /* TODO once 'everything' is wrapped, one way to test is to use the mock vtbl implementation + * to 'move' or 'rotate' all struct members in some well-defined way that can be undone + * by the wrapper (using SAVEDESTRUCTOR and LEAVE for example to redo it). That way, + * one can test if all hash accesses are actually going through the wrappers. */ }; typedef struct hv_vtbl HV_VTBL; -- Perl5 Master Repository
