tests/gpgscm: Foreign objects support for TinySCHEME.
authorJustus Winter <justus@g10code.com>
Thu, 31 Mar 2016 11:49:56 +0000 (13:49 +0200)
committerJustus Winter <justus@g10code.com>
Fri, 17 Jun 2016 09:38:00 +0000 (11:38 +0200)
commit56c36f2932fe2baf8e46efdea4315cf33f3c0338
tree4d7bbf6ad0c7660c836b94aded9cc1af7e366a69
parent8e5ad9aabdd57457f76078924d33acb94b75a877
tests/gpgscm: Foreign objects support for TinySCHEME.

* tests/gpgscm/scheme-private.h (struct cell): Add 'foreign_object'.
(is_foreign_object): New prototype.
(get_foreign_object_{vtable,data}): Likewise.
* tests/gpgscm/scheme.c (enum scheme_types): New type.
(is_foreign_object): New function.
(get_foreign_object_{vtable,data}): Likewise.
(mk_foreign_object): Likewise.
(finalize_cell): Free foreign objects.
(atom2str): Pretty-print foreign objects.
(vtbl): Add new functions.
* tests/gpgscm/scheme.h (struct foreign_object_vtable): New type.
(mk_foreign_object): New prototype.
(struct scheme_interface): Add new functions.

Patch from Thomas Munro,
https://sourceforge.net/p/tinyscheme/patches/13/

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