Commit Graph

32174 Commits

Author SHA1 Message Date
Philip Withnall
63ff527253 Merge branch 'update-tr' into 'main'
Update Turkish translation

See merge request GNOME/glib!4802
2025-09-15 09:24:50 +00:00
Sabri Ünal
25b5bf8ea7 Update Turkish translation
Approved by Emin Tufan Çetin
https://l10n.gnome.org/vertimus/glib/main/po/tr/
2025-09-14 14:31:25 +03:00
Tobias Stoeckmann
82c83a8871 gutils: Support test env in load_user_special_dirs
XDG_CONFIG_DIR and HOME can be overridden with test environments. Read
these variables before building them again.

It's not possible to call the getter functions directly because the
caller of load_user_special_dirs already holds a lock and locking again
is undefined behavior and could lead to deadlocks.

Separate the functionality out into unlocked functions which definitely
have to be static to not expose them. Use them while holding the lock.
2025-09-12 17:06:13 +02:00
Philip Withnall
a0f23830b0 Merge branch 'patch-1' into 'main'
`gio/tests/socket-listener` should depend on `libdl`

Closes #3780

See merge request GNOME/glib!4799
2025-09-11 16:53:33 +00:00
Uwe Korn
2b0f5304bd gio/tests/socket-listener should depend on libdl 2025-09-11 16:04:15 +00:00
Sebastian Dröge
58791ea699 GDBus: Add (out) annotation to quark in g_dbus_error_register_error_domain() 2025-09-11 14:01:27 +03:00
Tobias Stoeckmann
c79db8f282 gstring: Support large strings in g_string_replace
Allow more than G_MAXUINT replacements in g_string_replace. Even
though the return value type is guint, do as many replacements
as requested if limit is 0 and return G_MAXUINT if even more
operations were performed to satisfy current ABI/API.

With input by Philip Withnall.
2025-09-10 17:39:48 +02:00
Philip Withnall
d331794de4 Merge branch 'g_strescape_oflow' into 'main'
gstrfuncs: Check string length in g_strescape

See merge request GNOME/glib!4791
2025-09-10 11:28:49 +00:00
Luca Bacci
f8d00c6458 ci/msys2: Use builtin b_coverage option
...instead of custom CFLAGS
2025-09-10 10:14:54 +02:00
Tobias Stoeckmann
b274f82963 gstrfuncs: Check string length in g_strescape
If the input string is too large on a 32 bit system, it is possible
to trigger an integer overflow which subsequently leads to an out of
boundary write.
2025-09-09 21:04:17 +02:00
Philip Withnall
77fe11e8b2 Merge branch 'urbalazs-main-patch-77698' into 'main'
Update Hungarian translation

See merge request GNOME/glib!4787
2025-09-09 09:28:52 +00:00
Balázs Úr
7a5a7a7133 Update Hungarian translation 2025-09-09 08:11:58 +00:00
Philip Withnall
eba68f0378 Merge branch 'main' into 'main'
Update Galician translations

See merge request GNOME/glib!4786
2025-09-08 12:23:45 +00:00
Fran Dieguez
31c519a851 Update Galician translations 2025-09-08 09:21:05 +02:00
Philip Withnall
3de88a5e31 Merge branch 'update-pt_BR' into 'main'
Update Brazilian Portuguese translation

See merge request GNOME/glib!4780
2025-09-07 16:02:35 +00:00
Philip Withnall
67dae8f4ad Merge branch 'gmem_oflow_check' into 'main'
gmem: Replace SIZE_OVERFLOWS with g_size_checked_mul

See merge request GNOME/glib!4779
2025-09-07 15:11:02 +00:00
Philip Withnall
57b6738c6d Merge branch 'lb90-maintainer' into 'main'
docs: Add Luca Bacci as a co-maintainer of the Windows code

See merge request GNOME/glib!4773
2025-09-07 15:03:17 +00:00
Philip Withnall
3b8c4a1f01 Merge branch 'patch-1' into 'main'
Update Japanese translation

See merge request GNOME/glib!4785
2025-09-07 14:59:33 +00:00
Philip Withnall
e518a9df7d Merge branch 'translation-ko-20250906' into 'main'
Update Korean translation

See merge request GNOME/glib!4782
2025-09-07 14:58:11 +00:00
Philip Withnall
52a7cab4f3 Merge branch 'main' into 'main'
Update eu translation

See merge request GNOME/glib!4781
2025-09-07 14:57:41 +00:00
Philip Withnall
515bc96e87 Merge branch 'clang_test_warnings' into 'main'
tests: Fix clang compilation warnings

See merge request GNOME/glib!4778
2025-09-07 14:56:27 +00:00
Philip Withnall
49bd40d958 Merge branch 'update-lt-translation' into 'main'
Update Lithuanian translation

See merge request GNOME/glib!4777
2025-09-07 14:55:33 +00:00
Philip Withnall
c2442d07e7 Merge branch 'update_uk2' into 'main'
Update Ukrainian translation

See merge request GNOME/glib!4775
2025-09-07 14:55:01 +00:00
Philip Withnall
c8e373ba52 Merge branch 'catalan' into 'main'
Update Catalan translation

