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 592942 - Use g_type_class_add_private() if GLib 2.24 is used
Use g_type_class_add_private() if GLib 2.24 is used
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.7.x
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 521707
Blocks:
 
 
Reported: 2009-08-24 19:15 UTC by Sebastian Dröge (slomo)
Modified: 2010-03-22 08:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vala-gtype-class-add-private.diff (8.47 KB, patch)
2009-08-24 19:15 UTC, Sebastian Dröge (slomo)
none Details | Review
vala-gtype-class-add-private.diff (8.62 KB, patch)
2009-08-24 19:30 UTC, Sebastian Dröge (slomo)
none Details | Review
vala-gtype-class-add-private.diff (8.83 KB, patch)
2009-08-24 20:23 UTC, Sebastian Dröge (slomo)
needs-work Details | Review
vala-gtype-class-add-private.diff (11.06 KB, patch)
2009-08-25 19:39 UTC, Sebastian Dröge (slomo)
none Details | Review
vala-gtype-class-add-private.diff (11.74 KB, patch)
2009-09-05 13:27 UTC, Sebastian Dröge (slomo)
none Details | Review
Add support for g_type_class_add_private() and friends when GLib >= 2.24 is requested (11.74 KB, patch)
2010-03-18 13:23 UTC, Sebastian Dröge (slomo)
none Details | Review

Description Sebastian Dröge (slomo) 2009-08-24 19:15:12 UTC
Created attachment 141590 [details] [review]
vala-gtype-class-add-private.diff

Hi,
attached patch uses g_type_class_add_private() if GLib 2.22 is selected to be
used instead of the manual workaround for really private class fields.

The GObject patch is in bug #521707.
Comment 1 Sebastian Dröge (slomo) 2009-08-24 19:30:32 UTC
Created attachment 141591 [details] [review]
vala-gtype-class-add-private.diff

Fix small regression for the <2.22 mode by taking the correct GType.
Comment 2 Sebastian Dröge (slomo) 2009-08-24 20:23:51 UTC
Created attachment 141595 [details] [review]
vala-gtype-class-add-private.diff

...and the same slightly cleaned up.
Comment 3 Sebastian Dröge (slomo) 2009-08-25 15:14:14 UTC
Comment on attachment 141595 [details] [review]
vala-gtype-class-add-private.diff

Needs some work still, the code for class locks needs to be updated to the new macro too.

Also the macro can be simplified a bit... patch will follow later :)
Comment 4 Sebastian Dröge (slomo) 2009-08-25 19:39:05 UTC
Created attachment 141675 [details] [review]
vala-gtype-class-add-private.diff

Now it's finished I hope, the testsuite runs without errors and everything looks good
Comment 5 Sebastian Dröge (slomo) 2009-09-05 13:27:06 UTC
Created attachment 142533 [details] [review]
vala-gtype-class-add-private.diff

Same patch, updated to apply against latest GIT version
Comment 6 Sebastian Dröge (slomo) 2010-03-18 13:23:27 UTC
Created attachment 156451 [details] [review]
Add support for g_type_class_add_private() and friends when GLib >= 2.24 is requested

Fixes bug #592942.
Comment 7 Sebastian Dröge (slomo) 2010-03-18 13:25:02 UTC
Updated to apply cleanly again and use the correct GLib version. Anything I need to change before I can push this? :)
Comment 8 Jürg Billeter 2010-03-22 08:07:16 UTC
commit 460ec9fd2ff63166e7bdb0ab46fe6e028170de97
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Mar 22 09:05:43 2010 +0100

    Use g_type_class_add_private() when targeting GLib >= 2.24
    
    Fixes bug 592942.