glib/girepository/tests
Philip Withnall 2a99d4b168 girepository: Expose GITypeInfo and GIArgInfo as stack allocatable
There are a handful of APIs in libgirepository which are used on
performance-sensitive code paths in language bindings (such as looking
at arguments when doing function calls). Historically libgirepository
has provided a stack-allocated variant for them, which avoids returning
a newly allocated `GIBaseInfo`. Since moving to glib.git and porting to
`GTypeInstance`, that stack allocated version has been broken.

This commit fixes it, by exposing obfuscated stack allocatable versions
of `GITypeInfo` and `GIArgInfo`, which are the two `GIBaseInfo`
subtypes which can be returned by the stack allocation functions.

The commit includes unit tests for them.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3217
2024-01-31 15:49:38 +00:00
..
cmph-bdz.c cmph-bdz-test: Use more size_t 2024-01-16 18:56:57 +01:00
function-info.c tests: Use runtime casts 2024-01-23 22:04:52 -08:00
gthash.c tests: Use g_assert_*() rather than g_assert() in gthash tests 2024-01-18 13:15:22 +00:00
meson.build girepository: Update gi-compile-repository and use it to compile GIRs 2024-01-31 11:13:16 +00:00
repository-search-paths.c girepository: Drop gi_repository_get_default() 2024-01-26 12:08:17 +00:00
repository.c girepository: Expose GITypeInfo and GIArgInfo as stack allocatable 2024-01-31 15:49:38 +00:00
struct-info.c tests: Port over some GIRepository tests from g-i 1.x 2024-01-23 22:04:52 -08:00
test-common.c girepository: Move GIR generation into girepository and prior to tests 2024-01-30 00:50:40 -06:00
test-common.h tests: Port over some GIRepository tests from g-i 1.x 2024-01-23 22:04:52 -08:00
throws.c girepository: Remove GI_FUNCTION_THROWS and GI_VFUNC_THROWS flags 2024-01-24 20:45:28 -08:00