Commit Graph

30715 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
fee5da6893 docs(glib): Fix link in string-utils ref 2024-09-12 14:47:38 +01:00
Philip Withnall
aec0a38158 Merge branch 'update-lt-glib-2-82' into 'glib-2-82'
Updated Lithuanian translation

See merge request GNOME/glib!4263
2024-09-11 17:15:01 +00:00
Philip Withnall
7b1eb02291 Merge branch 'update-danish-translation-2-82' into 'glib-2-82'
Update Danish translation (2-82)

See merge request GNOME/glib!4265
2024-09-11 10:49:18 +00:00
Ask Hjorth Larsen
8066748684 Update Danish translation 2024-09-10 22:58:34 +02:00
Aurimas Černius
2f4a3612c0 Updated Lithuanian translation 2024-09-10 22:00:42 +03:00
Philip Withnall
3f5e135ba1 Merge branch 'urbalazs-glib-2-82-patch-28588' into 'glib-2-82'
Update Hungarian translation

See merge request GNOME/glib!4258
2024-09-09 10:27:43 +00:00
Philip Withnall
9fcbb00124 Merge branch 'glib-2-82' into 'glib-2-82'
Update British English translation

See merge request GNOME/glib!4255
2024-09-09 10:22:48 +00:00
Philip Withnall
96952a9719 Merge branch 'glib-2-82' into 'glib-2-82'
Update Bulgarian translation

See merge request GNOME/glib!4251
2024-09-09 10:16:36 +00:00
Philip Withnall
7f726b83fa Merge branch 'glib-2-82' into 'glib-2-82'
Update Indonesian translation

See merge request GNOME/glib!4259
2024-09-09 10:10:05 +00:00
Andika Triwidada
2d1a297943 Updated Indonesian translation 2024-09-09 09:10:16 +00:00
Balázs Úr
946c2c3024 Update Hungarian translation 2024-09-09 06:53:06 +00:00
Bruce Cowan
123360d10c Update British English translation 2024-09-08 19:12:15 +00:00
twlvnn kraftwerk
ed7d2b9b43 Update Bulgarian translation
Proof-read via D-L.
2024-09-07 16:44:04 +02:00
Philip Withnall
e2bc67de88 Merge branch 'glib-2-82' into 'glib-2-82'
Update German translation

See merge request GNOME/glib!4241
2024-09-05 10:25:10 +00:00
Tim Sabsch
da8eeaa10f Update German translation
Proof-read at https://l10n.gnome.org/vertimus/6432/390/18/
2024-09-05 07:30:10 +02:00
Philip Withnall
8b6983846b Merge branch 'glib-2-82' into 'glib-2-82'
Update Galician translations for glib-2-82

See merge request GNOME/glib!4240
2024-09-04 12:02:17 +00:00
Fran Diéguez
dc009da37b Update gl.po 2024-09-04 10:10:49 +00:00
Philip Withnall
34d02655be Merge branch 'backport-4237-fr-translation-glib-2-82' into 'glib-2-82'
Backport !4237 “Update french translation” to glib-2-82

See merge request GNOME/glib!4238
2024-09-03 15:38:04 +00:00
Vincent Chatelain
4a6e5d96b1 Update french translation 2024-09-03 16:09:38 +01:00
Philip Withnall
920134534e Merge branch 'rafaelff-glib-2-82-patch-88113' into 'glib-2-82'
Update Brazilian Portuguese translation

See merge request GNOME/glib!4234
2024-09-03 08:51:48 +00:00
Rafael Fontenelle
3a184c0059 Update Brazilian Portuguese translation 2024-09-02 16:02:14 +00:00
Philip Withnall
e12ffff43c Merge branch 'glib-2-82' into 'glib-2-82'
Update fa.po

See merge request GNOME/glib!4233
2024-09-02 15:10:33 +00:00
Danial Behzadi
93679f9d4a Update fa.po 2024-09-02 14:30:50 +00:00
Philip Withnall
0771249575 Merge branch 'patch-2-pt' into 'glib-2-82'
Update Portuguese translation

See merge request GNOME/glib!4231
2024-09-02 09:34:21 +00:00
Hugo Carvalho
73ac8840f8 Replace pt.po
Update Portuguese translation
2024-09-01 21:54:43 +00:00
Philip Withnall
5eeae58de7 Merge branch 'cs-update-2-82' into 'glib-2-82'
Update Czech translation [glib-2-82]

See merge request GNOME/glib!4230
2024-09-01 21:47:29 +00:00
AsciiWolf
6e1d35c643 Update Czech translation 2024-09-01 21:36:24 +02:00
Philip Withnall
1f502b00eb Merge branch 'piotrdrag/pl-translation-240831' into 'glib-2-82'
Update Polish translation for glib-2-82

