mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
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
This commit is contained in:
parent
6d88a2f822
commit
84475e4320
@ -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
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 --- */
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user