From: Duncan C. <dun...@us...> - 2005-04-08 14:00:57
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26467/tools/hierarchyGen Modified Files: TypeGen.hs Hierarchy.chs.template Log Message: Change use of foreignPtrToPtr to unsafeForeignPtrToPtr and provide backwards compatability for GHC pre-6.2. Index: Hierarchy.chs.template =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/Hierarchy.chs.template,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Hierarchy.chs.template 25 Feb 2005 01:20:17 -0000 1.3 +++ Hierarchy.chs.template 8 Apr 2005 14:00:48 -0000 1.4 @@ -32,7 +32,7 @@ @MODULE_EXPORTS@ ) where -import System.Glib.FFI (ForeignPtr, castForeignPtr, foreignPtrToPtr, +import System.Glib.FFI (ForeignPtr, castForeignPtr, unsafeForeignPtrToPtr, CULong, withForeignPtr) import System.Glib.GType (typeInstanceIsA) import GHC.Base (unsafeCoerce#) Index: TypeGen.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/hierarchyGen/TypeGen.hs,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TypeGen.hs 25 Feb 2005 01:20:17 -0000 1.12 +++ TypeGen.hs 8 Apr 2005 14:00:47 -0000 1.13 @@ -199,7 +199,7 @@ makeUpcast table (obj:_:_) = indent 0.ss "castTo".ss obj.ss " :: GObjectClass obj => obj -> ".ss obj. indent 0.ss "castTo".ss obj.ss " obj =". - indent 1.ss "if typeInstanceIsA ((foreignPtrToPtr.castForeignPtr.unGObject.toGObject) obj)". + indent 1.ss "if typeInstanceIsA ((unsafeForeignPtrToPtr.castForeignPtr.unGObject.toGObject) obj)". indent 2.ss "{#call fun unsafe ". ss (case lookup obj table of (Just (_, Just get_type_func)) -> get_type_func |