Skip to content

Stop using G_GNUC_CONST in _get_type functions - #6725

Merged
swick merged 1 commit into
flatpak:mainfrom
A6GibKm:get-type-const
Jul 6, 2026
Merged

swick merged 1 commit into
flatpak:mainfrom
A6GibKm:get-type-const

Conversation

@A6GibKm

@A6GibKm A6GibKm commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

As per g_type_ensure's documentation it is technically incorrect to mark _get_type fns with G_GNUC_CONST since they have side-effects on their first run.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5223 for more details.

@bbhtt

bbhtt commented Jul 5, 2026 •

Copy link
Copy Markdown
Collaborator

You should add common: ... prefix to the commit message. It's fine for the app part too because people have used that as a "common" prefix when changes touch multiple things.

As per g_type_ensure's documentation it is technically incorrect to mark
_get_type fns with G_GNUC_CONST since they have side-effects on their
first run.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5223 for more
details.
@A6GibKm

A6GibKm commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Done, rebased too.

@swick
swick added this pull request to the merge queue Jul 6, 2026
Merged via the queue into flatpak:main with commit 59f9a77 Jul 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants