Feedback on gobject-introspection: APIs for stack-allocated introspection info
g-i contains "gi_foo_info_load_bar()
"-style APIs. Examples: gi_callable_info_load_return_type()
, gi_callable_info_load_arg()
. These are designed to work with stack-allocated introspection info. For example:
GITypeInfo ret_type;
gi_callable_info_load_return_type(func_info, &ret_type);
However, it's not possible to allocate introspection info on the stack like it was with g-i 1.0. The introspection info structs are opaque.
I don't think it makes much sense to use these APIs with heap-allocated introspection info, especially not unowned ones.
GJS used these stack-allocated APIs wherever possible. I always assumed it was for performance, but I have no idea whether that's true as I never measured it.
I think we should probably remove these APIs. (Unless it turns out that the performance gain is significant. Then we should fix them.)