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:
Niels De Graef
2019-10-29 12:30:47 +01:00
parent 4e8d058828
commit e12893754e

View File

@@ -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))