[glib] schema source: avoid introspection confusion
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] schema source: avoid introspection confusion
- Date: Thu, 17 Nov 2011 14:06:21 +0000 (UTC)
commit 6339b5fe2de6e49807938983805152bd7c94ef0a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Nov 16 14:53:03 2011 -0500
schema source: avoid introspection confusion
Any method that has its prefix'd argument as its first parameter will be
interpreted by introspection as a method. We don't want this, so we need
to swap the first two parameters.
gio/gsettingsschema.c | 4 ++--
gio/gsettingsschema.h | 4 ++--
gio/tests/gsettings.c | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index 235349a..95aeca4 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -95,8 +95,8 @@ g_settings_schema_source_unref (GSettingsSchemaSource *source)
}
GSettingsSchemaSource *
-g_settings_schema_source_new_from_directory (GSettingsSchemaSource *parent,
- const gchar *directory,
+g_settings_schema_source_new_from_directory (const gchar *directory,
+ GSettingsSchemaSource *parent,
gboolean trusted,
GError **error)
{
diff --git a/gio/gsettingsschema.h b/gio/gsettingsschema.h
index b3c2cd5..b6974df 100644
--- a/gio/gsettingsschema.h
+++ b/gio/gsettingsschema.h
@@ -33,8 +33,8 @@ GSettingsSchemaSource * g_settings_schema_source_get_default (void);
GSettingsSchemaSource * g_settings_schema_source_ref (GSettingsSchemaSource *source);
void g_settings_schema_source_unref (GSettingsSchemaSource *source);
-GSettingsSchemaSource * g_settings_schema_source_new_from_directory (GSettingsSchemaSource *parent,
- const gchar *directory,
+GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory,
+ GSettingsSchemaSource *parent,
gboolean trusted,
GError **error);
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index 968a5ee..bb21bcd 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -1903,12 +1903,12 @@ test_schema_source (void)
/* make sure it fails properly */
parent = g_settings_schema_source_get_default ();
- source = g_settings_schema_source_new_from_directory (parent, "/path/that/does/not/exist", TRUE, &error);
+ source = g_settings_schema_source_new_from_directory ("/path/that/does/not/exist", parent, TRUE, &error);
g_assert (source == NULL);
g_clear_error (&error);
/* create a source with the parent */
- source = g_settings_schema_source_new_from_directory (parent, "schema-source", TRUE, &error);
+ source = g_settings_schema_source_new_from_directory ("schema-source", parent, TRUE, &error);
g_assert_no_error (error);
g_assert (source != NULL);
@@ -1949,7 +1949,7 @@ test_schema_source (void)
g_settings_schema_source_unref (source);
/* try again, but with no parent */
- source = g_settings_schema_source_new_from_directory (NULL, "schema-source", FALSE, NULL);
+ source = g_settings_schema_source_new_from_directory ("schema-source", NULL, FALSE, NULL);
g_assert (source != NULL);
/* should not find it this time, even if recursive... */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]