pyke/mapping.c, key.c: Make the mapping code more intrusive and complete.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 18 Nov 2019 10:41:12 +0000 (10:41 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:44:14 +0000 (12:44 +0100)
commit31ff254edd8d9c6927a67838ec4418ad8ba42652
treebfff087a20db07e52ea9bb52efcd830f9068593b
parentf7160cffceab30266f8151072411bdd5a8cf5788
pyke/mapping.c, key.c: Make the mapping code more intrusive and complete.

Previously, mapping classes would implement a minimum of Python-level
operations, such as iterating over keys and mapping lookups, and the
generic mapping code would just synthesize missing operations in terms
of these.

Instead, introduce a mapping-specific vtable pointer in object
structures which describes the mapping operations in a form similar to
mLib's `sym' interface, which is rather more efficient in terms of hash
probes, and have the generic mapping code synthesize all of the Python-
level operations from these.

Needless to say, this is very messy.  Sorry.
key.c
pyke/mapping-mLib.c [new file with mode: 0644]
pyke/mapping.c
pyke/pyke-mLib.h
pyke/pyke.h
setup.py
t/testutils.py