[vala/wip/attributes: 34/100] codegen: Add get_ccode_destroy_notify_pos



commit 24bd92278a119f6f72af37cf95a0ba72b57d9642
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Jun 28 19:38:37 2011 +0200

    codegen: Add get_ccode_destroy_notify_pos

 codegen/valaccodebasemodule.vala |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 8f2e1ce..9d47982 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5751,6 +5751,19 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 		}
 	}
 
+	public static double get_ccode_destroy_notify_pos (CodeNode node) {
+		var a = node.get_attribute ("CCode");
+		if (a != null && a.has_argument ("destroy_notify_pos")) {
+			return a.get_double ("destroy_notify_pos");
+		}
+		if (node is Parameter) {
+			var param = (Parameter) node;
+			return get_ccode_pos (param) + 0.1;
+		} else {
+			return -3;
+		}
+	}
+
 	public static double get_ccode_pos (Parameter param) {
 		return get_ccode_attribute(param).pos;
 	}



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