]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Do not use gpointer for generic types
authorJürg Billeter <j@bitron.ch>
Sat, 5 Jun 2010 07:49:17 +0000 (09:49 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 5 Jun 2010 08:12:10 +0000 (10:12 +0200)
vala/valagenerictype.vala

index aca48a3723fb4e916443a922ceef058998513caa..f908d0686f95a12eb57cb8db01a8e625dc812015 100644 (file)
@@ -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 *";
                }
        }