]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Skip ObjectPath class when using dbus-glib-1
authorJürg Billeter <j@bitron.ch>
Sun, 27 Jun 2010 20:09:36 +0000 (22:09 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 27 Jun 2010 20:09:36 +0000 (22:09 +0200)
compiler/valacompiler.vala
vapi/glib-2.0.vapi

index d406d91f1a74d3f03fa69ff64635a96fbdecd2ff..6374f907bc2b4088d3a6414e5c5ab0c2b1dd67be 100644 (file)
@@ -311,6 +311,9 @@ class Vala.Compiler {
                                if (!add_package (context, package) && !add_gir (context, package)) {
                                        Report.error (null, "%s not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
                                }
+                               if (context.profile == Profile.GOBJECT && package == "dbus-glib-1") {
+                                       context.add_define ("DBUS_GLIB");
+                               }
                        }
                        packages = null;
                }
index 3021ad9063e42f5ca1a2c62107147a2e6f83f6a0..e334bb0a70157f6db70d47bb8158c37a1757eb8d 100644 (file)
@@ -4031,11 +4031,13 @@ namespace GLib {
                public Variant end ();
        }
 
+#if !DBUS_GLIB
        [CCode (cname = "char", const_cname = "const char", copy_function = "g_strdup", free_function = "g_free", cheader_filename = "stdlib.h,string.h,glib.h", type_id = "DBUS_TYPE_G_OBJECT_PATH", marshaller_type_name = "BOXED", get_value_function = "g_value_get_boxed", set_value_function = "g_value_set_boxed", type_signature = "o")]
        public class ObjectPath : string {
                [CCode (cname = "g_strdup")]
                public ObjectPath (string path);
        }
+#endif
 
        [CCode (cname = "G_LIKELY", cheader_filename = "glib.h")]
        public static bool likely (bool expression);