gpgscm: Simplify hash tables.
authorJustus Winter <justus@g10code.com>
Thu, 16 Mar 2017 16:18:01 +0000 (17:18 +0100)
committerJustus Winter <justus@g10code.com>
Fri, 17 Mar 2017 09:35:25 +0000 (10:35 +0100)
commit6a3f857224eab108ae38e6259194b01b0ffdad8b
tree006cc4b86a6a3993c0912de2a4a9a877e08dc8f8
parent38c955599f7c6c20faeec57d8e1df7d2c0eeba18
gpgscm: Simplify hash tables.

* tests/gpgscm/scheme.c (oblist_add_by_name): We now always get a
slot.  Simplify accordingly.
(oblist_find_by_name): Always return the slot.
(vector_elem_slot): New function.
(new_slot_spec_in_env): We now always get a slot.  Remove parameter
'env'.  Simplify accordingly.
(find_slot_spec_in_env): Always return a slot.
(new_slot_in_env): Adapt callsite.
(opexe_0): Likewise.
(opexe_1): Likewise.
(scheme_define): Likewise.
--

Now that the ill-devised immediate values framework is gone, there is
no need to tag the pointers in vectors anymore.  Therefore, we can
always return a pointer to the slot in the hash table lookup
functions.

Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/scheme.c