For historical reasons, some doc blocks are included in an ancillary
file. Add it to the list of sources parsed by g-ir-scanner, to increase
the coverage of various macros.
Fixes: #3372
When faced with a `GType` which is present in multiple typelibs, the old
implementation was not deterministic, as it iterated over a hash table
of typelibs. The iteration order of a hash table is not deterministic.
Use the new `ordered_typelibs` and `ordered_lazy_typelibs` arrays to
iterate instead, making the order deterministic.
Add a unit test to check this. In particular, to check that symbols
which are present in both `Gio` and `GioUnix` are correctly resolved as
being from `GioUnix`.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3303
It's an array containing the list of sanitizers in use, normally it
contains a value, but in some cases may have more than one (e.g.
'address' and 'undefined').
And so use it to avoid repeated checks
There is a meson option (gir_dir_prefix), but without being passed in here
the files would always get installed into the default location (datadir).
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
To avoid a big introspection API break.
These APIs are now listed in the new `{GLib,Gio}{Unix,Win32}-2.0.gir`
files, but for backwards compatibility they need to continue to be
listed in `Gio-2.0.gir` and `GLib-2.0.gir` as well, until the next major
introspection API break (and none is planned).
No new platform specific APIs should be added to these GIR files, but
these existing ones must remain.
See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3892#note_2001361
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
So now introspection users will have to call `GLibUnix.open_pipe()`
rather than `GLibUnix.unix_open_pipe()` — or
`GLibWin32.check_windows_version()` rather than
`GLibWin32.win32_check_windows_version()`.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3037
For both GLib and GIO. (GObject, GIRepository and GModule don’t have any
platform specific APIs.)
This is needed for two reasons:
* If the same GIR file is shipped on multiple platforms, it has no way
to conditionally define/not-define an API based on the platform (like
an `#ifdef` in a C header). So we either end up shipping differing
GIR APIs on different platforms, or shipping a GIR file which
declares APIs which aren’t resolvable by `dlopen()` on certain
platforms, and will cause a language runtime error.
* The API reference documentation is now generated from the GIR, and
similar problems are present there: if the GIR contains different
symbols depending on the platform, there is no way to generate API
documentation for the union of all of them.
The fix is to ensure that there are no conditional symbols in a GIR, by
splitting out the platform specific symbols into platform specific GIR
files. Platform specific documentation can then be generated from these,
in addition to the main, platform agnostic, documentation.
The documentation changes will following in a subsequent commit.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3037
There was no obvious logical need to list the `GAppInfo` subclass
sources separately in the build. It makes more sense to add them to the
platform-specific source lists, since they are platform specific.
This will be used in an upcoming commit which generates
platform-specific GIR files, so needs the full platform-specific lists
of sources.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3037
To enable tests which depend on libgirepository's GIR and typelib,
we need to refactor the order we're currently building these items.
We can also move everything under girepository/ to cleanup the
top-level.