Merge lp:~desrt/indicator-application/gvariantbuilder-fix into lp:indicator-application/0.5

Proposed by Allison Lortie on 2012-03-02
Status: Merged
Approved by: Ted Gould on 2012-03-02
Approved revision: 222
Merge reported by: Ted Gould
Merged at revision: not available
Proposed branch: lp:~desrt/indicator-application/gvariantbuilder-fix
Merge into: lp:indicator-application/0.5
Diff against target: 12 lines (+1/-1)
1 file modified
src/application-service-appstore.c (+1/-1)
To merge this branch: bzr merge lp:~desrt/indicator-application/gvariantbuilder-fix
Reviewer Review Type Date Requested Status
Ted Gould (community) 2012-03-02 Approve on 2012-03-02
Review via email: mp+95507@code.launchpad.net

Description of the Change

make proper use of g_variant_builder_init()

GVariantBuilder can only infer the proper type for non-empty arrays. If
an array may be empty, the full definite type must be given to
g_variant_builder_init().

To post a comment you must log in.
Ted Gould (ted) wrote :

  review approve
  status approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/application-service-appstore.c'
2--- src/application-service-appstore.c 2012-02-11 10:58:54 +0000
3+++ src/application-service-appstore.c 2012-03-02 05:27:18 +0000
4@@ -1348,7 +1348,7 @@
5 GList * listpntr;
6 gint position = 0;
7
8- g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
9+ g_variant_builder_init(&builder, G_VARIANT_TYPE ("a(sisossssss)"));
10
11 for (listpntr = priv->applications; listpntr != NULL; listpntr = g_list_next(listpntr)) {
12 Application * app = (Application *)listpntr->data;

Subscribers

People subscribed via source and target branches