[gdk-pixbuf/deprecated-timeval-stable: 1/8] Disable deprecation warnings for GTimeVal
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/deprecated-timeval-stable: 1/8] Disable deprecation warnings for GTimeVal
- Date: Sun, 8 Sep 2019 17:17:21 +0000 (UTC)
commit cd924d5a8589d1262591b056052b8d1c2aed7b63
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Jul 29 18:30:37 2019 +0100
Disable deprecation warnings for GTimeVal
GLib 2.62 deprecated GTimeVal and GTime because they are not Y2038-safe.
Since we expose these types in our public API, we need to disable
warnings to avoid projects breaking horribly just by importing
gdk-pixbuf.h.
Sadly, GdkPixbufAnimation public types not only require GTimeVal in
virtual function signatures for loaders, but they also do not have any
room left in the class vtable for adding int64 variants.
gdk-pixbuf/gdk-pixbuf-animation.c | 1 +
gdk-pixbuf/gdk-pixbuf-animation.h | 9 +++++++++
2 files changed, 10 insertions(+)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 3c1111a13..66a037c20 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.c
+++ b/gdk-pixbuf/gdk-pixbuf-animation.c
@@ -21,6 +21,7 @@
*/
#include "config.h"
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <errno.h>
#include "gdk-pixbuf-private.h"
#include "gdk-pixbuf-animation.h"
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.h b/gdk-pixbuf/gdk-pixbuf-animation.h
index 8691709f5..0aa788d79 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.h
+++ b/gdk-pixbuf/gdk-pixbuf-animation.h
@@ -106,9 +106,12 @@ gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *a
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation
*animation,
const GTimeVal
*start_time);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_animation_iter_get_type (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_ALL
@@ -117,9 +120,11 @@ GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter,
const GTimeVal
*current_time);
+G_GNUC_END_IGNORE_DEPRECATIONS
#ifdef GDK_PIXBUF_ENABLE_BACKEND
@@ -150,6 +155,7 @@ struct _GdkPixbufAnimation {
};
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
struct _GdkPixbufAnimationClass {
GObjectClass parent_class;
@@ -167,6 +173,7 @@ struct _GdkPixbufAnimationClass {
const GTimeVal *start_time);
};
+G_GNUC_END_IGNORE_DEPRECATIONS
@@ -196,6 +203,7 @@ struct _GdkPixbufAnimationIter {
};
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
struct _GdkPixbufAnimationIterClass {
GObjectClass parent_class;
@@ -210,6 +218,7 @@ struct _GdkPixbufAnimationIterClass {
gboolean (*advance) (GdkPixbufAnimationIter *iter,
const GTimeVal *current_time);
};
+G_GNUC_END_IGNORE_DEPRECATIONS
GDK_PIXBUF_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]