[vala] vapigen: Support virtual="0"



commit 6dfc05119fd2c42ae1a0ba309888243c69898c1f
Author: Jürg Billeter <j bitron ch>
Date:   Mon Aug 31 22:09:45 2009 +0200

    vapigen: Support virtual="0"

 vapigen/valagidlparser.vala |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index e8ee349..dd190db 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -1697,6 +1697,19 @@ public class Vala.GIdlParser : CodeVisitor {
 			m.is_virtual = !(m.is_abstract || is_interface);
 			m.is_abstract = m.is_abstract || is_interface;
 
+			var attributes = get_attributes (symbol);
+			if (attributes != null) {
+				foreach (string attr in attributes) {
+					var nv = attr.split ("=", 2);
+					if (nv[0] == "virtual") {
+						if (eval (nv[1]) == "0") {
+							m.is_virtual = false;
+							m.is_abstract = false;
+						}
+					}
+				}
+			}
+
 			if (func == null) {
 				m.attributes.append (new Attribute ("NoWrapper", null));
 			}



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