gstreamer/generator/gst-codegen.diff
Sebastian Dröge 4582abb4f3 Fork the Gtk# codegenerator for now
We unfortunately need to do this to properly generate bindings for
GstMiniObject...
2009-05-14 21:38:28 +02:00

24 lines
1.1 KiB
Diff

Index: FieldBase.cs
===================================================================
--- FieldBase.cs (Revision 134154)
+++ FieldBase.cs (Arbeitskopie)
@@ -89,7 +89,7 @@
void CheckGlue ()
{
getterName = setterName = getOffsetName = null;
- if (Access != "public")
+ if (DefaultAccess != "public" && (!elem.HasAttribute ("access") || (Access != "public" && Access != "protected" && Access != "internal")))
return;
string prefix = (container_type.NS + "Sharp_" + container_type.NS + "_" + container_type.Name).Replace(".", "__").ToLower ();
@@ -154,8 +154,9 @@
StreamWriter sw = gen_info.Writer;
string modifiers = elem.HasAttribute ("new_flag") ? "new " : "";
bool is_struct = table.IsStruct (CType) || table.IsBoxed (CType);
+ string access = elem.HasAttribute ("access") ? elem.GetAttribute ("access") : "public";
- sw.WriteLine (indent + "public " + modifiers + CSType + " " + Name + " {");
+ sw.WriteLine (indent + access + " " + modifiers + CSType + " " + Name + " {");
if (Getter != null) {
sw.Write (indent + "\tget ");