Update of /cvsroot/gtk2hs/gtk2hs/tools/c2hs/gen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16252/tools/c2hs/gen
Modified Files:
GenBind.hs
Log Message:
Apply a couple of patches that we had in our old c2hs tree to our new one.
This makes c2hs understand hierarchical module names and fixes the handling of
typedef'ed C types.
Also make GConfValue.chs & GConfClient.chs work with our new c2hs. It's not
entirely obvious to me if this is an improvement in c2hs or a regression.
Index: GenBind.hs
===================================================================
RCS file: /cvsroot/gtk2hs/gtk2hs/tools/c2hs/gen/GenBind.hs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- GenBind.hs 21 Nov 2004 21:05:41 -0000 1.1
+++ GenBind.hs 8 Dec 2004 00:08:20 -0000 1.2
@@ -140,7 +140,7 @@
findTypeObj, applyPrefixToNameSpaces, isTypedef,
simplifyDecl, declrFromDecl, declrNamed, structMembers,
structName, tagName, declaredName , structFromDecl,
- funResultAndArgs, chaseDecl, findAndChaseDecl,
+ funResultAndArgs, chaseDecl, findAndChaseDecl, findObjShadow,
checkForAlias, checkForOneAliasName, lookupEnum,
lookupStructUnion, lookupDeclOrTag, isPtrDeclr,
dropPtrDeclr, isPtrDecl, getDeclOf, isFunDeclr,
@@ -507,7 +507,8 @@
-- allow `... -> fun HSTYPE' to explicitly mark function
-- types if this ever becomes important
traceInfoHsType hsName hsType
- pointerDef isStar cNameFull hsName ptrKind isNewtype hsType isFun
+ realCName <- liftM (maybe cName snd) $ findObjShadow cName
+ pointerDef isStar realCName hsName ptrKind isNewtype hsType isFun
Right tag -> do -- found a tag definition
let cNameFull = tagName tag
traceInfoCName "tag definition" cNameFull
|