Skip to content

Simplify using g_type_class_peek() #4594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

kleisauke
Copy link
Member

Only possible for classes that have already been referenced before.

Only possible for classes that have already been referenced before.
@kleisauke kleisauke force-pushed the simplify-using-peek branch from 6e11450 to f17fdfa Compare July 22, 2025 11:24
@kleisauke
Copy link
Member Author

For reference, this PR was motivated by a similar simplification made in GLib via commit https://gitlab.gnome.org/GNOME/glib/-/commit/ab1111b8bbb7a6057248658013eb23d80f4721cf.

@jcupitt
Copy link
Member

jcupitt commented Jul 22, 2025

In practice, glib can never unload classes, so the extra refs don't matter. But I agree that peek looks neater.

@kleisauke kleisauke merged commit 4da7768 into libvips:master Jul 23, 2025
6 checks passed
@kleisauke kleisauke deleted the simplify-using-peek branch July 23, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy