[cheese] Avoid using G_GNUC_CONST on _get_type()



commit 5b4bc731f0212e097d2ca7662f996db5b97d31a8
Author: David King <amigadave amigadave com>
Date:   Fri Oct 10 12:25:05 2014 +0100

    Avoid using G_GNUC_CONST on _get_type()
    
    As the g_type_ensure() documentation notes, it is incorrect to mark a
    _get_type() method with G_GNUC_CONST, as it as a side effect the first
    time it is called.

 Makefile.am                              |    2 +-
 libcheese/cheese-avatar-chooser.h        |    2 +-
 libcheese/cheese-avatar-widget.h         |    2 +-
 libcheese/cheese-camera-device-monitor.h |    2 +-
 libcheese/cheese-camera-device.h         |    4 ++--
 libcheese/cheese-camera.h                |    2 +-
 libcheese/cheese-effect.h                |    2 +-
 libcheese/cheese-fileutil.h              |    2 +-
 libcheese/cheese-flash.h                 |    2 +-
 libcheese/cheese-widget.h                |    2 +-
 libcheese/totem-aspect-frame.h           |    2 +-
 libcheese/um-crop-area.h                 |    2 +-
 src/thumbview/eog-thumb-nav.h            |    2 +-
 13 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c0f6950..2cde675 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,7 +31,7 @@ libcheese/cheese-enums.h: $(cheese_enum_headers)
                --fhead "#include <glib-object.h>\n\n" \
                --fhead "G_BEGIN_DECLS\n\n" \
                --fprod "/* enumerations from @filename@ */\n" \
-               --vhead "GType @enum_name _get_type (void) G_GNUC_CONST;\n" \
+               --vhead "GType @enum_name _get_type (void);\n" \
                --vhead "#define CHEESE_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n" \
                --ftail "G_END_DECLS\n\n" \
                --ftail "#endif /* CHEESE_ENUMS_H_ */" \
diff --git a/libcheese/cheese-avatar-chooser.h b/libcheese/cheese-avatar-chooser.h
index 190b0f3..5fe4ba4 100644
--- a/libcheese/cheese-avatar-chooser.h
+++ b/libcheese/cheese-avatar-chooser.h
@@ -62,7 +62,7 @@ struct _CheeseAvatarChooser
   CheeseAvatarChooserPrivate *priv;
 };
 
-GType cheese_avatar_chooser_get_type (void) G_GNUC_CONST;
+GType cheese_avatar_chooser_get_type (void);
 
 GtkWidget *cheese_avatar_chooser_new (void);
 GdkPixbuf *cheese_avatar_chooser_get_picture (CheeseAvatarChooser *chooser);
diff --git a/libcheese/cheese-avatar-widget.h b/libcheese/cheese-avatar-widget.h
index 9b7c121..059c2aa 100644
--- a/libcheese/cheese-avatar-widget.h
+++ b/libcheese/cheese-avatar-widget.h
@@ -62,7 +62,7 @@ struct _CheeseAvatarWidget
   CheeseAvatarWidgetPrivate *priv;
 };
 
-GType cheese_avatar_widget_get_type (void) G_GNUC_CONST;
+GType cheese_avatar_widget_get_type (void);
 
 GtkWidget *cheese_avatar_widget_new (void);
 GdkPixbuf *cheese_avatar_widget_get_picture (CheeseAvatarWidget *widget);
diff --git a/libcheese/cheese-camera-device-monitor.h b/libcheese/cheese-camera-device-monitor.h
index dd7721b..081ac3b 100644
--- a/libcheese/cheese-camera-device-monitor.h
+++ b/libcheese/cheese-camera-device-monitor.h
@@ -72,7 +72,7 @@ struct _CheeseCameraDeviceMonitorClass
   void (*removed)(CheeseCameraDeviceMonitor *monitor, const gchar *uuid);
 };
 
-GType                      cheese_camera_device_monitor_get_type (void) G_GNUC_CONST;
+GType                      cheese_camera_device_monitor_get_type (void);
 CheeseCameraDeviceMonitor *cheese_camera_device_monitor_new (void);
 void                       cheese_camera_device_monitor_coldplug (CheeseCameraDeviceMonitor *monitor);
 
diff --git a/libcheese/cheese-camera-device.h b/libcheese/cheese-camera-device.h
index ca5f71e..cc97dc8 100644
--- a/libcheese/cheese-camera-device.h
+++ b/libcheese/cheese-camera-device.h
@@ -84,9 +84,9 @@ struct _CheeseVideoFormat
   gint height;
 };
 
-GType cheese_video_format_get_type (void) G_GNUC_CONST;
+GType cheese_video_format_get_type (void);
 
