GNOME Bugzilla – Bug 703705
Use the offsets for computing the private data offsets
Last modified: 2018-05-22 14:51:49 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.
(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)?
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.
-- 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.