summaryrefslogtreecommitdiffstats
path: root/artwork
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2017-01-30 15:51:19 +0100
committerJustus Winter <justus@g10code.com>2017-01-30 18:21:24 +0100
commit49e2ae65e892f93be7f87cfaae3392b50a99e4b1 (patch)
tree3f6fdefe15b86ce7893ad95d8c6aae7c64ba9bfb /artwork
parentgpgscm: Provide framework for immediate values. (diff)
downloadgnupg2-49e2ae65e892f93be7f87cfaae3392b50a99e4b1.tar.xz
gnupg2-49e2ae65e892f93be7f87cfaae3392b50a99e4b1.zip
gpgscm: Use a compact vector representation.
* tests/gpgscm/scheme-private.h (struct cell): Add a compact vector representation. * tests/gpgscm/scheme.c (vector_length): Use new representation. (vector_size): New macro. (get_vector_object): Use the new representation. (fill_vector): Likewise. (vector_elem): Likewise. (set_vector_elem): Likewise. (mark): Likewise. (gc): Likewise. Be careful not to confuse immediate values for type flags. (finalize_cell): Vectors now require finalization. -- Previously, vectors were represented using consecutive cons cells, wasting one word per cell for the type information. Fix that by using a flat array. Previously, a vector of size N required 1 + (n + 1) / 2 cells. Now it uses 1 + (n - 1 + 2) / 3 cells. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'artwork')
0 files changed, 0 insertions, 0 deletions