summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* scanner: don't accept invalid symbols in binary expressionsLubomir Rintel2023-01-087-84/+41
| | | | | | | | | | | | | | | | | | | | | The rules for binary expressions were entirely oblivious to the type of the operand symbols and assumed they're integer constants. This is very unfortunate, since it caused all sort of nonsense to end up getting accepted. One such example is the following define from NetworkManager's libnm: #define NM_SETTING_PARAM_SECRET (1 << (2 + G_PARAM_USER_SHIFT)) As G_PARAM_USER_SHIFT is unknown, it was parsed as an invalid symbol. The addition didn't care, treated it as: #define NM_SETTING_PARAM_SECRET (1 << (2 + 0)) Let's just ensure we get CSYMBOL_TYPE_CONST only when both operands actually have const_int_set. Otherwise just create CSYMBOL_TYPE_INVALID. That will cause the symbol to be dropped on the floor eventually, but that's probably much better than a having an invalid value.
* tests/scanner: add some tests for #definesLubomir Rintel2023-01-088-239/+337
| | | | | | | | Add one expanding to an expression we can't get a constant value from and another one for which we can. Note that the bad on one currently does evaluate, and it does so to a bad value. A separate commit with a diff to test suite will address that.
* Track the main branch of GLib as a subprojectEmmanuele Bassi2023-01-081-1/+1
| | | | GObject-introspection is meant to match GLib.
* Bump the project version to 1.75.0Emmanuele Bassi2023-01-081-1/+1
| | | | New cycle, new version number.
* build: Add missing header and symbolsEmmanuele Bassi2023-01-081-0/+3
| | | | | | | | | | | Now that GLib has separate version annotation macros, we need to define GOBJECT_COMPILATION and parse gobject-visibility.h when generating the introspection data for GLib. This MR also requires: - GNOME/glib!3184 - GNOME/glib!3185
* build: Add missing GMODULE_COMPILATION symbolEmmanuele Bassi2023-01-081-0/+1
| | | | | We need to define GMODULE_COMPILATION when building the introspection data for GModule.
* build: Drop wrap files for GLib dependenciesEmmanuele Bassi2023-01-085-28/+12
| | | | We don't need wrap files for things we get from GLib or from the system.
* scanner: Ignore unused typing importEmmanuele Bassi2023-01-081-2/+2
| | | | | Ignore the typing import so that flake8 doesn't complain, and mypy keeps working.
* gimarshallingtests: Add Structured Union types, unions with struct fieldsMarco Trevisan (Treviño)2022-11-212-0/+229
| | | | | | This allows to perform more introspection tests in gjs and other implementations when it comes to set/get fields or "cast" an union member to the main union type
* GIMarshallingTests: Add tests for caller allocated fixed size arraysMarco Trevisan (Treviño)2022-11-212-0/+36
| | | | | | | Such kind of arrays can be easily be allocated as we know the size of each array element. See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/806
* Update glib introspection dataRico Tzschichholz2022-11-132-17/+6
| | | | This is based on f64f88baaeaca277687e6231b3cea6d14a26996b
* Update glib introspection dataSebastian Dröge2022-11-033-55/+596
| | | | This is based on 201c920cbd0b816f4e19b52c1b28746935fdcb00.
* Update glib introspection dataSebastian Dröge2022-10-213-37/+76
| | | | Based on 86430a27d26b9b72b02ff0b81eeaa5df0525646c.
* Fix typo in async scope descriptionbadcel2022-10-061-2/+2
|
* Add missing (void) arguments to comply with -Wstrict-prototypesMarco Trevisan (Treviño)2022-10-062-2/+2
|
* cmph: Do not set debug variables if debug is not setMarco Trevisan (Treviño)2022-10-061-1/+3
| | | | Fixes clang builds
* Post-release version bump to 1.74.1Emmanuele Bassi2022-09-171-1/+1
|
* Release GObject-introspection 1.74.01.74.0Emmanuele Bassi2022-09-172-1/+6
|
* Update GLib annotationsEmmanuele Bassi2022-09-173-9/+9
| | | | GLib commit: 2.74.0
* Post-release version bump to 1.73.2Emmanuele Bassi2022-09-031-1/+1
|
* Release gobject-introspection 1.73.11.73.1Emmanuele Bassi2022-09-031-0/+12
|
* giscanner: undef "GLIB_VERSION_{MAX_ALLOWED,MIN_REQUIRED}" macros in ↵Thomas Haller2022-09-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | generated C file When g-ir-scanner is used by another project, than that project might have the GLIB_VERSION_* macros defined. This is useful to ensure that only intended glib API is used. The project might then also pass the CFLAGS to g-ir-scanner, without filtering those defines out. This can lead to compiler warnings. For example, NetworkManager sets the version macros to GLIB_VERSION_2_40 and thus gets these warnings /NetworkManager/tmp-introspect66917zc4/NM-1.0.c: In function ‘dump_object_type’: /NetworkManager/tmp-introspect66917zc4/NM-1.0.c:252:13: warning: Not available before 2.70 252 | if (G_TYPE_IS_FINAL (type)) | ^~~~~~~~~~~~~~~~~ /NetworkManager/tmp-introspect66917zc4/NM-1.0.c: In function ‘dump_fundamental_type’: /NetworkManager/tmp-introspect66917zc4/NM-1.0.c:370:13: warning: Not available before 2.70 370 | if (G_TYPE_IS_FINAL (type)) | ^~~~~~~~~~~~~~~~~ But these warnings are not correct. The installed g-ir-scanner knows for which glib version to generate code. Undefine the macros to avoid the warning.
* Update GLib annotationsEmmanuele Bassi2022-09-023-54/+92
| | | | GLib commit: 2.73.3-44-g66c4e35e2
* Require C99Emmanuele Bassi2022-08-311-1/+1
| | | | | GLib has been requiring a C99 toolchain for a while, now. It makes no sense to have gobject-introspection depend on C89.
* doctool: prepend the emitting object for GJS signal callbacksAndy Holmes2022-08-314-3/+16
|
* gir: add a few types to win32Marc-André Lureau2022-08-191-0/+5
| | | | | | This helps with gtk!4965. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* giscanner: Support C99 designated initializersJan Tojnar2022-08-171-2/+17
| | | | | | https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html Based on https://github.com/katef/kgt/blob/c9d8ad246855c6b65e42371be7898f4073c28d18/examples/c99-grammar.iso-ebnf#L247-L252
* gimarshallingtests: Fix annotation for GValue copy testPhilip Chimento2022-08-061-1/+1
| | | | | The test returns a newly allocated GValue, so it should not be marked transfer none.
* docs: Remove inaccurate descriptionPhilip Chimento2022-08-061-2/+1
| | | | | | This parameter may not be NULL even if the function described by the GIFunctionInfo has a void return type, so we should not say this in the documentation.
* gir: Update introspection data for GLib 2.73.3Marco Trevisan (Treviño)2022-08-061-0/+5
|
* CI: test with clang + mingw-w64 on WindowsChristoph Reiter2022-07-192-19/+29
| | | | The toolchain is different enough to warrant its own CI job imo.
* build: disable some clang warnings for code not under our controlChristoph Reiter2022-07-192-0/+2
| | | | | cmph is vendored and other one is bison/flex generated code. Not much we can do here, so disable those warnings there.
* resolve_windows_libs: add llvm/mingw supportChristoph Reiter2022-07-191-10/+38
| | | | | | | | | | | | | | | | | | | | The existing code tries to mirror how the linker finds DLLs by searching for the import libs and then looking for the matching shared lib name. While llvm has a dlltool clone it doesn't provide the --identify option to extract the shared lib name. Instead we use the fact that llvm import libs include the dll name in the archive member name, so we can use "nm" there to get the same result. To decide which strategy to use we run dlltool and check if it contains "llvm-dlltool" in the output. This fixes the .gir and .typelib files containing bogus values for the shared library names when building with clang + mingw-w64 on Windows. I'm not quite sure if the libtool part is actually needed there, but I left it in to keep the diff small.
* Disable rpath handling on WindowsChristoph Reiter2022-07-191-1/+1
| | | | | | | While gcc on Windows allows being passed -rpath and just ignores it, llvm/lld will fail with "lld: error: unknown argument: -rpath". There is no such thing as rpath on Windows, so just skip it.
* Post-release version bump to 1.73.1Emmanuele Bassi2022-07-131-1/+1
|
* Release GObject Introspection 1.73.01.73.0Emmanuele Bassi2022-07-131-0/+8
|
* build: Remove a version check that is always trueEmmanuele Bassi2022-07-131-4/+1
| | | | We require Meson 0.60, to match newer GLib.
* build: Add run_command() argumentEmmanuele Bassi2022-07-133-10/+10
| | | | The `check` argument to `run_command()` is now mandatory.
* ci: Update MSYS2 testEmmanuele Bassi2022-07-131-8/+16
| | | | | | - Install pcre2, as it's a new GLib dependency. - Do not use CFLAGS to inject -Werror - Use idiomatic Meson subcommands
* Always require the latest GLibEmmanuele Bassi2022-07-131-3/+1
| | | | | GLib 2.58 has long since been released. We should always match GLib's version, since we update the introspection data regularly.
* Update GLib introspection dataEmmanuele Bassi2022-07-132-3/+3
| | | | Rebased up to 2.73.2.
* gir: Update introspection data to GLib 2.73.1Marco Trevisan (Treviño)2022-06-283-54/+526
| | | | Based on https://gitlab.gnome.org/GNOME/glib/-/commit/113d7263
* Add FcConfig to the rump fontconfig girMatthias Clasen2022-06-111-0/+1
| | | | | | | This 10 line gir file was good enough for the past 12 years, but now I want to have pango api with FcConfig arguments appear in the docs, and the way to that leads through the gir nowadays.
* ci: Temporarily disable tests on MSVCEmmanuele Bassi2022-06-111-1/+1
| | | | We need to unblock the CI pipeline, in order to fix them.
* Update the zlib wrap fileEmmanuele Bassi2022-06-111-5/+12
| | | | The original one was so old Meson didn't recognise it as a wrap file.
* ci: Install zlib in the minimal imageEmmanuele Bassi2022-06-111-0/+1
|
* ci: Update the version of Meson for the Windows buildsEmmanuele Bassi2022-06-112-2/+2
|
* ci: Use the latest imagesEmmanuele Bassi2022-06-111-2/+2
|
* ci: Bump the image versionEmmanuele Bassi2022-06-112-2/+2
|
* ci: Update to Fedora 36Emmanuele Bassi2022-06-112-2/+2
| | | | | Fedora 34 is EOL, and by the time we release GNOME 43, Fedora 35 will be close to EOL too.