Bug 71811

Summary: dbus_g_value_build_g_variant() fails on empty strv
Product: dbus Reporter: Xavier Claessens <xclaesse>
Component: GLibAssignee: Rob Taylor <rob.taylor>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://cgit.collabora.com/git/user/xclaesse/dbus-glib.git/log/?h=71811
Whiteboard: review+
i915 platform: i915 features:

Description Xavier Claessens 2013-11-19 21:16:13 UTC
g_variant_new_strv(NULL, -1); warns because NULL is not an array. (NULL, 0) is explicitly accepted though.
Comment 2 Xavier Claessens 2013-11-19 21:43:50 UTC
Added a 2nd patch to fix the NULL string case. g_value_set_string() is accepted, but not g_variant_new_string().
Comment 3 Xavier Claessens 2013-11-19 21:44:33 UTC
(In reply to comment #2)
> Added a 2nd patch to fix the NULL string case. g_value_set_string() is
> accepted, but not g_variant_new_string().

I mean: g_value_set_string(v, NULL) is accepted, but not g_variant_new_string(NULL).
Comment 4 Simon McVittie 2013-11-20 13:16:08 UTC
Looks good. Please commit if you can, or if you can't, I'll merge this next time I do a round of dbus merges.
Comment 5 Xavier Claessens 2013-11-20 15:35:50 UTC
I can't push myself, please do :)
Comment 6 Simon McVittie 2014-01-14 11:17:02 UTC
Fixed in git for 0.102, thanks

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.