mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-27 12:39:52 +01:00
docs: Use G_PARAM_STATIC_STRINGS in examples and explain it more
Make it a bit clearer in the documentation that using `G_PARAM_STATIC_STRINGS` everywhere is a good thing. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
@@ -722,12 +722,12 @@ g_object_class_install_property (GObjectClass *class,
|
||||
* g_param_spec_int ("foo", "Foo", "Foo",
|
||||
* -1, G_MAXINT,
|
||||
* 0,
|
||||
* G_PARAM_READWRITE);
|
||||
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
*
|
||||
* obj_properties[PROP_BAR] =
|
||||
* g_param_spec_string ("bar", "Bar", "Bar",
|
||||
* NULL,
|
||||
* G_PARAM_READWRITE);
|
||||
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
*
|
||||
* gobject_class->set_property = my_object_set_property;
|
||||
* gobject_class->get_property = my_object_get_property;
|
||||
@@ -1421,7 +1421,7 @@ g_object_notify (GObject *object,
|
||||
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
||||
* 0, 100,
|
||||
* 50,
|
||||
* G_PARAM_READWRITE);
|
||||
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
* g_object_class_install_property (gobject_class,
|
||||
* PROP_FOO,
|
||||
* properties[PROP_FOO]);
|
||||
|
||||
Reference in New Issue
Block a user