Commit 8ded597b authored by Simon Marlow's avatar Simon Marlow

Use the correct libffi type for pointers

parent 57c02891
...@@ -656,7 +656,7 @@ primTyDescChar ty ...@@ -656,7 +656,7 @@ primTyDescChar ty
WordRep -> unsigned_word WordRep -> unsigned_word
Int64Rep -> 'L' Int64Rep -> 'L'
Word64Rep -> 'l' Word64Rep -> 'l'
AddrRep -> unsigned_word AddrRep -> 'p'
FloatRep -> 'f' FloatRep -> 'f'
DoubleRep -> 'd' DoubleRep -> 'd'
_ -> pprPanic "primTyDescChar" (ppr ty) _ -> pprPanic "primTyDescChar" (ppr ty)
......
...@@ -73,6 +73,7 @@ static ffi_type * char_to_ffi_type(char c) ...@@ -73,6 +73,7 @@ static ffi_type * char_to_ffi_type(char c)
case 's': return &ffi_type_uint16; case 's': return &ffi_type_uint16;
case 'B': return &ffi_type_sint8; case 'B': return &ffi_type_sint8;
case 'b': return &ffi_type_uint8; case 'b': return &ffi_type_uint8;
case 'p': return &ffi_type_pointer;
default: barf("char_to_ffi_type: unknown type '%c'", c); default: barf("char_to_ffi_type: unknown type '%c'", c);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment