[gtkhtml] Remove NULL checks for GObject methods.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Remove NULL checks for GObject methods.
- Date: Sat, 12 Feb 2011 17:53:34 +0000 (UTC)
commit ab4e313bf2eb8d500d692ca764a5d75bc5266c50
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Feb 12 11:09:09 2011 -0500
Remove NULL checks for GObject methods.
As of GLib 2.28 all GObject virtual methods, including constructed(),
are safe to chain up to unconditionally. Remove unnecessary checks.
gtkhtml/gtkhtml.c | 4 ++--
gtkhtml/htmlgdkpainter.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
index 4ec4b46..94f7d1c 100644
--- a/gtkhtml/gtkhtml.c
+++ b/gtkhtml/gtkhtml.c
@@ -836,8 +836,8 @@ dispose (GObject *object)
html->engine = NULL;
}
- if (G_OBJECT_CLASS (parent_class)->dispose != NULL)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
GtkHTML *
diff --git a/gtkhtml/htmlgdkpainter.c b/gtkhtml/htmlgdkpainter.c
index 6bc4fdd..27fa197 100644
--- a/gtkhtml/htmlgdkpainter.c
+++ b/gtkhtml/htmlgdkpainter.c
@@ -62,9 +62,8 @@ finalize (GObject *object)
painter->surface = NULL;
}
- if (G_OBJECT_CLASS (parent_class)->finalize) {
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
- }
+ /* Chain up to parent's finalize() method. */
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]