[glib/th/gobject-new-parameter-list: 986/987] object: use guint type for n_params argument of g_object_new_is_valid_property()
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/th/gobject-new-parameter-list: 986/987] object: use guint type for n_params argument of g_object_new_is_valid_property()
- Date: Wed, 18 Nov 2020 14:11:55 +0000 (UTC)
commit 355c99a077c1ae4a0d9be3f9c21ab93af0a673ca
Author: Thomas Haller <thaller redhat com>
Date: Thu Dec 12 11:57:25 2019 +0100
object: use guint type for n_params argument of g_object_new_is_valid_property()
Two out of three callers pass the count argument from a variable
of type guint. And the third is currently an always positive gint.
We should use the correct integer type that matches the type as it
used otherwise.
gobject/gobject.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 6e9c44a1e..3e860da26 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2005,9 +2005,10 @@ g_object_new_is_valid_property (GType object_type,
GParamSpec *pspec,
const char *name,
GObjectConstructParam *params,
- int n_params)
+ guint n_params)
{
- gint i;
+ guint i;
+
if (G_UNLIKELY (pspec == NULL))
{
g_critical ("%s: object class '%s' has no property named '%s'",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]