using dbus in the platform
Havoc Pennington
hp at redhat.com
Tue Oct 9 11:55:38 PDT 2007
Hi,
Some patch review as promised -
Simon McVittie wrote:
> /* in dbus-errors.h */
> #define DBUS_ERROR_INITIALIZER { NULL, NULL, 0, 0, 0, 0, 0, NULL }
>
> /* in user code */
> DBusError error = DBUS_ERROR_INITIALIZER;
>
This looks fine to me (though one of those 0 should be TRUE, to be the
same as dbus_error_init()). Also it might be nice to call it
DBUS_ERROR_INIT, since GLib has G_STATIC_MUTEX_INIT and so forth, and we
may as well be consistent with something.
> + * @returns #FALSE if an error (#DBUS_ERROR_NO_MEMORY or
> + * #DBUS_ERROR_ADDRESS_IN_USE) is reported
It would be slightly nicer to introduce a new
DBUS_ERROR_OBJECT_PATH_IN_USE I think - there's no cost to having
additional error names.
> + if (error != NULL)
> + _DBUS_SET_OOM (error);
_DBUS_SET_OOM already includes the check for NULL (via set_error_const)
> - void *user_data);
> + void *user_data,
> + DBusError *error);
Nudge that arg over to line up with the other one ;-)
Havoc
More information about the dbus
mailing list