From 8ded597b532eda747b5d911e6991cdb0013f77a1 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 4 Jan 2008 13:19:36 +0000 Subject: [PATCH] Use the correct libffi type for pointers --- compiler/deSugar/DsForeign.lhs | 2 +- rts/Adjustor.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/deSugar/DsForeign.lhs b/compiler/deSugar/DsForeign.lhs index d7096ae..05ff8bd 100644 --- a/compiler/deSugar/DsForeign.lhs +++ b/compiler/deSugar/DsForeign.lhs @@ -656,7 +656,7 @@ primTyDescChar ty WordRep -> unsigned_word Int64Rep -> 'L' Word64Rep -> 'l' - AddrRep -> unsigned_word + AddrRep -> 'p' FloatRep -> 'f' DoubleRep -> 'd' _ -> pprPanic "primTyDescChar" (ppr ty) diff --git a/rts/Adjustor.c b/rts/Adjustor.c index 03fb5d9..8c38df6 100644 --- a/rts/Adjustor.c +++ b/rts/Adjustor.c @@ -73,6 +73,7 @@ static ffi_type * char_to_ffi_type(char c) case 's': return &ffi_type_uint16; case 'B': return &ffi_type_sint8; case 'b': return &ffi_type_uint8; + case 'p': return &ffi_type_pointer; default: barf("char_to_ffi_type: unknown type '%c'", c); } } -- 1.7.10.4