]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
posix: Fix dup0 wrappers in POSIX profile
authorJürg Billeter <j@bitron.ch>
Mon, 12 Oct 2009 19:31:18 +0000 (21:31 +0200)
committerJürg Billeter <j@bitron.ch>
Mon, 12 Oct 2009 19:31:18 +0000 (21:31 +0200)
codegen/valaccodebasemodule.vala

index f88bc27d6922b6ff6e167e1cabb4caf662c757d4..d146a610ce5b99fb52510176d3c36c158fab1056 100644 (file)
@@ -3395,8 +3395,12 @@ internal class Vala.CCodeBaseModule : CCodeModule {
                        if (dupid.name == "g_strdup") {
                                dup0_func = dupid.name;
                        } else if (add_wrapper (dup0_func)) {
-                               var dup0_fun = new CCodeFunction (dup0_func, "gpointer");
-                               dup0_fun.add_parameter (new CCodeFormalParameter ("self", "gpointer"));
+                               string pointer_cname = "gpointer";
+                               if (context.profile == Profile.POSIX) {
+                                       pointer_cname = "void*";
+                               }
+                               var dup0_fun = new CCodeFunction (dup0_func, pointer_cname);
+                               dup0_fun.add_parameter (new CCodeFormalParameter ("self", pointer_cname));
                                dup0_fun.modifiers = CCodeModifiers.STATIC;
                                dup0_fun.block = new CCodeBlock ();