projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'coloured-core' of https://github.com/nominolo/ghc into coloured-core
[ghc-hetmet.git]
/
compiler
/
ghci
/
LibFFI.hsc
diff --git
a/compiler/ghci/LibFFI.hsc
b/compiler/ghci/LibFFI.hsc
index
7f24d01
..
86714ef
100644
(file)
--- a/
compiler/ghci/LibFFI.hsc
+++ b/
compiler/ghci/LibFFI.hsc
@@
-16,13
+16,12
@@
module LibFFI (
import TyCon
import ForeignCall
import Panic
import TyCon
import ForeignCall
import Panic
-import Outputable
+-- import Outputable
import Constants
import Foreign
import Foreign.C
import Text.Printf
import Constants
import Foreign
import Foreign.C
import Text.Printf
-import Control.Exception
----------------------------------------------------------------------------
----------------------------------------------------------------------------
@@
-45,7
+44,7
@@
prepForeignCall cconv arg_types result_type
let res_ty = primRepToFFIType result_type
r <- ffi_prep_cif cif abi (fromIntegral n_args) res_ty arg_arr
if (r /= fFI_OK)
let res_ty = primRepToFFIType result_type
r <- ffi_prep_cif cif abi (fromIntegral n_args) res_ty arg_arr
if (r /= fFI_OK)
- then throwDyn (InstallationError
+ then ghcError (InstallationError
(printf "prepForeignCallFailed: %d" (show r)))
else return cif
(printf "prepForeignCallFailed: %d" (show r)))
else return cif
@@
-54,7
+53,8
@@
convToABI CCallConv = fFI_DEFAULT_ABI
#ifdef mingw32_HOST_OS
convToABI StdCallConv = fFI_STDCALL
#endif
#ifdef mingw32_HOST_OS
convToABI StdCallConv = fFI_STDCALL
#endif
-convToABI _ = panic "convToABI: convention not supported"
+-- unknown conventions are mapped to the default, (#3336)
+convToABI _ = fFI_DEFAULT_ABI
-- c.f. DsForeign.primTyDescChar
primRepToFFIType :: PrimRep -> Ptr C_ffi_type
-- c.f. DsForeign.primTyDescChar
primRepToFFIType :: PrimRep -> Ptr C_ffi_type