gpgscm: Mark cells requiring finalization.
authorJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 10:03:30 +0000 (11:03 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 15 Nov 2016 10:10:56 +0000 (11:10 +0100)
commit64a58e23c38db8658423bbe26fcd650330e24a88
tree7caf7ab5219a706198df3907d9e2e68da474ae9c
parent93cc322ac06d3045a24aece90091f7f80f3dacb8
gpgscm: Mark cells requiring finalization.

* tests/gpgscm/scheme.c (T_FINALIZE): New macro.
(mk_port): Use the new macro.
(mk_foreign_object): Likewise.
(mk_counted_string): Likewise.
(mk_empty_string): Likewise.
(gc): Only call 'finalize_cell' for cells with the new flag.
--

This speeds up the sweep phase of the garbage collector considerably
because most cells do not require finalization.

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