summaryrefslogtreecommitdiff
path: root/libguile/foreign.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-03-29 23:35:24 +0200
committerLudovic Courtès <ludo@gnu.org>2011-03-29 23:35:24 +0200
commit443f25dcff49f0a920d4149e29bcb3ae9f64ee02 (patch)
treea8cf5e59529a7016dfccbd9f30122ae821487cba /libguile/foreign.c
parent572eef50c2d902d34427945dd504ba03af666e48 (diff)
downloadguile-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.c3
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 ();
}