Problem sending double with GDbus



Hi,

I am trying to send a double with GDbus between two C programs, but receives a faulty value.

Sender
gdouble value = 3.0;

g_dbus_proxy_call_sync (proxy, method_name, g_variant_new("(d)",value), G_DBUS_CALL_FLAGS_NONE, -1, NULL, 
&dbus_err);

In my receiver function
I get like (8.7357865410490269e-313,) when I print out the inparameters.

If I change the introspect to "i" instead and sends a int all works fine.

Any help I appreciated!

Regards
Peter



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]