After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 621947 - add g_value_take_variant
add g_value_take_variant
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-06-17 23:09 UTC by Christian Persch
Modified: 2010-06-19 18:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add g_value_take_variant (6.84 KB, patch)
2010-06-17 23:09 UTC, Christian Persch
none Details | Review
Add g_value_take_variant (4.72 KB, patch)
2010-06-18 07:20 UTC, Christian Persch
accepted-commit_now Details | Review
Add g_value_take_variant (9.04 KB, patch)
2010-06-18 16:14 UTC, Christian Persch
none Details | Review
Add g_variant_is_floating (3.73 KB, patch)
2010-06-19 15:07 UTC, Christian Persch
none Details | Review
Add g_value_take_variant (8.72 KB, patch)
2010-06-19 15:07 UTC, Christian Persch
none Details | Review

Description Christian Persch 2010-06-17 23:09:14 UTC
Turns out we do need it, so we can correctly implement VARIANT:* marshalers.
Comment 1 Christian Persch 2010-06-17 23:09:51 UTC
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.
Comment 2 Allison Karlitskaya (desrt) 2010-06-18 00:24:26 UTC
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...
Comment 3 Allison Karlitskaya (desrt) 2010-06-18 00:26:42 UTC
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......
Comment 4 Christian Persch 2010-06-18 07:20:58 UTC
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 5 Allison Karlitskaya (desrt) 2010-06-18 12:50:47 UTC
Comment on attachment 163988 [details] [review]
Add g_value_take_variant

assuming you tested it... :)
Comment 6 Christian Persch 2010-06-18 16:14:56 UTC
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.
Comment 7 Christian Persch 2010-06-19 15:07:17 UTC
Created attachment 164079 [details] [review]
Add g_variant_is_floating
Comment 8 Christian Persch 2010-06-19 15:07:25 UTC
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.
Comment 9 Christian Persch 2010-06-19 18:02:58 UTC
Pushed to master.