gpgscm: Introduce macro for the vector length.
authorJustus Winter <justus@g10code.com>
Mon, 30 Jan 2017 14:39:57 +0000 (15:39 +0100)
committerJustus Winter <justus@g10code.com>
Mon, 30 Jan 2017 15:24:01 +0000 (16:24 +0100)
commit489edf84c9a9c2122cef1b4e678154521525b54a
tree395c16f57d478311fa6c17ebdbdc2b84fbbbfcbd
parent59048b0f1aa77313573a1004cd3a9f02692a7521
gpgscm: Introduce macro for the vector length.

* tests/gpgscm/scheme.c (vector_length): New macro.
(get_vector_object): Use the new macro.
(oblist_add_by_name): Likewise.
(oblist_find_by_name): Likewise.
(oblist_all_symbols): Likewise.
(mk_vector): Likewise.
(mark): Likewise.
(new_slot_spec_in_env): Likewise.
(find_slot_spec_in_env): Likewise.
(opexe_2): Likewise.
(opexe_5): Likewise.
--

Introducing an abstraction reduces the coupling between code using
vectors and the implementation of vectors.

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