See merge request GNOME/glib!4229
2024-09-01 17:23:01 +00:00
Piotr Drąg
b9f45f109b Update Polish translation 2024-08-31 15:09:15 +02:00
Michael Catanzaro
43c71b27e4 Merge branch 'backport-4219-bash-glib-2-82' into 'glib-2-82'
Backport !4219 “tests: Run lint tests with detected bash” to glib-2-82

See merge request GNOME/glib!4221
2024-08-28 13:24:09 +00:00
Michael Catanzaro
fbc65c1d12 Merge branch 'backport-4217-mtab-fixes-glib-2-82' into 'glib-2-82'
Backport !4217 “tests: Test against a sample mtab file in unix-mounts for getmntent()” to glib-2-82

See merge request GNOME/glib!4220
2024-08-28 13:18:42 +00:00
Benjamin Gilbert
8ed025769e tests: Run lint tests with detected bash
When we invoke a shell script directly, the system selects a bash binary
that might be different from the one detected by find_program('bash').
Explicitly use the one detected by Meson, matching the behavior of our
other test() invocations on shell scripts.

Fixes test failure on Windows in GitHub Actions CI:

    stdout: 1: UNKNOWN: Windows Subsystem for Linux has no installed distributions.
    stdout: 2: UNKNOWN: Distributions can be installed by visiting the Microsoft Store:
    stdout: 3: UNKNOWN: https://aka.ms/wslstore

Found-by: Benoit Pierre <benoit.pierre@gmail.com>
Fixes: d7601f7eed ("Incorporate some lint checks into `meson test`")
2024-08-28 11:02:53 +01:00
Philip Withnall
729b932d0b
tests: Test against a sample mtab file in unix-mounts for getmntent()
The test in `unix-mounts` to see whether `g_unix_mounts_get_from_file()`
can parse an example file was working fine when GLib is built with
libmount, but not when built without it (and hence typically using
`getmntent()`).

This is because libmount supports mountinfo files (like
`/proc/self/mountinfo`), but `getmntent()` only supports mount files
(like `/proc/mounts`). The test was written only with the former.

So, change the test to use mount files when GLib is built without
libmount support.

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

Fixes: #3456
2024-08-28 10:59:38 +01:00
Philip Withnall
8200545ece
2.82.0
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-26 10:17:20 +01:00
Philip Withnall
d7795da6ab Merge branch 'backports-to-glib-2-82' into 'glib-2-82'
Various small backports to glib-2-82

See merge request GNOME/glib!4213
2024-08-26 09:03:42 +00:00
Philip Withnall
27e5e4d4a2 Merge branch 'backport-4214-mutex-speedup-glib-2-82' into 'glib-2-82'
Backport !4214 “gthread: Move thread _impl functions to static inlines for speed” to glib-2-82

