[project @ 2003-06-12 10:31:29 by malcolm]
authormalcolm <unknown>
Thu, 12 Jun 2003 10:31:29 +0000 (10:31 +0000)
committermalcolm <unknown>
Thu, 12 Jun 2003 10:31:29 +0000 (10:31 +0000)
For nhc98, temporarily make foreignPtrToPtr an alias for unsafeForeignPtrToPtr
until ghc and hugs catch up.

Foreign/ForeignPtr.hs

index 6d7ea1a..a92ec45 100644 (file)
@@ -23,7 +23,7 @@ module Foreign.ForeignPtr
         , newForeignPtr
         , addForeignPtrFinalizer
        , withForeignPtr
-       , foreignPtrToPtr
+       , foreignPtrToPtr       -- will soon become unsafeForeignPtrToPtr
        , touchForeignPtr
        , castForeignPtr
 
@@ -45,7 +45,7 @@ import NHC.FFI
   , newForeignPtr
   , addForeignPtrFinalizer
   , withForeignPtr
-  , foreignPtrToPtr
+  , unsafeForeignPtrToPtr
   , touchForeignPtr
   , castForeignPtr
   )
@@ -112,6 +112,11 @@ withForeignPtr fo io
        return r
 #endif /* ! __NHC__ */
 
+#ifdef __NHC__
+-- temporary aliasing until ghc and hugs catch up
+foreignPtrToPtr = unsafeForeignPtrToPtr
+#endif
+
 #ifdef __HUGS__
 mallocForeignPtr :: Storable a => IO (ForeignPtr a)
 mallocForeignPtr = do