| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
| |
In our case we have to do various special things in case glib isn't available
through pkg-config and not all tests are run.
Add a CI job that tests this case so we don't regress.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are notably 4 classes of GTypes where a girepository lookup
might fail:
- GTypes from private interfaces in public objects (eg. MetaCullable in
mutter)
- GTypes for private base objects with public interfaces (eg. GLocalFile
in GLib)
- GTypes registered from the language, and presumably not coming from the
GIR
- GTypes of objects/interfaces that we didn't load a typelib for
It is moot to look for those over and over again, and a full lookup can
be taxing if looking up for a method/property on objects with those
characteristics.
It seems we can cache the misses too, so next lookups are just as quick
as an introspected GType. The cache is invalidated after loading new
typelibs, in case some of the previously missed GTypes is now properly
introspected.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
prefix/datadir/libdir
The provided m4 macro uses pkg-config for setting INTROSPECTION_GIRDIR and INTROSPECTION_TYPELIBDIR
which can be used to install the generated gir/typelib files into. Up until now this always used
the prefix encoded in the g-i .pc file and ignored the prefix provided by the autotools project using it.
This can be fixed by passing "--define-variable=datadir=/mydatadir" to pkg-config. To get the real value of
datadir include a copy of AS_AC_EXPAND in our m4 and use it to expand the variables we need so we can
pass the real paths to pkg-config which will use them to generate the new girdir/typelibdir paths.
The reason this hasn't been much of a problem is that the example autotools code suggested using
"girdir = $(datadir)/gir-1.0" and "typelibsdir = $(libdir)/girepository-1.0" and not using the variables defined
by our macro, so not many projects used it. Now both ways should work.
See !133
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The libgirepository example now is its own meson project.
There now is a small library that is buildable with meson and autotools
which creates a gir/typelib. Usefull for testing our build system integration
and for small experiments.
Fixes #287
|
|
|
|
| |
See !186
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we save the macros to pass to distutils to compile the dumper
program, the quotes were not properly preserved for Visual Studio
builds, causing items such as -DG_LOG_DOMAIN to fail as quotes are used
in there.
When we use quotes in macro definitions, we escape the escape
character in ccompiler._set_cpp_options() when we are running
g-ir-scanner with Visual Studio, so that distutils won't be too eager
to drop those prematurely.
|
|
|
|
|
| |
The different dir separator seems to confuse meson now
(likely a new change in mingw Python path handling..)
|
|
|
|
|
|
|
|
| |
Check that g_object_info_get_ref_function_pointer() actually returns something,
which it doesn't if the shared lib isn't found.
In case a shared lib isn't found g-i will emit a warning, so also make sure
we fail on warnings to avoid similar problems in the future.
|
| |
|
| |
|
|
|
|
| |
In g_irepository_get_object_gtype_interfaces()
|
|
|
|
|
|
|
| |
Similar to !180 this should prevent devs from not running all tests by
accident.
This also adds some checks for the required doctool dependencies, mako and markdown.
|
|
|
|
|
|
|
|
|
| |
We require cairo only to run all tests and thus default it to false.
This usually results in developers not using it when working on changes and
tests depending on cairo then failing in CI.
This changes it to a feature option that defaults to auto, so that devs that
have cairo headers installed will automatically use it.
|
|
|
|
|
|
|
|
|
|
| |
In Python 3, filter() returns a filter object for lazy evaluation.
This object is truthy, so casting it to bool will return True even
if it would contain no objects. This thwarts the test at the
beginning of _resolve_non_libtool. To fix this, immediately
evaluate the filters with list().
Fixes #314.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C99 allows defining an array argument with a fixed size as:
void foo (int arr[static 10])
Compilers conforming to the C99 specification will be able to warn if
the function is called with NULL or with an array smaller than the
specified length, something that does not happen when using pre-C99
declarations like:
void foo (int arr[10])
As the declaration above is identical to:
void foo (int arr[])
Which is, in turn, identical to:
void foo (int *arr)
Fixes: #309
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The g-ir-scanner man page should include a mention of the
GI_CROSS_LAUNCHER environment variable.
|
| |
|
| |
|
|
|
|
|
|
| |
These tests get installed, so config.h may not be available. Do the same
thing that gimarshallingtests.c and regress.c already do, and include
config.h conditionally.
|
|
|
|
|
|
|
| |
Add some missing `meson.override_find_program`
And make sure that the `.gir` we build are found when used uninstalled
as a concequence of `meson.override_find_program`.
|
|
|
|
|
|
|
|
| |
The current offset only considers the fields themselves, but not
the optional embedded type that may follow each field.
Use the existing helper function instead of computing the offset
to fix the issue.
|
|
|
|
|
| |
No need to hardcode things since distutils looks it up.
Similar to !170 but for Windows.
|
|
|
|
| |
Closes: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/303
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This exercises the little-used code path where a signal is emitted with
a nullable GError as a parameter. It's modeled after
GstPbutils.Discoverer's 'discovered' signal.
See GNOME/gjs#262.
|
|
|
|
| |
Closes: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/300.
|
|
|
|
|
|
|
| |
For some reason there is no way to pass required to external meson deps.
Check manually instead.
See #297
|
|
|
|
|
| |
It's what we use for testing in CI (so not even sure older versions work) and
glib master now also depends on this 0.49.
|
|
|
|
|
|
|
|
|
|
| |
In our case it was never needed because it defaults to true if install_dir is set,
which it always is for all calls.
This avoids a warning when running with newer meson where it complains that install
is only available with 0.50+.
Fixes #298
|
| |
|
|
|
|
|
| |
meson 0.50.1 pkg-config API can't introspect clfags and libs, so we need
to run pkg-config itself to get these
|
|
|
|
|
| |
We already do the same thing for constants (see _create_const()).
Otherwise macros in .c files which aren't namespaced will trigger a warning.
|
|
|
|
|
| |
This is useful for documentation tools, and other utilities that
rely on full introspection of the C API of a given library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of structures
Prior to this, the only marshalling test cases available for GPtrArrays were
for GPtrArrays of strings.
This commit adds a marshalling test case for GPtrArrays of structures, with the
same objective than the gi_marshalling_tests_array_zero_terminated_return_struct() test case.
This also adds a similar marshalling test case for GArrays of structures, for
completeness.
This is a follow-up to https://gitlab.gnome.org/GNOME/gjs/issues/9 where a
regression has been detected with these types of GPtrArrays.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In g_irepository_get_object_gtype_interfaces(), returning the address of
the first GIBaseInfo* does not work reliably, because the GIBaseInfos
are not necessarily stored contiguously. So the second and subsequent
ones might be garbage.
Instead, return the address of the array of GIBaseInfo pointers.
Add a test that verifies the functionality, as well.
This is unfortunately an API and ABI break.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The cairo MSVC build produces a cairo-gobject.dll unlike the
libcairo-gobject-2.dll with autotools.
While one can pass the right DLL name through the cairo_libname option,
having a better default can't hurt.
|