See merge request GNOME/glib!4215
2024-08-26 08:27:42 +00:00
Philip Withnall
e2875a9fca
gthread: Move thread _impl functions to static inlines for speed
The changes made in commit bc59e28bf6
(issue #3399) fixed introspection of the GThread API. However, they
introduced a trampoline in every threading function. So with those
changes applied, the disassembly of `g_mutex_lock()` (for example) was:
```
0x7ffff7f038b0 <g_mutex_lock>    jmp 0x7ffff7f2f440 <g_mutex_lock_impl>
0x7ffff7f038b5                   data16 cs nopw 0x0(%rax,%rax,1)
```

i.e. It jumps straight to the `_impl` function, even with an optimised
build. Since `g_mutex_lock()` (and various other GThread functions) are
frequently run hot paths, this additional `jmp` to a function which has
ended up in a different code page is a slowdown which we’d rather avoid.

So, this commit reworks things to define all the `_impl` functions as
`G_ALWAYS_INLINE static inline` (which typically expands to
`__attribute__((__always_inline__)) static inline`), and to move them
into the same compilation unit as `gthread.c` so that they can be
inlined without the need for link-time optimisation to be enabled.

It makes the code a little less readable, but not much worse than what
commit bc59e28bf6 already did. And perhaps
the addition of the `inline` decorations to all the `_impl` functions
will make it a bit clearer what their intended purpose is
(platform-specific implementations).

After applying this commit, the disassembly of `g_mutex_lock()`
successfully contains the inlining for me:
```
=> 0x00007ffff7f03d80 <+0>:	xor    %eax,%eax
   0x00007ffff7f03d82 <+2>:	mov    $0x1,%edx
   0x00007ffff7f03d87 <+7>:	lock cmpxchg %edx,(%rdi)
   0x00007ffff7f03d8b <+11>:	jne    0x7ffff7f03d8e <g_mutex_lock+14>
   0x00007ffff7f03d8d <+13>:	ret
   0x00007ffff7f03d8e <+14>:	jmp    0x7ffff7f03610 <g_mutex_lock_slowpath>
```

I considered making a similar change to the other APIs touched in #3399
(GContentType, GAppInfo, GSpawn), but they are all much less performance
critical, so it’s probably not worth making their code more complex for
that sake.

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

Fixes: #3417
2024-08-26 08:38:58 +01:00
Philip Withnall
635b033a2b
docs: Set -Dglib_debug=enabled by default and document it for distros
As per https://gitlab.gnome.org/GNOME/glib/-/issues/3421#note_2206315:

It seems like there’s agreement that glib_debug should be enabled for
developers and disabled for distros; and it also seems like there’s no
reliable way to figure this out magically (because not everyone ties
things to `-Dbuildtype=*`). So, we’re left with forcing some group of
people to manually set the value of `glib_debug`. There are more
developers/contributors than there are distros, and distros are more
likely to notice an accidentally-slow GLib package than developers are
likely to notice an accidentally-not-asserting-hard-enough local build,
so let’s say:

The default should be `-Dglib_debug=enabled`, and distros should probably
all override that to `-Dglib_debug=disabled`.

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

Fixes: #3421
2024-08-25 18:45:58 +01:00
Philip Withnall
4f85dfe34b
meson: Fix reference to docs/macros.md in meson.options
It was renamed from `macros.txt` a while ago.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-25 18:45:51 +01:00
Philip Withnall
9a0b1498e0
gmenumodel: Acknowledge in docs that the UI used in the example is old
This kind of deeply nested menu is definitely no longer good UI practice
for most apps (deeply nested menus make things hard to find, and require
good mouse control to navigate). However, it does serve as a good
demonstration of the concepts in `GMenuModel`, so keep it, with a
sentence to acknowledge that it’s not a good UI.

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

Fixes: #3451
2024-08-25 18:44:13 +01:00
Philip Withnall
d0a49ddcb3
build: Check for epoll_create1 rather than epoll_create in meson.build
Because `epoll_create1()` is what the code in `giounix-private.c`
actually uses.

Spotted by Xuntao Chi.

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

Fixes: #3450
2024-08-25 18:44:06 +01:00
Michael Catanzaro
7de17e64f6 Merge branch '3448-revert-cancellable-locking-changes' into 'glib-2-82'
Revert !2765 “GCancellable: Use per-instance mutex logic instead of global critical sections” for glib-2-82

See merge request GNOME/glib!4211
2024-08-25 17:33:32 +00:00
Philip Withnall
f9668b92e4
Revert "gio/tests: Ensure that a GCancellableSource can be used muliple times"
This reverts commit 0a8cb10f22.

Merge request !2765 has caused a thread safety regression in
`GCancellableSource` disposal. It landed too late in the cycle to fix
with any confidence before the 2.82 release, so the changes are being
reverted for the `glib-2-82` branch and 2.82.0 release.

Fixes: #3448
Re-opens: #774, #2309, #2313
2024-08-25 17:39:50 +01:00
Philip Withnall
5d66cf7cee
Revert "GCancellable: Use per-instance mutex logic instead of global critical sections"
This reverts commit 3a07b2abd4.

Merge request !2765 has caused a thread safety regression in
`GCancellableSource` disposal. It landed too late in the cycle to fix
with any confidence before the 2.82 release, so the changes are being
reverted for the `glib-2-82` branch and 2.82.0 release.

Fixes: #3448
Re-opens: #774, #2309, #2313
2024-08-25 17:39:40 +01:00
Philip Withnall
36f08c0495
Revert "gcancellable: Reference the object before locking when doing signal emission"
This reverts commit 54d9c26b34.

Merge request !2765 has caused a thread safety regression in
`GCancellableSource` disposal. It landed too late in the cycle to fix
with any confidence before the 2.82 release, so the changes are being
reverted for the `glib-2-82` branch and 2.82.0 release.

Fixes: #3448
Re-opens: #774, #2309, #2313
2024-08-25 17:39:30 +01:00
Philip Withnall
266e892a5e
Revert "gcancellable: Mark assert-only variable as unused"
This reverts commit 6c679fb37a.

Merge request !2765 has caused a thread safety regression in
`GCancellableSource` disposal. It landed too late in the cycle to fix
with any confidence before the 2.82 release, so the changes are being
reverted for the `glib-2-82` branch and 2.82.0 release.

This commit is not problematic, but is built entirely on top of the
problematic MR, so has to be reverted.

Fixes: #3448
Re-opens: #774, #2309, #2313
2024-08-25 17:39:04 +01:00
Philip Withnall
282545565a Merge branch 'ci-msys2-mingw32-catch-access-violation' into 'main'
CI/msys2-mingw32: Set the G_DEBUGGER environment variable

See merge request GNOME/glib!4205
2024-08-25 15:36:08 +00:00
Philip Withnall
87ebb444a5 Merge branch 'translation' into 'main'
Update Chinese translation

See merge request GNOME/glib!4207
2024-08-25 14:31:03 +00:00
Philip Withnall
626ab87d16 Merge branch 'update-sv-translation' into 'main'
Update Swedish translation

See merge request GNOME/glib!4208
2024-08-25 14:27:30 +00:00
Anders Jonsson
052b295ac2 Update Swedish translation 2024-08-25 14:06:59 +02:00