diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-03-29 23:35:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-03-29 23:35:24 +0200 |
commit | 443f25dcff49f0a920d4149e29bcb3ae9f64ee02 (patch) | |
tree | a8cf5e59529a7016dfccbd9f30122ae821487cba /libguile/foreign.c | |
parent | 572eef50c2d902d34427945dd504ba03af666e48 (diff) | |
download | guile-443f25dcff49f0a920d4149e29bcb3ae9f64ee02.tar.gz |
Fix `procedure->pointer' for functions returning `void'.
* libguile/foreign.c (unpack): Handle `FFI_TYPE_VOID'.
* test-suite/tests/foreign.test ("procedure->pointer")["procedures
returning void"]: New test. Reported by
Tristan Colgate <tcolgate@gmail.com>.
Diffstat (limited to 'libguile/foreign.c')
-rw-r--r-- | libguile/foreign.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/foreign.c b/libguile/foreign.c index 494ab5b4c..dbfba8770 100644 --- a/libguile/foreign.c +++ b/libguile/foreign.c @@ -905,6 +905,9 @@ unpack (const ffi_type *type, void *loc, SCM x) SCM_VALIDATE_POINTER (1, x); *(void **) loc = SCM_POINTER_VALUE (x); break; + case FFI_TYPE_VOID: + /* Do nothing. */ + break; default: abort (); } |