dbus/glib dbus-gobject.c,1.27,1.28
Colin Walters
walters at freedesktop.org
Thu Jun 16 12:45:51 PDT 2005
Update of /cvs/dbus/dbus/glib
In directory gabe:/tmp/cvs-serv6186/glib
Modified Files:
dbus-gobject.c
Log Message:
2005-06-16 Colin Walters <walters at verbum.org>
* glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
to iterate instead of walking to G_TYPE_INVALID.
Patch based on a patch from Ryan Gammon.
Index: dbus-gobject.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gobject.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- dbus-gobject.c 14 Jun 2005 15:55:10 -0000 1.27
+++ dbus-gobject.c 16 Jun 2005 19:45:49 -0000 1.28
@@ -1314,11 +1314,12 @@
const DBusGFuncSignature *sig = key;
GType *types;
guint ret;
+ guint i;
ret = sig->rettype;
types = sig->params;
- while (*types != G_TYPE_INVALID)
+ for (i = 0; i < sig->n_params; i++)
{
ret += (int) (*types);
types++;
@@ -1335,22 +1336,22 @@
const DBusGFuncSignature *b = bval;
const GType *atypes;
const GType *btypes;
+ guint i, j;
- if (a->rettype != b->rettype)
+ if (a->rettype != b->rettype
+ || a->n_params != b->n_params)
return FALSE;
atypes = a->params;
btypes = b->params;
- while (*atypes != G_TYPE_INVALID)
+ for (i = 0; i < a->n_params; i++)
{
if (*btypes != *atypes)
return FALSE;
atypes++;
btypes++;
}
- if (*btypes != G_TYPE_INVALID)
- return FALSE;
return TRUE;
}
More information about the dbus-commit
mailing list