Commit Graph

27584 Commits

Author SHA1 Message Date
Alynx Zhou
57b0e72c7b garray: Fix typo in doc comment of g_ptr_array_sort[_with_data]()
Although g_ptr_array_sort_with_data() could achieve the goal, the
wrapper functions should be expected there because that's the reason
why they are added.
2023-07-11 22:42:33 +08:00
Marco Trevisan
4aa63defdf Merge branch 'ci-fetch-submodules' into 'main'
ci: Manually fetch submodules for style-check CI jobs

See merge request GNOME/glib!3494
2023-07-07 09:55:37 +00:00
Philip Withnall
11a3b5dc44
2.77.0
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-07-07 00:16:29 +01:00
Philip Withnall
840d8c3457 ci: Manually fetch submodules for style-check CI jobs
This works around GitLab issue
https://gitlab.com/gitlab-org/gitlab/-/issues/391756, which manifests as
the error message:
```
Updating/initializing submodules...
Submodule 'subprojects/gvdb' (https://gitlab-ci-token:[MASKED]@gitlab.gnome.org/GNOME/gvdb.git) registered for path 'subprojects/gvdb'
Synchronizing submodule url for 'subprojects/gvdb'
fatal: not a git repository: subprojects/gvdb/../../.git/modules/subprojects/gvdb
```
on between 1/10 to 1/2 CI runs.

See the GitLab issue for a writeup.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-07-06 16:32:44 +01:00
Marco Trevisan
4cf6c78512 Merge branch 'codegen-docs' into 'main'
gdbus-codegen: Fix some minor typos in the documentation

See merge request GNOME/glib!3477
2023-07-05 11:58:20 +00:00
Philip Withnall
9dd477dd77 Merge branch '3039-android-statx' into 'main'
glocalfileinfo: Fix incorrect use of struct statx.st_mtimensec on Android

Closes #3039

See merge request GNOME/glib!3482
2023-07-04 16:14:33 +00:00
Bruce Cowan
95624caa6c Update British English translation
(cherry picked from commit 2d3bcc9401)
2023-07-02 20:09:22 +00:00
Philip Withnall
4ef693a457 Merge branch 'gdbus-marshallers' into 'main'
gdbus-codegen: Generate specific marshallers for each required type

Closes #3028

See merge request GNOME/glib!3491
2023-07-02 16:30:21 +00:00
Marco Trevisan (Treviño)
27b7559c91 gdbus-codegen: Define only one marshaller per signature reusing across interfaces
Avoid generating more code than needed, so other than continuing using
the generic glib marshallers when possible, define once the custom ones
we need for each file we generate.

The marshallers are then re-used across all the interfaces defined
without duplicating the code size.
2023-06-30 23:40:03 +02:00
Marco Trevisan (Treviño)
23180d433e gdbus-codegen: Try to reuse default glib marshallers for simpler signals marshallers
If a signal signautre is simple enough we can just reuse the default
marshallers by simply creating a wrapper marshaller
2023-06-30 22:59:37 +02:00
Marco Trevisan (Treviño)
c5d9004236 gdbus-codegen: Use direct-access GValue macros for marshallers and GValues
This is the same we're doing in code generated by glib-genmarshaller and
what gmarshal does internally.

Since the generated gdbus C code can be considered private too, this is
safe to do, and will allow faster access to GValue objects.
2023-06-30 22:59:37 +02:00
Marco Trevisan (Treviño)
8943ceae6c gdbus-codegen: Generate marshallers for method handlers signals
Get rid completely of the usage of the generic marshaller in gdbus
generated code, using instead specific marshallers.

Code is not yet optimized fully since we may still have duplicated
functions to be generated.

Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/3028
2023-06-30 22:59:37 +02:00
Marco Trevisan (Treviño)
6de362fcae gdbus-test-codegen: Add test to check that fd lists can be passed
Add a simple implementation to check that fd-passing works when using
generated code, this is going to be useful to test special marshalling
case.
2023-06-30 22:59:37 +02:00
Marco Trevisan (Treviño)
3d313147f0 gio/test-codegen: use valid interface name for FdPassing test
So that it can be ran for real, not only tested for generation
2023-06-30 22:59:37 +02:00
Marco Trevisan (Treviño)
7b750972e8 meson/gio: Increase timeout for the codegen python tests
It's adding more stuff, let's ensure it wont timeout for no reason in
some platforms.

As per this mark also it as 'slow'
2023-06-30 22:59:25 +02:00
Marco Trevisan (Treviño)
1cd5c5678a gdbus-codegen: Generate signal marshallers for each interface signal
We relied on g_cclosure_marshal_generic() to easily generate signal
marshallers, but this relies on inspecting each parameter type with ffi
and this implies a performance hit, other than breaking the stack-frame
unwinder used by Linux perf and so by sysprof.

