diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2014-02-10 14:07:17 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2014-02-10 14:07:17 +0000 |
| commit | 44a764cd2f97f71337a7279b97750694453541b1 (patch) | |
| tree | 781369a1a7f12d1bd2187e83671f53198049505a /src/runtime/haskell-bind/PGF2 | |
| parent | 1bcb2d06e30d9c7c06848cd5004e19a47b9a6578 (diff) | |
proper error checking in the C runtime
Diffstat (limited to 'src/runtime/haskell-bind/PGF2')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2/FFI.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/runtime/haskell-bind/PGF2/FFI.hs b/src/runtime/haskell-bind/PGF2/FFI.hs index c0a9adf0a..27ccb74ab 100644 --- a/src/runtime/haskell-bind/PGF2/FFI.hs +++ b/src/runtime/haskell-bind/PGF2/FFI.hs @@ -15,6 +15,7 @@ data GuEnum data GuExn data GuIn data GuKind +data GuType data GuString data GuStringBuf data GuMapItor @@ -36,9 +37,21 @@ foreign import ccall "gu/exn.h gu_new_exn" 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/type.h &gu_type__type" gu_type__type :: Ptr GuKind +foreign import ccall "gu/type.h &gu_type__GuErrno" + gu_type__GuErrno :: Ptr GuType + +foreign import ccall "gu/type.h &gu_type__PgfLinNonExist" + gu_type__PgfLinNonExist :: Ptr GuType + +foreign import ccall "gu/type.h &gu_type__PgfExn" + gu_type__PgfExn :: Ptr GuType + foreign import ccall "gu/string.h gu_string_in" gu_string_in :: CString -> Ptr GuPool -> IO (Ptr GuIn) |
