Merge lp://qastaging/~dobey/ubuntuone-client/type-init-depr into lp://qastaging/ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 1371
Merged at revision: 1377
Proposed branch: lp://qastaging/~dobey/ubuntuone-client/type-init-depr
Merge into: lp://qastaging/ubuntuone-client
Diff against target: 14 lines (+3/-1)
1 file modified
libsyncdaemon/test-libsyncdaemon.c (+3/-1)
To merge this branch: bzr merge lp://qastaging/~dobey/ubuntuone-client/type-init-depr
Reviewer Review Type Date Requested Status
Mike McCracken (community) Approve
Review via email: mp+143754@code.qastaging.launchpad.net

Commit message

Don't use g_type_init with new versions of glib.

To post a comment you must log in.
Revision history for this message
Mike McCracken (mikemc) wrote :

A minor point, since I was just a little confused, this might be more readable if you used GLIB_CHECK_VERSION:
http://developer.gnome.org/glib/2.28/glib-Version-Information.html#GLIB-CHECK-VERSION:CAPS

#if !GLIB_CHECK_VERSION(2, 36, 0))
    g_type_init();
#endif

Approving anyway, you can change it if you agree.

review: Approve
Revision history for this message
dobey (dobey) wrote :

On Thu, 2013-01-17 at 20:02 +0000, Mike McCracken wrote:
> Review: Approve
>
>
> A minor point, since I was just a little confused, this might be more readable if you used GLIB_CHECK_VERSION:
> http://developer.gnome.org/glib/2.28/glib-Version-Information.html#GLIB-CHECK-VERSION:CAPS
>
> #if !GLIB_CHECK_VERSION(2, 36, 0))
> g_type_init();
> #endif
>
> Approving anyway, you can change it if you agree.

This actually won't work here. The version is not yet 2.36.0, but the
API version is 2.36 (and so GLIB_VERSION_2_36 is defined in the headers,
but GLIB_CHECK_VERSION checks against the
GLIB_{MAJOR,MINOR,MICRO}_VERSION defines, which match up with the actual
release version. The actual released version right now, is 2.35.4, so
using this macro would fail and the deprecation warning would still
happen until the actual released version was 2.36.0. We could use 2.35.4
here instead of course, but I think it's better to use the API version
defines for this, rather than the check macro, which would be better to
require a certain stable release for a bug fix or something, which made
it into a minor release, but isn't part of the API necessarily.

Revision history for this message
Mike McCracken (mikemc) wrote :

Ah, ok - thanks for the explanation!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches