[aravis] misc: remove useless compatibility code. We now depend on glib > 2.26.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] misc: remove useless compatibility code. We now depend on glib > 2.26.
- Date: Sun, 28 Apr 2013 13:53:43 +0000 (UTC)
commit c63e56e3eec5e7ea6f6270a3acc5e0d87ad44cca
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Apr 28 15:53:10 2013 +0200
misc: remove useless compatibility code. We now depend on glib > 2.26.
src/arvmisc.h | 80 +--------------------------------------------------------
1 files changed, 1 insertions(+), 79 deletions(-)
---
diff --git a/src/arvmisc.h b/src/arvmisc.h
index d447d1b..ae7b4bc 100644
--- a/src/arvmisc.h
+++ b/src/arvmisc.h
@@ -71,87 +71,9 @@ const char * arv_pixel_format_to_gst_caps_string (ArvPixelFormat pixel_format)
ArvPixelFormat arv_pixel_format_from_gst_caps (const char *name, int bpp, int depth,
guint32 fourcc);
/*
- Compatibility with glib < 2.23
- Define G_DEFINE_INTERFACE
- G_DEFINE_INTERFACE_WITH_CODE
- G_IMPLEMENT_INTERFACE
+ Compatibility with old glib
*/
-#if !GLIB_CHECK_VERSION(2,23,0)
-
-#define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)
-#define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P)
{_C_;} _G_DEFINE_INTERFACE_EXTENDED_END()
-#define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \
- const GInterfaceInfo g_implement_interface_info = { \
- (GInterfaceInitFunc) iface_init, NULL, NULL \
- }; \
- g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
-}
-
-#define _G_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PARENT, flags) \
-\
-static void type_name##_init (TypeName *self); \
-static void type_name##_class_init (TypeName##Class *klass); \
-static gpointer type_name##_parent_class = NULL; \
-static void type_name##_class_intern_init (gpointer klass) \
-{ \
- type_name##_parent_class = g_type_class_peek_parent (klass); \
- type_name##_class_init ((TypeName##Class*) klass); \
-} \
-\
-GType \
-type_name##_get_type (void) \
-{ \
- static volatile gsize g_define_type_id__volatile = 0; \
- if (g_once_init_enter (&g_define_type_id__volatile)) \
- { \
- GType g_define_type_id = \
- g_type_register_static_simple (TYPE_PARENT, \
- g_intern_static_string (#TypeName), \
- sizeof (TypeName##Class), \
- (GClassInitFunc) type_name##_class_intern_init, \
- sizeof (TypeName), \
- (GInstanceInitFunc) type_name##_init, \
- (GTypeFlags) flags); \
- { /* custom code follows */
-#define _G_DEFINE_TYPE_EXTENDED_END() \
- /* following custom code */ \
- } \
- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
- } \
- return g_define_type_id__volatile; \
-} /* closes type_name##_get_type() */
-
-#define _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PREREQ) \
-\
-static void type_name##_default_init (TypeName##Interface *klass); \
-\
-GType \
-type_name##_get_type (void) \
-{ \
- static volatile gsize g_define_type_id__volatile = 0; \
- if (g_once_init_enter (&g_define_type_id__volatile)) \
- { \
- GType g_define_type_id = \
- g_type_register_static_simple (G_TYPE_INTERFACE, \
- g_intern_static_string (#TypeName), \
- sizeof (TypeName##Interface), \
- (GClassInitFunc)type_name##_default_init, \
- 0, \
- (GInstanceInitFunc)NULL, \
- (GTypeFlags) 0); \
- if (TYPE_PREREQ) \
- g_type_interface_add_prerequisite (g_define_type_id, TYPE_PREREQ); \
- { /* custom code follows */
-#define _G_DEFINE_INTERFACE_EXTENDED_END() \
- /* following custom code */ \
- } \
- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
- } \
- return g_define_type_id__volatile; \
-} /* closes type_name##_get_type() */
-#endif
-
#if !GLIB_CHECK_VERSION(2,36,0)
#define arv_g_type_init() g_type_init()
#else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]