aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:39 +0800
commitc003c99a75587ba39a45d164272760c33f9666b5 (patch)
treead6d0583fa9e8f078fb1c118f994371d2f1f79d8 /libgnomecanvas
parentf55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff)
downloadgsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.zst
gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.zip
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'libgnomecanvas')
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c3
-rw-r--r--libgnomecanvas/gnome-canvas-rect.c6
2 files changed, 2 insertions, 7 deletions
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index fbe673d4c0..fa6d403959 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -99,8 +99,7 @@ gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
static void
gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *gcp)
{
- gcp->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- gcp, GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufPrivate);
+ gcp->priv = G_TYPE_INSTANCE_GET_PRIVATE (gcp, GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufPrivate);
}
/* Dispose handler for the pixbuf canvas item */
diff --git a/libgnomecanvas/gnome-canvas-rect.c b/libgnomecanvas/gnome-canvas-rect.c
index 3cf71bd1b0..b75a177c81 100644
--- a/libgnomecanvas/gnome-canvas-rect.c
+++ b/libgnomecanvas/gnome-canvas-rect.c
@@ -28,10 +28,6 @@
#include "gnome-canvas-rect.h"
-#define GNOME_CANVAS_RECT_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), GNOME_TYPE_CANVAS_RECT, GnomeCanvasRectPrivate))
-
struct _GnomeCanvasRectPrivate {
cairo_path_t *path; /* Our bezier path representation */
@@ -704,7 +700,7 @@ gnome_canvas_rect_class_init (GnomeCanvasRectClass *class)
static void
gnome_canvas_rect_init (GnomeCanvasRect *rect)
{
- rect->priv = GNOME_CANVAS_RECT_GET_PRIVATE (rect);
+ rect->priv = G_TYPE_INSTANCE_GET_PRIVATE (rect, GNOME_TYPE_CANVAS_RECT, GnomeCanvasRectPrivate);
rect->priv->scale = 1.0;