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 703705 - Use the offsets for computing the private data offsets
Use the offsets for computing the private data offsets
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator: GObject
unspecified
Other Linux
: Normal enhancement
: 1.0
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-06 10:00 UTC by Emmanuele Bassi (:ebassi)
Modified: 2018-05-22 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Emmanuele Bassi (:ebassi) 2013-07-06 10:00:19 UTC
GLib 2.38 changed the in-memory layout of instance and private data:

https://blogs.gnome.org/ebassi/2013/06/21/the-king-is-dead/

and introduces new API and macros to deal with this that make private data pointers obsolete.

Vala should switch to this new offset-based access, so that newly added API that relies on offsets (like the GTK template children API) can use it.
Comment 1 Maciej (Matthew) Piechotka 2013-07-06 13:43:27 UTC
(In reply to comment #0)
> GLib 2.38 changed the in-memory layout of instance and private data:
> 
> https://blogs.gnome.org/ebassi/2013/06/21/the-king-is-dead/
> 
> and introduces new API and macros to deal with this that make private data
> pointers obsolete.
> 
> Vala should switch to this new offset-based access, so that newly added API
> that relies on offsets (like the GTK template children API) can use it.

I guess that to keep the ABI compatible the pointer needs to stay for default case (at least a dummy one). Would there be any benefit to use the new API even when there is a dummy pointer (other then simplicity of use which does not matter so much in auto-generated code)?
Comment 2 Daniel Espinosa 2017-03-13 14:37:30 UTC
Keep ABI is important for libraries, no for applications.

Vala should use latest GLib improvements. If they mean to break ABI then should be stated in documentation in order to allow library developers to change API/ABI version when depend on a Vala version. Ideally, Vala should provide class annotations to enable some features, available in older versions.
Comment 3 GNOME Infrastructure Team 2018-05-22 14:51:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/391.