[vte] pty: Use G_ADD_PRIVATE instead of g_type_class_add_private
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] pty: Use G_ADD_PRIVATE instead of g_type_class_add_private
- Date: Mon, 18 Apr 2016 16:14:54 +0000 (UTC)
commit 6edda4d403067c2a8d2d8b5d59879e11fbbe92fd
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Apr 18 13:14:11 2016 +0200
pty: Use G_ADD_PRIVATE instead of g_type_class_add_private
https://bugzilla.gnome.org/show_bug.cgi?id=765210
src/pty.cc | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/pty.cc b/src/pty.cc
index ea88c77..a615e41 100644
--- a/src/pty.cc
+++ b/src/pty.cc
@@ -781,6 +781,7 @@ vte_pty_initable_iface_init (GInitableIface *iface)
/* GObjectClass impl */
G_DEFINE_TYPE_WITH_CODE (VtePty, vte_pty, G_TYPE_OBJECT,
+ G_ADD_PRIVATE (VtePty)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, vte_pty_initable_iface_init))
static void
@@ -788,7 +789,7 @@ vte_pty_init (VtePty *pty)
{
VtePtyPrivate *priv;
- priv = pty->priv = G_TYPE_INSTANCE_GET_PRIVATE (pty, VTE_TYPE_PTY, VtePtyPrivate);
+ priv = pty->priv = (VtePtyPrivate *)vte_pty_get_instance_private (pty);
priv->flags = VTE_PTY_DEFAULT;
priv->pty_fd = -1;
@@ -861,8 +862,6 @@ vte_pty_class_init (VtePtyClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private(object_class, sizeof(VtePtyPrivate));
-
object_class->set_property = vte_pty_set_property;
object_class->get_property = vte_pty_get_property;
object_class->finalize = vte_pty_finalize;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]