[libgsf] docprop: ignore deprecations only very locally.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] docprop: ignore deprecations only very locally.
- Date: Tue, 28 Jan 2020 20:57:10 +0000 (UTC)
commit 52f0ef2c0394cf3199b6c96f95ff2611222f2881
Author: Morten Welinder <terra gnome org>
Date: Tue Jan 28 15:56:35 2020 -0500
docprop: ignore deprecations only very locally.
We don't want to miss anything later.
ChangeLog | 5 +++++
gsf/gsf-docprop-vector.c | 11 +++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 28d8c7f..e44438b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-28 Morten Welinder <terra gnome org>
+
+ * gsf/gsf-docprop-vector.c: ignore deprecation warnings only very
+ locally.
+
2019-10-18 Morten Welinder <terra gnome org>
* gsf/gsf-output-gzip.c (gsf_output_gzip_class_init): Add
diff --git a/gsf/gsf-docprop-vector.c b/gsf/gsf-docprop-vector.c
index 8ae8c0e..d8f5f3c 100644
--- a/gsf/gsf-docprop-vector.c
+++ b/gsf/gsf-docprop-vector.c
@@ -24,7 +24,6 @@
#include <gsf/gsf.h>
/* TODO: Drop GValueArray when breaking API */
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
struct _GsfDocPropVector {
GObject parent;
@@ -101,7 +100,9 @@ gsf_docprop_vector_append (GsfDocPropVector *vector, GValue *value)
g_value_copy (value, &val);
g_array_append_vals (vector->ga, &val, 1);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
vector->gva = g_value_array_append (vector->gva, value);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
}
@@ -145,11 +146,13 @@ static void
gsf_docprop_vector_finalize (GObject *obj)
{
GsfDocPropVector *vector = (GsfDocPropVector *) obj;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (vector->gva != NULL) {
g_value_array_free (vector->gva);
vector->gva = NULL;
}
- g_clear_pointer(&vector->ga, g_array_unref);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ g_clear_pointer (&vector->ga, g_array_unref);
parent_class->finalize (obj);
}
@@ -165,7 +168,9 @@ gsf_docprop_vector_init (GsfDocPropVector *vector)
{
vector->ga = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 0);
g_array_set_clear_func (vector->ga, (GDestroyNotify) g_value_unset);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
vector->gva = g_value_array_new (0);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
GSF_CLASS (GsfDocPropVector, gsf_docprop_vector,
@@ -184,5 +189,3 @@ gsf_docprop_vector_new (void)
{
return g_object_new (GSF_DOCPROP_VECTOR_TYPE, NULL);
}
-
-G_GNUC_END_IGNORE_DEPRECATIONS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]