Diffusion GnuPG 6a3f857224ea

gpgscm: Simplify hash tables.

Authored by justus on Mar 16 2017, 5:18 PM.

Description

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>

Details

Committed
justusMar 17 2017, 10:35 AM
Parents
rG38c955599f7c: gpgscm: Remove framework for immediate values.
Branches
Unknown
Tags
Unknown
Justus Winter <justus@g10code.com> committed rG6a3f857224ea: gpgscm: Simplify hash tables. (authored by Justus Winter <justus@g10code.com>).Mar 17 2017, 10:35 AM