[vala] GIR writer: Write parent_instace and priv fields



commit 93568146e15af82783e298bcc9948796d6ed2119
Author: Abderrahim Kitouni <a kitouni gmail com>
Date:   Thu Dec 3 20:45:23 2009 +0100

    GIR writer: Write parent_instace and priv fields

 codegen/valagirwriter.vala |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 9946093..ee87ad4 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -184,6 +184,24 @@ public class Vala.GIRWriter : CodeVisitor {
 
 			write_annotations (cl);
 
+			write_indent ();
+			stream.printf ("<field name=\"parent_instance\">\n");
+			indent++;
+			write_indent ();
+			stream.printf ("<type name=\"%s\" c:type=\"%s\"/>\n", gi_type_name (cl.base_class), cl.base_class.get_cname ());
+			indent--;
+			write_indent ();
+			stream.printf("</field>\n");
+
+			write_indent ();
+			stream.printf ("<field name=\"priv\">\n");
+			indent++;
+			write_indent ();
+			stream.printf ("<type name=\"any\" c:type=\"%sPrivate*\"/>\n", cl.get_cname ());
+			indent--;
+			write_indent ();
+			stream.printf("</field>\n");
+
 			cl.accept_children (this);
 
 			indent--;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]