[glib/th/gobject-new-parameter-list: 1/2] 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: 1/2] object: use guint type for n_params argument of g_object_new_is_valid_property()
- Date: Mon, 24 Feb 2020 16:45:40 +0000 (UTC)
commit aef432052b29d4213ac8f46d0728f25f03dc038c
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 eea40b3ae..b5b1e88c4 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2003,9 +2003,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]