[glib] build: Prototype GType accessors for private classes
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] build: Prototype GType accessors for private classes
- Date: Fri, 2 Nov 2012 13:05:19 +0000 (UTC)
commit 84475e4320347e637ac2fc84c9dc28b1668c8772
Author: Colin Walters <walters verbum org>
Date: Thu Nov 1 19:36:15 2012 -0400
build: Prototype GType accessors for private classes
Otherwise we fail to build with -Werror=missing-prototypes.
https://bugzilla.gnome.org/show_bug.cgi?id=687385
gio/gmenumodel.c | 4 ++++
gio/gresourcefile.c | 2 ++
gio/tests/gdbus-peer-object-manager.c | 1 +
gio/tests/proxy-test.c | 5 +++++
gobject/tests/param.c | 1 +
tests/refcount/closures.c | 1 +
tests/refcount/properties3.c | 1 +
tests/refcount/properties4.c | 1 +
8 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gio/gmenumodel.c b/gio/gmenumodel.c
index 47860d2..f9cd826 100644
--- a/gio/gmenumodel.c
+++ b/gio/gmenumodel.c
@@ -195,6 +195,8 @@ typedef struct
typedef GMenuLinkIterClass GMenuLinkHashIterClass;
+static GType g_menu_link_hash_iter_get_type (void);
+
G_DEFINE_TYPE (GMenuLinkHashIter, g_menu_link_hash_iter, G_TYPE_MENU_LINK_ITER)
static gboolean
@@ -249,6 +251,8 @@ typedef struct
typedef GMenuAttributeIterClass GMenuAttributeHashIterClass;
+static GType g_menu_attribute_hash_iter_get_type (void);
+
G_DEFINE_TYPE (GMenuAttributeHashIter, g_menu_attribute_hash_iter, G_TYPE_MENU_ATTRIBUTE_ITER)
static gboolean
diff --git a/gio/gresourcefile.c b/gio/gresourcefile.c
index e399e54..de26246 100644
--- a/gio/gresourcefile.c
+++ b/gio/gresourcefile.c
@@ -72,6 +72,8 @@ static void g_resource_file_file_iface_init (GFileIface *iface);
static GFileAttributeInfoList *resource_writable_attributes = NULL;
static GFileAttributeInfoList *resource_writable_namespaces = NULL;
+static GType _g_resource_file_enumerator_get_type (void);
+
#define G_TYPE_RESOURCE_FILE_ENUMERATOR (_g_resource_file_enumerator_get_type ())
#define G_RESOURCE_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_RESOURCE_FILE_ENUMERATOR, GResourceFileEnumerator))
#define G_RESOURCE_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_RESOURCE_FILE_ENUMERATOR, GResourceFileEnumeratorClass))
diff --git a/gio/tests/gdbus-peer-object-manager.c b/gio/tests/gdbus-peer-object-manager.c
index 908003b..7a19c71 100644
--- a/gio/tests/gdbus-peer-object-manager.c
+++ b/gio/tests/gdbus-peer-object-manager.c
@@ -39,6 +39,7 @@ typedef struct {
GDBusInterfaceSkeletonClass parent_class;
} MockInterfaceClass;
+static GType mock_interface_get_type (void);
G_DEFINE_TYPE (MockInterface, mock_interface, G_TYPE_DBUS_INTERFACE_SKELETON);
static void
diff --git a/gio/tests/proxy-test.c b/gio/tests/proxy-test.c
index 842e7d9..da0e837 100644
--- a/gio/tests/proxy-test.c
+++ b/gio/tests/proxy-test.c
@@ -94,6 +94,7 @@ typedef struct {
static void g_test_proxy_resolver_iface_init (GProxyResolverInterface *iface);
+static GType _g_test_proxy_resolver_get_type (void);
#define g_test_proxy_resolver_get_type _g_test_proxy_resolver_get_type
G_DEFINE_TYPE_WITH_CODE (GTestProxyResolver, g_test_proxy_resolver, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_PROXY_RESOLVER,
@@ -210,6 +211,7 @@ typedef struct {
GObjectClass parent_class;
} GProxyBaseClass;
+static GType _g_proxy_base_get_type (void);
#define g_proxy_base_get_type _g_proxy_base_get_type
G_DEFINE_ABSTRACT_TYPE (GProxyBase, g_proxy_base, G_TYPE_OBJECT)
@@ -313,6 +315,7 @@ typedef GProxyBaseClass GProxyAClass;
static void g_proxy_a_iface_init (GProxyInterface *proxy_iface);
+static GType _g_proxy_a_get_type (void);
#define g_proxy_a_get_type _g_proxy_a_get_type
G_DEFINE_TYPE_WITH_CODE (GProxyA, g_proxy_a, g_proxy_base_get_type (),
G_IMPLEMENT_INTERFACE (G_TYPE_PROXY,
@@ -357,6 +360,7 @@ typedef GProxyBaseClass GProxyBClass;
static void g_proxy_b_iface_init (GProxyInterface *proxy_iface);
+static GType _g_proxy_b_get_type (void);
#define g_proxy_b_get_type _g_proxy_b_get_type
G_DEFINE_TYPE_WITH_CODE (GProxyB, g_proxy_b, g_proxy_base_get_type (),
G_IMPLEMENT_INTERFACE (G_TYPE_PROXY,
@@ -665,6 +669,7 @@ create_server (ServerData *data, GCancellable *cancellable)
typedef GResolver GFakeResolver;
typedef GResolverClass GFakeResolverClass;
+static GType g_fake_resolver_get_type (void);
G_DEFINE_TYPE (GFakeResolver, g_fake_resolver, G_TYPE_RESOLVER)
static void
diff --git a/gobject/tests/param.c b/gobject/tests/param.c
index 5b14fcf..0c9edab 100644
--- a/gobject/tests/param.c
+++ b/gobject/tests/param.c
@@ -457,6 +457,7 @@ static void test_object_c_init (TestObjectC *c) { }
* That gives 21 (7 * 3) properties that will be installed.
*/
typedef GTypeInterface TestInterfaceInterface;
+static GType test_interface_get_type (void);
//typedef struct _TestInterface TestInterface;
G_DEFINE_INTERFACE (TestInterface, test_interface, G_TYPE_OBJECT)
static void
diff --git a/tests/refcount/closures.c b/tests/refcount/closures.c
index de48192..cc29354 100644
--- a/tests/refcount/closures.c
+++ b/tests/refcount/closures.c
@@ -43,6 +43,7 @@ typedef struct {
#define MY_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), G_TYPE_TEST))
#define MY_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), G_TYPE_TEST, GTestClass))
+static GType my_test_get_type (void);
G_DEFINE_TYPE (GTest, my_test, G_TYPE_OBJECT);
/* --- variables --- */
diff --git a/tests/refcount/properties3.c b/tests/refcount/properties3.c
index a5e9257..5821188 100644
--- a/tests/refcount/properties3.c
+++ b/tests/refcount/properties3.c
@@ -31,6 +31,7 @@ struct _GTestClass
GObjectClass parent_class;
};
+static GType my_test_get_type (void);
G_DEFINE_TYPE (GTest, my_test, G_TYPE_OBJECT);
static volatile gboolean stopping;
diff --git a/tests/refcount/properties4.c b/tests/refcount/properties4.c
index d02a5c6..2512160 100644
--- a/tests/refcount/properties4.c
+++ b/tests/refcount/properties4.c
@@ -29,6 +29,7 @@ struct _MyBadgerClass
GObjectClass parent_class;
};
+static GType my_badger_get_type (void);
G_DEFINE_TYPE (MyBadger, my_badger, G_TYPE_OBJECT);
static void my_badger_dispose (GObject * object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]