summaryrefslogtreecommitdiff
path: root/src/runtime/haskell-bind/PGF2
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-10-09 13:44:26 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-10-09 13:44:26 +0000
commit86e9acc7a7b714307e08ab25117ca03cecb00936 (patch)
tree38dd7904147567c4e97e1f62eca64739d3a516eb /src/runtime/haskell-bind/PGF2
parent8e3ed825a8dde13894a44169ddc09cc2c2be60b2 (diff)
throw away the long obsolete runtime type information in the C runtime
Diffstat (limited to 'src/runtime/haskell-bind/PGF2')
-rw-r--r--src/runtime/haskell-bind/PGF2/FFI.hs24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/runtime/haskell-bind/PGF2/FFI.hs b/src/runtime/haskell-bind/PGF2/FFI.hs
index a467f7ddc..96c5b19fa 100644
--- a/src/runtime/haskell-bind/PGF2/FFI.hs
+++ b/src/runtime/haskell-bind/PGF2/FFI.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE ForeignFunctionInterface, MagicHash #-}
module PGF2.FFI where
@@ -7,6 +7,7 @@ import Foreign.C.String
import Foreign.Ptr
import Foreign.ForeignPtr
import Control.Exception
+import GHC.Ptr
------------------------------------------------------------------
-- libgu API
@@ -37,28 +38,21 @@ foreign import ccall "gu/mem.h &gu_pool_free"
gu_pool_finalizer :: FinalizerPtr GuPool
foreign import ccall "gu/exn.h gu_new_exn"
- gu_new_exn :: Ptr GuExn -> Ptr GuKind -> Ptr GuPool -> IO (Ptr GuExn)
+ gu_new_exn :: Ptr GuPool -> IO (Ptr GuExn)
foreign import ccall "gu/exn.h gu_exn_is_raised"
gu_exn_is_raised :: Ptr GuExn -> IO Bool
-foreign import ccall "gu/exn.h gu_exn_caught"
- gu_exn_caught :: Ptr GuExn -> IO (Ptr GuType)
+foreign import ccall "gu/exn.h gu_exn_caught_"
+ gu_exn_caught :: Ptr GuExn -> CString -> IO Bool
-foreign import ccall "gu/type.h &gu_type__type"
- gu_type__type :: Ptr GuKind
+gu_exn_type_GuErrno = Ptr "GuErrno"# :: CString
-foreign import ccall "gu/type.h &gu_type__GuErrno"
- gu_type__GuErrno :: Ptr GuType
+gu_exn_type_PgfLinNonExist = Ptr "PgfLinNonExist"# :: CString
-foreign import ccall "gu/type.h &gu_type__PgfLinNonExist"
- gu_type__PgfLinNonExist :: Ptr GuType
+gu_exn_type_PgfExn = Ptr "PgfExn"# :: CString
-foreign import ccall "gu/type.h &gu_type__PgfExn"
- gu_type__PgfExn :: Ptr GuType
-
-foreign import ccall "gu/type.h &gu_type__PgfParseError"
- gu_type__PgfParseError :: Ptr GuType
+gu_exn_type_PgfParseError = Ptr "PgfParseError"# :: CString
foreign import ccall "gu/string.h gu_string_in"
gu_string_in :: CString -> Ptr GuPool -> IO (Ptr GuIn)