Given that we know the types we work on, it's easy enough to generate
the marshallers ourself.

Helps with: https://gitlab.gnome.org/GNOME/glib/-/issues/3028
2023-06-30 22:17:46 +02:00
Marco Trevisan (Treviño)
51c023f189 tests/codegen: Add checks for signal emission enums
These are checked to be correct by code compilation, but let's ensure we
also have some kind of forma check on the expected syntax.
2023-06-30 22:17:46 +02:00
Marco Trevisan (Treviño)
4b05e06e1c gdbus-codegen: Address more black cleanups 2023-06-30 22:17:46 +02:00
Marco Trevisan (Treviño)
1b345e411f meson: Add all the gdbus-codegen based tests to the proper suite
So it's easier to run them all with --suite=gdbus-codegen
2023-06-30 18:11:18 +02:00
Philip Withnall
ec754e5404 Merge branch 'fix-custom-dispatch-32bit-windows' into 'main'
gobject/tests: Fix running on 32-bit Windows

See merge request GNOME/glib!3490
2023-06-30 14:05:55 +00:00
Luca Bacci
2dc0a43bc0 glocalfileinfo: Fix GLocalFileStat getters on MinGW x86
For some reason, `time_t` is defined as being 32 bits wide on that
platform, which causes truncation of the timestamps from `struct stat`.

Avoid that problem by consistently using a 64-bit return value from the
`struct stat` accessors.

Helps: #3039
2023-06-30 15:00:56 +01:00
Philip Withnall
2a077b30a4 Merge branch 'gdbus-emit-signal-ids' into 'main'
codegen: Use g_signal_emit to emit signals

See merge request GNOME/glib!3488
2023-06-30 09:27:00 +00:00
Chun-wei Fan
cb1eb57581 gobject tests: Fix running custom-dispatch on 32-bit Windows
UAC will terminate this test program from running in 32-bit x86 builds as
it believes that it will alter Windows.  In order to make this run, we
create a manifest file for 32-bit Windows builds in order to tell UAC
that this program should not need admin privileges.

This will allow the entire test suite for GLib to run on 32-bit Windows
builds.
2023-06-30 11:32:54 +08:00
Chun-wei Fan
ab732692a0 tools: Add script to create UAC manifests for Windows
This is copied from the GTK source tree to put into our builds so that
we can generate a manifest file to pacify UAC on Windows for 32-bit
builds, as UAC will kill any 32-bit processes that it believes will
be an installer or will alter the system in any ways.

This will be used to fix running the custom-dispatch test program on
32-bit Windows builds.
2023-06-30 11:32:44 +08:00
Michael Catanzaro
31565bbb02 Merge branch 'fix_mirror_char_direction' into 'main'
guniprop: fix param direction in g_unichar_get_mirror_char(), for introspection

See merge request GNOME/glib!3489
2023-06-29 22:11:55 +00:00
G.Willems
d8483ef696 guniprop: fix param direction in g_unichar_get_mirror_char(), for introspection 2023-06-29 23:55:08 +02:00
Marco Trevisan (Treviño)
88d48a7a22 codegen: Use g_signal_emit to emit signals
We were using emit_by_name which implies looking up for the signal name,
while the generated code can easily remember the signal ID and use it
instead, allowing direct access to the signal emission.
2023-06-29 22:20:05 +02:00
Marco Trevisan
39e018e151 Merge branch '3007-option-context-colons' into 'main'
goption: Clarify expected format of option group description in docs

Closes #3007

See merge request GNOME/glib!3481
2023-06-29 17:00:49 +00:00
Marco Trevisan
b1ac3f883a Merge branch '3040-gtester-override-find-program' into 'main'
build: Call override_find_program() for gtester

Closes #3040

See merge request GNOME/glib!3478
2023-06-29 16:57:35 +00:00
Marco Trevisan
14907d2f77 Merge branch 'backports-typo-fix' into 'main'
docs: Fix a typo in the backports policy

See merge request GNOME/glib!3484
2023-06-29 16:54:22 +00:00
Marco Trevisan
23e04a5771 Merge branch 'issue-and-mr-docs' into 'main'
docs: Document issue and merge request triaging and review guidelines

See merge request GNOME/glib!3486
2023-06-29 16:52:48 +00:00
Philip Withnall
0c640f0130 docs: Document issue and merge request triaging and review guidelines
This documents the practices that I’ve been trying to follow for the
last few years for managing GLib issues and merge requests, and why they
seem to work well enough.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 16:50:00 +01:00
Philip Withnall
05b861db8b docs: Expand supported platforms documentation a little
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 15:51:44 +01:00
Philip Withnall
7c6d306927 docs: Fix a typo in the backports policy
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 15:40:59 +01:00
Philip Withnall
9ef3ebc23c Merge branch 'kintel-iconv-macos' into 'main'
Link with -framework Foundation and -framework AppKit to correctly link libiconv on macOS