See merge request GNOME/glib!4776
2025-09-07 14:54:44 +00:00
Makoto Sakaguchi
5b450a2390 Update Japanese translation
From https://l10n.gnome.org/vertimus/glib/main/po/ja/
2025-09-07 08:50:52 +09:00
Tobias Stoeckmann
bb6eab0e67 ghash: Turn version into guintptr
The gintptr data type is already used in iterator. Keep versions in sync
to avoid issues when one of them overflows while the other did not
(yet). Since integer overflows could eventually happen anyway, make
version unsigned.
2025-09-06 23:54:54 +02:00
Tobias Stoeckmann
cd7f7b29e7 ghash: Turn mod into guint
The only signed arithmetic left is the version. Keep it at that for now
but turn mod into unsigned for all other unsigned operations.
2025-09-06 23:23:29 +02:00
Tobias Stoeckmann
2b51b57f05 ghash: Turn size into guint
The size attribute is actually a "capacity" instead of a size in a more
classical sense: It doesn't represent the byte size but the amount of
elements within the hash table.

This is always a power of two, capped at 32 bit. This limit is required
to satisfy the support of converting a GHash into a GArray, which is
capped at G_MAXUINT elements.

Treat the size as capacity and bring it to the same data type as nnodes
and other element counters for better performance.

While at it, turn all variables taking the value of size into a guint
as well.

Closes: #672
2025-09-06 23:23:25 +02:00
Tobias Stoeckmann
4414a42c42 ghash: Perform shift calculations unsigned
Having unsigned values guarantees that g_hash_table_find_closest_shift
will never loop endlessly. Also make sure that it's impossible to
evade the sanity check of size in g_hash_table_set_shift. Since the
value will be an index, do not allow negative values.

Helps: #672
2025-09-06 22:17:53 +02:00
Tobias Stoeckmann
b5edef8200 ghash: Remove float from g_hash_table_resize
Multiplying nnodes with 1.333 leads to floating point operation.
Just divide nnodes by 3 and add it to nnodes for slightly faster
code.
2025-09-06 21:58:22 +02:00
Tobias Stoeckmann
81aa7a8bc4 ghash: Support all nnodes values in g_hash_table_maybe_resize
If nnodes value is very large, multiplying by 4 could overflow its guint
data type. Instead, first check that size is not 0, subtract by one, divide
by 4 and then check if that value is larger or equal to nnodes.

Flipping these checks has a nice advantage for small hash tables.

Helps: #672
2025-09-06 21:58:04 +02:00
Changwoo Ryu
89a20f8c5b Update Korean translation 2025-09-06 20:11:23 +09:00
Asier Saratsua Garmendia
1177c8eae3 Update eu translation 2025-09-06 07:33:09 +00:00
Rafael Fontenelle
9e1241a0d0 Update Brazilian Portuguese translation 2025-09-05 20:24:43 -03:00
Tobias Stoeckmann
ceb5ac4925 gmem: Replace SIZE_OVERFLOWS with g_size_checked_mul
Using the builtin multiplication checks leads to less instructions used
for these common functions (true for clang as well as gcc on x86_64).

Also, from a C perspective, the result is re-used, making code audits
easier.
2025-09-05 23:00:07 +02:00
Tobias Stoeckmann
c546ac20d8 tests: Fix clang compilation warnings
With these adjustments, building with clang leads to no warnings:

- The "{ NULL }" statement could be replaced with "{ 0 }" to satisfy
  clang, but this way it's explicitly filling all fields
- Even though "i" is not read with these g_array_binary_search calls,
  it rightfully should be set
2025-09-05 22:34:44 +02:00
Aurimas Černius
fcaefd2fa6 Update Lithuanian translation 2025-09-05 20:01:54 +00:00
Jordi Mas
a04e18fc6d Update Catalan translation 2025-09-05 20:21:22 +02:00
Yuri Chornoivan
4310757baa Update Ukrainian translation 2025-09-05 20:57:17 +03:00
Philip Withnall
87eaa8b0f0 docs: Add Luca Bacci as a co-maintainer of the Windows code
He’s been listed in `docs/CODEOWNERS` as one of the co-maintainers for a
long time, and it seems like an administrative oversight that the right
record was never added to `glib.doap` to give the GitLab maintainer
rights bit.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-09-05 14:18:08 +01:00
Philip Withnall
723c28e116 Merge branch 'ghash_iter_overflow' into 'main'
ghash: Handle all table sizes in iterator

See merge request GNOME/glib!4756
2025-09-05 13:10:04 +00:00
Philip Withnall
16b92b3c9e Merge branch 'ghash_entry_is_big' into 'main'
ghash: Fix entry_is_big for CHERI architecture

See merge request GNOME/glib!4755
2025-09-05 13:07:51 +00:00
Philip Withnall
b1ad93eff2 Merge branch 'bookmark_escape' into 'main'
gbookmarkfile: Escape icon href and mime-type

See merge request GNOME/glib!4760
2025-09-05 13:07:24 +00:00
Philip Withnall
e33be08bda 2.86.0
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2.86.0
2025-09-05 13:42:14 +01:00
Philip Withnall
56136cb804 Merge branch 'Persian' into 'main'
po: Update Persian translation.

See merge request GNOME/glib!4772
2025-09-05 12:22:30 +00:00
Danial Behzadi
831c4f7f83 po: Update Persian translation. 2025-09-05 15:25:47 +03:30
Philip Withnall
20b023a287 Merge branch 'gmessages_win32_debug' into 'main'
gmessages: Fix win32_keep_fatal_message regression

See merge request GNOME/glib!4768
2025-09-05 08:57:03 +00:00
Philip Withnall
2b7346e088 Merge branch 'main' into 'main'
Update Georgian translation

See merge request GNOME/glib!4771
2025-09-05 08:51:10 +00:00
Philip Withnall
fad50ad4e2 Merge branch 'translation' into 'main'
Update Chinese translation

See merge request GNOME/glib!4770
2025-09-05 08:51:03 +00:00
NorwayFun
edc81fa803 Update ka.po 2025-09-04 12:34:17 +00:00