mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
gobject: Allow install_properties with 1 GParamSpec
`g_object_install_properties()` can be used to install multiple properties at once, _and_ to allow an optimization for property notification. Arguably, using it over `g_object_install_property()` is best practice. That being said, you can't use it if you have only a single property that is installed (yet), due to a precondition check for more than 1 pspecs.
This commit is contained in:
@@ -729,7 +729,7 @@ g_object_class_install_properties (GObjectClass *oclass,
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (G_IS_OBJECT_CLASS (oclass));
|
||||
g_return_if_fail (n_pspecs > 1);
|
||||
g_return_if_fail (n_pspecs >= 1);
|
||||
g_return_if_fail (pspecs[0] == NULL);
|
||||
|
||||
if (CLASS_HAS_DERIVED_CLASS (oclass))
|
||||
|
Reference in New Issue
Block a user