gpgscm: Use boxed values for source locations.
authorJustus Winter <justus@g10code.com>
Thu, 22 Dec 2016 09:36:56 +0000 (10:36 +0100)
committerJustus Winter <justus@g10code.com>
Mon, 2 Jan 2017 10:02:34 +0000 (11:02 +0100)
commite8b843508dac96e9d0a3140954dd5a3618669cec
treea10a893cdebe9e80b20d5f6d92e605f8e30aa281
parent5a4a109354d53cf3673d0636731c67021d3f367a
gpgscm: Use boxed values for source locations.

* tests/gpgscm/scheme-private.h (struct port): Use boxed values for
filename and current line.  This allows us to use the same Scheme
object for labeling all expressions in a file.
* tests/gpgscm/scheme.c (file_push): Use boxed type for filename.
(mark): Mark location objects of port objects.
(gc): Mark location objects in the load stack.
(port_clear_location): New function.
(port_reset_current_line): Likewise.
(port_increment_current_line): Likewise.
(file_pop): Adapt accordingly.
(port_rep_from_filename): Likewise.
(port_rep_from_file): Likewise.
(port_close): Likewise.
(skipspace): Likewise.
(token): Likewise.
(_Error_1): Likewise.
(opexe_0): Likewise.
(opexe_5): Likewise.
(scheme_deinit): Likewise.
(scheme_load_file): Likewise.
(scheme_load_named_file): Likewise.

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