From 818d15a08029375b815ad2534daddcb43592f9ef Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Sat, 13 Dec 2008 06:34:01 -0500 Subject: [PATCH] fixed a bug in ffi callouts when the type is [un]signed-long on 32-bit. --- scheme/last-revision | 2 +- src/ikarus-ffi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scheme/last-revision b/scheme/last-revision index c105be5..cba3132 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1715 +1716 diff --git a/src/ikarus-ffi.c b/src/ikarus-ffi.c index 610a675..6e6dff4 100644 --- a/src/ikarus-ffi.c +++ b/src/ikarus-ffi.c @@ -58,8 +58,8 @@ scheme_to_ffi_type_cast(ikptr nptr){ case 5: return &ffi_type_sint16; case 6: return &ffi_type_uint32; case 7: return &ffi_type_sint32; - case 8: return &ffi_type_uint64; - case 9: return &ffi_type_sint64; + case 8: return (sizeof(long)==4)?&ffi_type_uint32:&ffi_type_uint64; + case 9: return (sizeof(long)==4)?&ffi_type_sint32:&ffi_type_sint64; case 10: return &ffi_type_float; case 11: return &ffi_type_double; case 12: return &ffi_type_pointer;