diff options
author | Justus Winter <[email protected]> | 2016-09-19 16:42:36 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-09-19 16:49:17 +0000 |
commit | 9a0659a65c52378de1c4736a0eddf8518eb20948 (patch) | |
tree | ca0187e499e303017f69f9ba5631b50439544509 /tests/gpgscm/ffi.c | |
parent | tests: Correctly handle exceptions in resource handling macros. (diff) | |
download | gnupg-9a0659a65c52378de1c4736a0eddf8518eb20948.tar.gz gnupg-9a0659a65c52378de1c4736a0eddf8518eb20948.zip |
tests: Implement interpreter shutdown using exceptions.
* tests/gpgscm/ffi.c (ffi_init): Rename 'exit' to '_exit'.
* tests/gpgscm/ffi.scm (*interpreter-exit*): New variable.
(throw): New function.
(exit): New function.
--
This allows a proper cleanup of resources.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/gpgscm/ffi.c')
-rw-r--r-- | tests/gpgscm/ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c index 08160670f..4559f10ec 100644 --- a/tests/gpgscm/ffi.c +++ b/tests/gpgscm/ffi.c @@ -1255,7 +1255,7 @@ ffi_init (scheme *sc, const char *argv0, const char *scriptname, ffi_define_function (sc, strerror); ffi_define_function (sc, getenv); ffi_define_function (sc, setenv); - ffi_define_function (sc, exit); + ffi_define_function_name (sc, "_exit", exit); ffi_define_function (sc, open); ffi_define_function (sc, fdopen); ffi_define_function (sc, close); |