passing NULL with Glib interface

John (J5) Palmieri johnp at redhat.com
Sat Nov 5 09:18:05 PST 2005


Hey, this is not a bug.  You can't send NULL.  This is because D-Bus is
language neutral and NULL means different things.  For instance NULL in
C can only be applied to pointers where as the None in Python is just
another type that can be assigned to any variable.

On Sat, 2005-11-05 at 10:39 +0100, Claessens Xavier wrote:
> Hi !
> 
> When I send a G_TYPE_STRING through D-BUS with a NULL string, I receive
> on the other side a string "\0" and not NULL. Same with a G_TYPE_STRV
> terminated by NULL {"hello", "world", NULL} D-BUS transmit this:
> {"hello", "world", "\0"}
> 
> Is it a bug, feature or something missing on my code ?
> 
> Thanks,
> Xavier Claessens.
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list