diffing dir...
Tue Jul 20 03:01:51 EDT 2010 Axel.Simon@...
* Add an option to the type generator to ignore the --destructor command line spec. This allows e.g. Pixbufs to be GC'd immediatlely.
Ignore-this: fe533f76b033d2783713909f5c03eaf9
{
hunk ./gtk/hierarchy.list 18
-
+# Before these conditions, two additional properties may be given:
+# * noDestr : ignores the destructor given by the --destructor
+# command line argument and uses 'objectUnref'
+# * noEq : do not make this type an instance of Eq; used
+# if a different equality instance is manually
+# defined later
hunk ./gtk/hierarchy.list 48
- GdkPixbuf
- GdkPixbufAnimation
- GdkPixbufSimpleAnim
- GdkPixbufAnimationIter
+ GdkPixbuf noDestr
+ GdkPixbufAnimation noDestr
+ GdkPixbufSimpleAnim noDestr
+ GdkPixbufAnimationIter noDestr
hunk ./tools/hierarchyGen/TypeGen.hs 26
- tiNoEqualInst :: Bool
+ tiNoEqualInst :: Bool,
+ tiDefaultDestr :: Bool
hunk ./tools/hierarchyGen/TypeGen.hs 76
- (name,specialQuery,rem'') = case (dropWhile isBlank rem') of
+ (defDestr,rem'') = [_$_]
+ let r = dropWhile isBlank rem' in
+ if "noDestr" `isPrefixOf` r then (True, drop 7 r) else (False, r)
+ (name,specialQuery,rem''') = case (dropWhile isBlank rem'') of
hunk ./tools/hierarchyGen/TypeGen.hs 85
- (tyName, (tyName, TypeInfo origCName (Just tyQuery) eqInst), r')
- r -> (tyName, (tyName, TypeInfo origCName Nothing eqInst), r)
- r -> (origHsName, (origHsName, TypeInfo origCName Nothing eqInst), r)
+ (tyName, (tyName, TypeInfo origCName (Just tyQuery) eqInst defDestr), r')
+ r -> (tyName, (tyName, TypeInfo origCName Nothing eqInst defDestr), r)
+ r -> (origHsName, (origHsName, TypeInfo origCName Nothing eqInst defDestr), r)
hunk ./tools/hierarchyGen/TypeGen.hs 90
- (readTag, rem''') = case (dropWhile isBlank rem'') of
+ (readTag, rem'''') = case (dropWhile isBlank rem''') of
hunk ./tools/hierarchyGen/TypeGen.hs 296
- indent 0.ss "mk".ss name.ss " = (".ss name.ss ", ".ss destr.ss ")".
+ indent 0.ss "mk".ss name.ss " = (".ss name.ss ", ".
+ (case lookup name table of Just TypeInfo { tiDefaultDestr = False } -> ss destr
+ Just TypeInfo { tiDefaultDestr = True } -> ss "objectUnref").ss ")".
}
|