-GType cheese_camera_device_get_type (void) G_GNUC_CONST;
+GType cheese_camera_device_get_type (void);
 
 CheeseCameraDevice *cheese_camera_device_new (const gchar *uuid,
                                               const gchar *device_node,
diff --git a/libcheese/cheese-camera.h b/libcheese/cheese-camera.h
index 6486c64..c837e49 100644
--- a/libcheese/cheese-camera.h
+++ b/libcheese/cheese-camera.h
@@ -94,7 +94,7 @@ typedef enum
   CHEESE_CAMERA_ERROR_NO_DEVICE
 } CheeseCameraError;
 
-GType         cheese_camera_get_type (void) G_GNUC_CONST;
+GType         cheese_camera_get_type (void);
 CheeseCamera *cheese_camera_new (ClutterTexture *video_texture,
                                  const gchar    *camera_device_node,
                                  gint            x_resolution,
diff --git a/libcheese/cheese-effect.h b/libcheese/cheese-effect.h
index 29463da..c717ff4 100644
--- a/libcheese/cheese-effect.h
+++ b/libcheese/cheese-effect.h
@@ -68,7 +68,7 @@ struct _CheeseEffect
   CheeseEffectPrivate *priv;
 };
 
-GType cheese_effect_get_type (void) G_GNUC_CONST;
+GType cheese_effect_get_type (void);
 
 CheeseEffect *cheese_effect_new (const gchar *name,
                                  const gchar *pipeline_desc);
diff --git a/libcheese/cheese-fileutil.h b/libcheese/cheese-fileutil.h
index a470427..dfdf766 100644
--- a/libcheese/cheese-fileutil.h
+++ b/libcheese/cheese-fileutil.h
@@ -91,7 +91,7 @@ typedef enum
 } CheeseMediaMode;
 
 
-GType           cheese_fileutil_get_type (void) G_GNUC_CONST;
+GType           cheese_fileutil_get_type (void);
 CheeseFileUtil *cheese_fileutil_new (void);
 
 const gchar *cheese_fileutil_get_video_path (CheeseFileUtil *fileutil);
diff --git a/libcheese/cheese-flash.h b/libcheese/cheese-flash.h
index cc41ed1..93b46b2 100644
--- a/libcheese/cheese-flash.h
+++ b/libcheese/cheese-flash.h
@@ -59,7 +59,7 @@ struct _CheeseFlash
   CheeseFlashPrivate *priv;
 };
 
-GType        cheese_flash_get_type (void) G_GNUC_CONST;
+GType        cheese_flash_get_type (void);
 CheeseFlash *cheese_flash_new (GtkWidget *parent);
 
 void cheese_flash_fire (CheeseFlash *flash);
diff --git a/libcheese/cheese-widget.h b/libcheese/cheese-widget.h
index 3aacaa7..dd848ca 100644
--- a/libcheese/cheese-widget.h
+++ b/libcheese/cheese-widget.h
@@ -64,7 +64,7 @@ struct _CheeseWidget
   CheeseWidgetPrivate *priv;
 };
 
-GType cheese_widget_get_type (void) G_GNUC_CONST;
+GType cheese_widget_get_type (void);
 
 GtkWidget *cheese_widget_new (void);
 void       cheese_widget_get_error (CheeseWidget *widget, GError **error);
diff --git a/libcheese/totem-aspect-frame.h b/libcheese/totem-aspect-frame.h
index e5cf3e4..886fc49 100644
--- a/libcheese/totem-aspect-frame.h
+++ b/libcheese/totem-aspect-frame.h
@@ -62,7 +62,7 @@ struct _TotemAspectFrameClass
   ClutterActorClass parent_class;
 };
 
-GType           totem_aspect_frame_get_type     (void) G_GNUC_CONST;
+GType           totem_aspect_frame_get_type     (void);
 
 ClutterActor *  totem_aspect_frame_new          (void);
 
diff --git a/libcheese/um-crop-area.h b/libcheese/um-crop-area.h
index ddd1e97..03e9c35 100644
--- a/libcheese/um-crop-area.h
+++ b/libcheese/um-crop-area.h
@@ -59,7 +59,7 @@ struct _UmCropArea {
         GtkDrawingArea parent_instance;
 };
 
-GType      um_crop_area_get_type             (void) G_GNUC_CONST;
+GType      um_crop_area_get_type             (void);
 
 GtkWidget *um_crop_area_new                  (void);
 GdkPixbuf *um_crop_area_get_picture          (UmCropArea *area);
diff --git a/src/thumbview/eog-thumb-nav.h b/src/thumbview/eog-thumb-nav.h
index 7fe0202..b63374a 100644
--- a/src/thumbview/eog-thumb-nav.h
+++ b/src/thumbview/eog-thumb-nav.h
@@ -50,7 +50,7 @@ struct _EogThumbNavClass
   GtkBoxClass parent_class;
 };
 
-GType eog_thumb_nav_get_type (void) G_GNUC_CONST;
+GType eog_thumb_nav_get_type (void);
 
 GtkWidget *eog_thumb_nav_new (GtkWidget *thumbview,
                               gboolean   show_buttons);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]