GNOME Bugzilla – Bug 621947
add g_value_take_variant
Last modified: 2010-06-19 18:02:58 UTC
Turns out we do need it, so we can correctly implement VARIANT:* marshalers.
Created attachment 163972 [details] [review] Add g_value_take_variant Turns out we do need g_value_take_variant(), so we can correctly implement VARIANT:* marshalers. Bug #621947.
I'm not sure that adding this function to GVariant is the correct way forward -- it's a pretty big hack and it adds yet another concept to the already-confusing world of floating reference counts...
Clarification: I understand the need to add the _take function, but I don't see why we can't do it in the same way as plain GObject (ie: essentially ignore the possibility that the function may return a floating reference). note: the possibility of a signal handler returning anything other than a boolean (much less a GVariant *) is pretty rare......
Created attachment 163988 [details] [review] Add g_value_take_variant Turns out we do need g_value_take_variant(), so we can correctly implement VARIANT:* marshalers. Bug #621947.
Comment on attachment 163988 [details] [review] Add g_value_take_variant assuming you tested it... :)
Created attachment 164020 [details] [review] Add g_value_take_variant Turns out we do need g_value_take_variant(), so we can correctly implement VARIANT:* marshalers. Bug #621947.
Created attachment 164079 [details] [review] Add g_variant_is_floating
Created attachment 164080 [details] [review] Add g_value_take_variant Turns out we do need g_value_take_variant(), so we can correctly implement VARIANT:* marshalers. Bug #621947.
Pushed to master.