Skip to content

Audit and fix incorrect use of (closure) in glib

Michael Catanzaro requested to merge mcatanzaro/closure-audit into main

I don't know whether this is a good idea or not, but following @ebassi's instructions for use of introspection annotations:

https://www.bassi.io/articles/2023/02/20/bindable-api-2023/

I have audited all uses of the (closure) annotation in glib and determined that only a handful are correct. This commit changes almost all of our use of (closure) annotations to conform to Emmanuele's rules. (It also removes a few redundant (nullable) annotations where the annotations were becoming unwieldy.)

I don't know what impact this will have on bindings.

I have made no attempt to search for places that are missing the annotation but need it. This would probably produce pretty scary results. In theory, it is required for every callback in the public API.

Merge request reports