Add MiniObject code generator specific cases at more places
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 2 Jun 2009 10:34:18 +0000 (12:34 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 2 Jun 2009 10:34:18 +0000 (12:34 +0200)
generator/Ctor.cs
generator/DefaultSignalHandler.cs
generator/Method.cs
generator/ReturnValue.cs

index 776b084c338837e56a1eb38bebab3d68dcedf13a..e4ef118176a036056c08977e5379a3c68bed2f5a 100644 (file)
@@ -37,7 +37,7 @@ namespace GtkSharp.Generation {
                {\r
                        if (elem.HasAttribute ("preferred"))\r
                                preferred = true;\r
-                       if (implementor is ObjectGen)\r
+                       if (implementor is ObjectGen || implementor is MiniObjectGen)\r
                                needs_chaining = true;\r
                        name = implementor.Name;\r
                }\r
index 989310808b24d45943e612fee786df2cf1113081..2c73d717222f4fa8949a8c1558669c5462057c96 100644 (file)
@@ -124,6 +124,8 @@ namespace GtkSharp.Generation {
 
                                if (igen is ObjectGen)
                                        return "GLib.GType.Object";
+                               if (igen is MiniObjectGen)
+                                       return "Gst.MiniObject.GType";
                                if (igen is BoxedGen)
                                        return retval.CSType + ".GType";
                                if (igen is EnumGen)
index 1492bc463906101f4ffe1d4098a23c21b0ba52b0..50d6e9c13ba7f493c63b6a37412ce3eaf15fdcf2 100644 (file)
@@ -118,7 +118,7 @@ namespace GtkSharp.Generation {
 \r
                        if (Name == "ToString" && Parameters.Count == 0)\r
                                sw.Write("override ");\r
-                       else if (Name == "GetGType" && container_type is ObjectGen)\r
+                       else if (Name == "GetGType" && (container_type is ObjectGen || container_type is MiniObjectGen))\r
                                sw.Write("new ");\r
                        else if (Modifiers == "new " || (dup != null && ((dup.Signature != null && Signature != null && dup.Signature.ToString() == Signature.ToString()) || (dup.Signature == null && Signature == null))))\r
                                sw.Write("new ");\r
index bbf0c29050e5e6313768bc085d80c2e777e41e17..999f95896dc6f7ba628c2859ea123fc17cb7fa1e 100644 (file)
@@ -146,7 +146,7 @@ namespace GtkSharp.Generation {
 \r
                        if (IGen is IManualMarshaler)\r
                                return (IGen as IManualMarshaler).AllocNative (var);\r
-                       else if (IGen is ObjectGen && owned)\r
+                       else if ((IGen is ObjectGen || IGen is MiniObjectGen) && owned)\r
                                return var + " == null ? IntPtr.Zero : " + var + ".OwnedHandle";\r
                        else if (IGen is OpaqueGen && owned)\r
                                return var + " == null ? IntPtr.Zero : " + var + ".OwnedCopy";\r