From 87c734cef9defbba06a801be4668bf23e4c258e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 20 Jul 2019 16:26:56 +0200 Subject: [PATCH] cleanup: Really stop using G_TYPE_INSTANCE_GET_PRIVATE() Commit 4259cfd4c6 missed some occurences, move those to the generated get_instance_private() functions as well. https://gitlab.gnome.org/GNOME/mutter/merge_requests/691 --- clutter/clutter/clutter-script.c | 4 +--- clutter/tests/interactive/test-cogl-offscreen.c | 2 +- clutter/tests/interactive/test-cogl-tex-convert.c | 2 +- clutter/tests/interactive/test-cogl-tex-polygon.c | 2 +- clutter/tests/interactive/test-cogl-tex-tile.c | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/clutter/clutter/clutter-script.c b/clutter/clutter/clutter-script.c index 516b515e1..5914545d6 100644 --- a/clutter/clutter/clutter-script.c +++ b/clutter/clutter/clutter-script.c @@ -263,8 +263,6 @@ enum static GParamSpec *obj_props[PROP_LAST]; -#define CLUTTER_SCRIPT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CLUTTER_TYPE_SCRIPT, ClutterScriptPrivate)) - struct _ClutterScriptPrivate { GHashTable *objects; @@ -377,7 +375,7 @@ object_info_free (gpointer data) static void clutter_script_finalize (GObject *gobject) { - ClutterScriptPrivate *priv = CLUTTER_SCRIPT_GET_PRIVATE (gobject); + ClutterScriptPrivate *priv = CLUTTER_SCRIPT (gobject)->priv; g_object_unref (priv->parser); g_hash_table_destroy (priv->objects); diff --git a/clutter/tests/interactive/test-cogl-offscreen.c b/clutter/tests/interactive/test-cogl-offscreen.c index 1f99daea6..948d978fe 100644 --- a/clutter/tests/interactive/test-cogl-offscreen.c +++ b/clutter/tests/interactive/test-cogl-offscreen.c @@ -77,7 +77,7 @@ struct _TestCoglboxPrivate G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); #define TEST_COGLBOX_GET_PRIVATE(obj) \ -(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate)) +(test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) /* Coglbox implementation *--------------------------------------------------*/ diff --git a/clutter/tests/interactive/test-cogl-tex-convert.c b/clutter/tests/interactive/test-cogl-tex-convert.c index 32b752aec..0f025d703 100644 --- a/clutter/tests/interactive/test-cogl-tex-convert.c +++ b/clutter/tests/interactive/test-cogl-tex-convert.c @@ -76,7 +76,7 @@ struct _TestCoglboxPrivate G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); #define TEST_COGLBOX_GET_PRIVATE(obj) \ -(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate)) +(test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) /* Coglbox implementation *--------------------------------------------------*/ diff --git a/clutter/tests/interactive/test-cogl-tex-polygon.c b/clutter/tests/interactive/test-cogl-tex-polygon.c index a8136e4a1..2bfc60ae6 100644 --- a/clutter/tests/interactive/test-cogl-tex-polygon.c +++ b/clutter/tests/interactive/test-cogl-tex-polygon.c @@ -78,7 +78,7 @@ struct _TestCoglboxPrivate G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); #define TEST_COGLBOX_GET_PRIVATE(obj) \ -(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate)) +((TestCoglboxPrivate *)test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) /* Coglbox implementation *--------------------------------------------------*/ diff --git a/clutter/tests/interactive/test-cogl-tex-tile.c b/clutter/tests/interactive/test-cogl-tex-tile.c index 2f67db735..09b2a445f 100644 --- a/clutter/tests/interactive/test-cogl-tex-tile.c +++ b/clutter/tests/interactive/test-cogl-tex-tile.c @@ -77,7 +77,7 @@ struct _TestCoglboxPrivate G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR); #define TEST_COGLBOX_GET_PRIVATE(obj) \ -(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate)) +(test_coglbox_get_instance_private (TEST_COGLBOX ((obj)))) /* Coglbox implementation *--------------------------------------------------*/