diff options
author | Justus Winter <[email protected]> | 2016-01-22 10:15:20 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-04-21 13:36:34 +0000 |
commit | fd881ecc898a033e0ca0fb226316cdd4ca27223c (patch) | |
tree | 25d6b9cdd16ff1785330399455a41d69980aa511 | |
parent | tests/gpgscm: Nicer error message. (diff) | |
download | gnupg-fd881ecc898a033e0ca0fb226316cdd4ca27223c.tar.gz gnupg-fd881ecc898a033e0ca0fb226316cdd4ca27223c.zip |
tests/gpgscm: Expose function to open streams as Scheme ports.
* tests/gpgscm/scheme.c (vtbl): Add 'port_from_file' to the vtable.
* tests/gpgscm/scheme.h (struct scheme_interface): New field
'mk_port_from_file'.
Signed-off-by: Justus Winter <[email protected]>
-rw-r--r-- | tests/gpgscm/scheme.c | 3 | ||||
-rw-r--r-- | tests/gpgscm/scheme.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c index 2cd177449..2c9fd0247 100644 --- a/tests/gpgscm/scheme.c +++ b/tests/gpgscm/scheme.c @@ -4610,7 +4610,8 @@ static struct scheme_interface vtbl ={ setimmutable, scheme_load_file, - scheme_load_string + scheme_load_string, + port_from_file }; #endif diff --git a/tests/gpgscm/scheme.h b/tests/gpgscm/scheme.h index 05ae7feb0..4ba2daa76 100644 --- a/tests/gpgscm/scheme.h +++ b/tests/gpgscm/scheme.h @@ -224,6 +224,7 @@ struct scheme_interface { void (*setimmutable)(pointer p); void (*load_file)(scheme *sc, FILE *fin); void (*load_string)(scheme *sc, const char *input); + pointer (*mk_port_from_file)(scheme *sc, FILE *f, int kind); }; #endif |