[vala] dova: Do not use gpointer for generic types



commit 59eda067f3a3c39e6cf0dae96f43bca31c717f6f
Author: Jürg Billeter <j bitron ch>
Date:   Sat Jun 5 09:49:17 2010 +0200

    dova: Do not use gpointer for generic types

 vala/valagenerictype.vala |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/vala/valagenerictype.vala b/vala/valagenerictype.vala
index aca48a3..f908d06 100644
--- a/vala/valagenerictype.vala
+++ b/vala/valagenerictype.vala
@@ -1,6 +1,6 @@
 /* valagenerictype.vala
  *
- * Copyright (C) 2008  Jürg Billeter
+ * Copyright (C) 2008-2009  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -43,10 +43,14 @@ public class Vala.GenericType : DataType {
 	}
 
 	public override string? get_cname () {
-		if (value_owned) {
-			return "gpointer";
+		if (CodeContext.get ().profile == Profile.GOBJECT) {
+			if (value_owned) {
+				return "gpointer";
+			} else {
+				return "gconstpointer";
+			}
 		} else {
-			return "gconstpointer";
+			return "void *";
 		}
 	}
 



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