Typelibs don't include alias records
GLib-2.0.gir contains e.g.
<alias name="Pid" c:type="GPid">
<doc xml:space="preserve"
filename="gmain.h"
line="157">...</doc>
<source-position filename="glibconfig.h" line="200"/>
<type name="gint" c:type="int"/>
</alias>
These <alias>
records are not reflected in the generated typelib at all. This was just never implemented. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=655423#c6
For GPid this isn't really a problem, but it is a problem for the many types in the GNOME platform that are aliases of cairo_rectangle_int_t, like GtkAllocation and GdkRectangle. g-ir-scanner has workarounds for those two, but this also shows up in other typelibs.
We could consider adding a GITypedefInfo for this. I wonder if including a new info type in girepository would require bumping the typelib version? In that case, probably not worth it. (Maybe then we should write a tool that will print out a list of typedefs that ought to be manually aliased in bindings' overrides files...)
Test that you can plug into repository.c
:
static void
test_repository_alias (RepositoryFixture *fx,
const void* unused)
{
GIBaseInfo *info = gi_repository_find_by_name (fx->repository, "GLib", "Pid");
g_assert_nonnull (info);
g_clear_pointer (&info, gi_base_info_unref);
}