Closes #3025

See merge request GNOME/glib!3483
2023-06-29 09:45:08 +00:00
Marius Kintel
0ae1b57ae4 Link with -framework Foundation and -framework AppKit to correctly link libiconv on macOS 2023-06-28 21:10:03 -04:00
Philip Withnall
9845f880ca glocalfileinfo: Delete some redundant code
`_g_stat_has_field (statbuf, G_LOCAL_FILE_STAT_FIELD_ATIME)` will always
return `TRUE` on Windows (since it uses a basic `struct stat`), so the
platform-inspecific code is equivalent to the Windows-specific code.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-28 17:49:45 +01:00
Philip Withnall
c3762deb78 glocalfileinfo: Fix incorrect use of struct statx.st_mtimensec on Android
`GLocalFileStat` is a platform-specific abstraction around `struct stat`
or `struct statx`. If `struct statx` is available, it will use that by
preference as it has more features.

`glocalfileinfo.c` was, in some places, incorrectly accessing the fields
of `GLocalFileStat` directly rather than through its `_g_stat_*()`
getters. While it correctly accounted for the platform-specific
differences between `st_mtimensec` and `st_mtim.tv_nsec`, it hadn’t been
updated to deal with `stx_mtime`.

On Android, `st_mtimensec` is defined as a fallback for
`st_mtim.tv_nsec` (even though it doesn’t need to be). This caused GLib
to take the `st_mtimensec` code path rather than the `stx_mtime` code
path, and hence try to dereference `st_mtim` in a `struct statx`.

Fix that by correctly using the `_g_stat_*()` getters consistently.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #3039
2023-06-28 17:32:25 +01:00
Philip Withnall
989b4cb8bd gapplication: Tweak option group description
To match the documented style for all option group descriptions.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #3007
2023-06-28 17:04:59 +01:00
Philip Withnall
98f9a11390 goption: Clarify expected format of option group description in docs
To match the current widespread usage.

We can’t automatically append a colon to the group description, as that
would interact badly with translation of the string.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #3007
2023-06-28 17:03:00 +01:00
Philip Withnall
e8f14a66a6 Merge branch 'wip/oholy/gio-mount-progress' into 'main'
gio-tool-mount: Add option to show progress when unmounting

See merge request GNOME/glib!3471
2023-06-28 15:51:51 +00:00
Ondrej Holy
c083a4d1a6 gio-tool-mount: Add option to show progress when unmounting 2023-06-28 15:51:51 +00:00
Philip Withnall
d3fbb6e0fc Merge branch 'meson-intl-iconv-lookup' into 'main'
meson: try iconv in libintl lookup

See merge request GNOME/glib!3448
2023-06-28 14:48:19 +00:00
Philip Withnall
57d2f161e6 Merge branch 'pcre' into 'main'
pcre subproject fixes: Allow fallback & static build

See merge request GNOME/glib!3470
2023-06-28 14:38:36 +00:00
Marius Kintel
dd5683ce64 meson: Allow fallback & static build of pcre subproject
Using `allow_fallback: false` on the first check for libpcre
was unnecessary, as `required: false` already disables using
fallbacks. `allow_fallback: false` meant that
`--force-fallback-for` couldn’t work. This commit fixes that.

Also allow the fallback libpcre to be built statically so it
can be linked into GLib.

Helps: #3025
2023-06-28 14:38:36 +00:00
Jan200101
a497d5be12 meson: try iconv in libintl lookup
This was originally removed in !2734 but still appears to be required for
some MinGW setups, such as the `x86_64-w64-mingw32.static` target in
[mxe](https://github.com/mxe/mxe).

Currently, this configuration fails the libintl internal assert on line
2128, as on this platform `ngettext()` is only found inside libiconv.

This commit will look up iconv potentially twice, once as `libiconv` and
potentially once as `libintl_iconv`. This is what the code did before
!2734 landed, so it’s known to work reliably on a number of platforms.
2023-06-28 15:22:36 +01:00
Philip Withnall
3fc569085c Merge branch 'gspawn-macos-buffer-limit' into 'main'
Avoid stack overflow in gspawn on macOS

Closes #3024

See merge request GNOME/glib!3468
2023-06-28 13:42:40 +00:00
Dario Saccavino
ccea09c1c8 Avoid stack overflow in gspawn on macOS 2023-06-28 13:42:40 +00:00
Emmanuele Bassi
4a7409a0ac Merge branch 'main' into 'main'
Added Annotations

Closes #2993

See merge request GNOME/glib!3476
2023-06-27 16:49:43 +00:00
N.Pranav Krishna
b963bcf8c5 Added Annotations 2023-06-27 16:49:43 +00:00