glib/girepository/tests
Barnabás Pőcze 7a528d0ff0 girepository: gi_object_info_find_signal(): Avoid repeated allocations
Previously `gi_object_info_find_signal()` used `gi_object_info_get_signal()`
to retrieve the *i*th signal and compare its name to the desired name.
However, `gi_object_info_get_signal()` returns an allocated object.
If the names were not matching, the allocated object was simply dropped,
and this resulted in a lot of unnecessary allocations compared to the
desired number of allocations, which is one.

To avoid much of the overhead pertaining to the creation of these allocated
`GISignalInfo` objects, introduce a new function that inspects the signal
blobs directly and returns an allocated `GISignalInfo` object just for the
matching signal. The function is largely a copy-and-paste of `gi_base_info_find_vfunc()`,
which does the same thing, only for virtual functions.

See https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/504
2024-11-23 19:25:17 +01:00
..
autoptr.c girepository: Add g_autoptr() and g_auto() support 2024-02-14 11:54:48 +00:00
callable-info.c girepository: Add APIs for sync, async, and finish function annotations 2024-08-26 12:07:25 +01:00
cmph-bdz.c cmph-bdz-test: Use more size_t 2024-01-16 18:56:57 +01:00
dump.c tests: Add basic tests for gdump.c in libgirepository 2024-06-04 15:52:05 +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: Add APIs for sync, async, and finish function annotations 2024-08-26 12:07:25 +01:00
object-info.c tests: Add a test for finding methods and vfuncs in a GIObjectInfo 2024-02-05 18:40:58 +00:00
registered-type-info.c gibaseinfo: Stop building GIBoxedInfo instances 2024-02-12 13:16:07 +00:00
repository-search-paths.c girepository: add default search paths tests for relocations 2024-06-04 13:00:45 +02:00
repository.c girepository: gi_object_info_find_signal(): Avoid repeated allocations 2024-11-23 19:25:17 +01:00
struct-info.c gibaseinfo: Stop building GIBoxedInfo instances 2024-02-12 13:16:07 +00: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 girepository: Make gi_repository_find_by_gtype() deterministic 2024-05-16 22:47:35 +01:00
throws.c girepository: Remove GI_FUNCTION_THROWS and GI_VFUNC_THROWS flags 2024-01-24 20:45:28 -08:00
union-info.c girepository test: Don't assume doubles are naturally-aligned 2024-02-13 11:33:54 +00:00