From: Duncan C. <dun...@us...> - 2004-08-10 14:51:55
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/general In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22901/gtk/general Modified Files: FFI.hs General.chs Log Message: Removed support for versions of ghc pre 5.04. ghc 5.04 supports the new FFI syntax so remove old-style "foreign export dynamic" versions. Tested with ghc 5.04 & 5.04.3 Index: General.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/General.chs,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- General.chs 29 Jul 2004 00:53:40 -0000 1.13 +++ General.chs 10 Aug 2004 14:51:46 -0000 1.14 @@ -179,20 +179,10 @@ {#pointer GDestroyNotify as DestroyNotify#} -#if __GLASGOW_HASKELL__>=600 - foreign import ccall "wrapper" mkHandler :: IO {#type gint#} -> IO Function foreign import ccall "wrapper" mkDestructor :: IO () -> IO DestroyNotify -#else - -foreign export dynamic mkHandler :: IO {#type gint#} -> IO Function - -foreign export dynamic mkDestructor :: IO () -> IO DestroyNotify - -#endif - type HandlerId = {#type guint#} -- Turn a function into a function pointer and a destructor pointer. Index: FFI.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/general/FFI.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- FFI.hs 3 Aug 2004 02:36:39 -0000 1.4 +++ FFI.hs 10 Aug 2004 14:51:46 -0000 1.5 @@ -41,18 +41,13 @@ newForeignPtr, foreignPtrToPtr, module Foreign, -#if __GLASGOW_HASKELL__>=504 module Foreign.C -#else - module CForeign -#endif ) where import Monad (liftM) import Char import LocalData(unsafePerformIO) -#if __GLASGOW_HASKELL__>=504 import Data.Bits import Foreign.C import qualified Foreign @@ -62,21 +57,9 @@ # else import Foreign hiding (with) # endif -#else -import Bits -import CForeign -import qualified Foreign -import Foreign hiding (withObject) -#endif - -#if __GLASGOW_HASKELL__>=504 with :: (Storable a) => a -> (Ptr a -> IO b) -> IO b with = Foreign.with -#else -with :: (Storable a) => a -> (Ptr a -> IO b) -> IO b -with = Foreign.withObject -#endif #if __GLASGOW_HASKELL__>=602 newForeignPtr = flip Foreign.newForeignPtr |