[glib/gobject-tutorial-no-priv-2-60: 881/881] docs: Remove priv pointers from the tutorial example
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/gobject-tutorial-no-priv-2-60: 881/881] docs: Remove priv pointers from the tutorial example
- Date: Fri, 20 Sep 2019 09:40:56 +0000 (UTC)
commit ad58fee969aec0ee42a193d59db9fbfe7d73763f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Jul 31 15:27:06 2019 +0100
docs: Remove priv pointers from the tutorial example
We define `ViewerFile` as a final type with fields directly in the
instance structure. This means we don't have a `priv` pointer to
dereference.
docs/reference/gobject/tut_gobject.xml | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/docs/reference/gobject/tut_gobject.xml b/docs/reference/gobject/tut_gobject.xml
index 161150ebf..947f488d1 100644
--- a/docs/reference/gobject/tut_gobject.xml
+++ b/docs/reference/gobject/tut_gobject.xml
@@ -485,14 +485,14 @@ viewer_file_set_property (GObject *object,
switch (property_id)
{
case PROP_FILENAME:
- g_free (self->priv->filename);
- self->priv->filename = g_value_dup_string (value);
- g_print ("filename: %s\n", self->priv->filename);
+ g_free (self->filename);
+ self->filename = g_value_dup_string (value);
+ g_print ("filename: %s\n", self->filename);
break;
case PROP_ZOOM_LEVEL:
- self->priv->zoom_level = g_value_get_uint (value);
- g_print ("zoom level: %u\n", self->priv->zoom_level);
+ self->zoom_level = g_value_get_uint (value);
+ g_print ("zoom level: %u\n", self->zoom_level);
break;
default:
@@ -513,11 +513,11 @@ viewer_file_get_property (GObject *object,
switch (property_id)
{
case PROP_FILENAME:
- g_value_set_string (value, self->priv->filename);
+ g_value_set_string (value, self->filename);
break;
case PROP_ZOOM_LEVEL:
- g_value_set_uint (value, self->priv->zoom_level);
+ g_value_set_uint (value, self->zoom_level);
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]