int32 vs uint32 issues with untyped language bindings

Julien PUYDT julien.puydt at laposte.net
Tue Dec 28 01:39:23 PST 2004


Le dimanche 26 décembre 2004 à 22:06 -0500, John (J5) Palmieri a écrit :
> There seems to be an issue with the ability for untyped language
> bindings to deal with dbus methods that require uint parameters.  This
> showed up in the python bindings when a user tried to use the
> ActivateService method call of the org.freedesktop.Dbus service which
> requires a uint as its second parameter.  Since python has no concept of
> a uint it just sends an int raising a dbus error.  If introspection is
> available for the method parameter this can be fixed in the bindings.
> If not it can be fixed in dbus so that when validating a uint, positive
> integers would be accepted also.  Any suggestions on the right fix for
> this?

Notice that solving the initial problem with ActivateService would only
require that ActivateService could take a single string argument and
have a default for the (until now unimplemented&undocumented anyway)
flag.

For the general problem, introspection probably isn't a complete
solution: can't I write a method that will take different arguments
depending on the first that is being sent? If so, then how should that
method be introspected?

Snark on #gnomemeeting aka "the poor user who triggered that thread"



More information about the dbus mailing list