Commit Graph

30756 Commits

Author SHA1 Message Date
Philip Withnall
683cf0a1ba
tests: Fix a scan-build warning about uninitialised variables
It’s a false positive, but points to a slightly unnecessary use of a
global variable to store something which could be computed per-test.

scan-build thought that arrays of size `n_handlers` could have
uninitialised values accessed in them if `n_handlers` were to change
value part-way through a test (which it didn’t).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 23:25:06 +01:00
Philip Withnall
a0f124e67c
ci: Ignore files in meson-private in scan-build runs
These are typically files generated by the gobject-introspection dumper,
which we don’t want to scan as they are not part of GLib’s runtime code.

For example:
```
/builds/GNOME/glib/_scan_build/meson-private/tmpr3jwvyib/tmp-introspect5dmnb_je/GObject-2.0.c:799:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference]
  799 |       g_printerr ("%s\n", error->message);
      |                           ^~~~~~~~~~~~~~
1 warning generated.
```

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 23:24:59 +01:00
Philip Withnall
d6be962af9
ci: Fix subproject initialisation for scan-build and coverity
Fixes commit 93271385f9.

Previously the `before_script` from `.build-linux` was used in whole for
these two jobs, but since the `.build-gobject-introspection` template
was also added, the `before_script`s from the two templates need to be
explicitly combined.

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

Fixes: #3458
2024-09-12 23:24:53 +01:00
Philip Withnall
744cdd0f0d Merge branch 'avoid-resource-allocation' into 'main'
resource: Add g_resource[s]_has_children and avoid a pointless allocation

See merge request GNOME/glib!4245
2024-09-12 22:04:39 +00:00
Philip Withnall
b5cab7c6b9
tests: Add g_resource_has_children() test for empty path
To get the code branch coverage up to 100% because it’s not that hard.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 22:53:26 +01:00
Philip Withnall
6c80db2c24
ci: Force submodules to be fetched first in VS2017 CI jobs
No idea why this is now suddenly not working.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 21:40:41 +01:00
Matthias Clasen
46fdbb43fa resourcefile: Avoid an allocation
Instead of enumerating the children only to throw them away,
use the new g_resources_has_children() api.
2024-09-12 21:15:55 +01:00
Matthias Clasen
a14241c895 resource: Add g_resource[s]_has_children
These functions avoid allocating the children array when it is
not needed.
2024-09-12 21:15:55 +01:00
Matthias Clasen
cb5209282b resource: Small refactoring
Break out a helper function so we can reuse it in the next commit.
2024-09-12 21:15:55 +01:00
Philip Withnall
0134888d50
build: Bump gvdb subproject dependency and disable tests
This brings in https://gitlab.gnome.org/GNOME/gvdb/-/merge_requests/23,
which is needed for the following few commits.

Unfortunately, one of the other commits it brings in introduces a
sort-of-dependency-loop between GIO and GVDB. To avoid that, we have
to disable the GVDB tests. See
https://gitlab.gnome.org/GNOME/gvdb/-/merge_requests/25 for details.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 21:15:42 +01:00
Philip Withnall
ebdfcf15bf Merge branch 'meson' into 'main'
build: Bump Meson dependency to 1.4.0

See merge request GNOME/glib!4244
2024-09-12 19:06:19 +00:00
Benjamin Gilbert
b2342b1e0c subprojects: Update zlib to 1.3.1
Bug fixes and a security fix for CVE-2022-37434.
2024-09-12 19:15:34 +01:00
Benjamin Gilbert
51e3e7d9ae build: Bump Meson dependency to 1.4.0
Meson 1.5.1 is available in the fd.o SDK and in Debian testing, so the
glib Meson policy says we can update.  Update the minimum only as far as
1.4.0 because we don't yet have a need for 1.5.0.

This allows us to:

- Use file.full_path() to avoid deprecation warnings on str.format(file).
- Set c_std=gnu99,c99 to avoid deprecation warnings with gnu99 on MSVC.

Update all the CI builds to use the latest 1.4.x patch release, 1.4.2.

The FreeBSD runner cannot be updated via `gitlab-ci.yml`, so will be
broken for now.

Similarly, the macOS build will not work unless `-Dc_std=gnu99` is
specified at configure time, due to
https://github.com/mesonbuild/meson/issues/13639.
2024-09-12 19:15:05 +01:00
Philip Withnall
5c2c6ab828 Merge branch 'update-danish-translation' into 'main'
Update Danish translation

See merge request GNOME/glib!4264
2024-09-12 13:51:59 +00:00
Philip Withnall
78884455c4 Merge branch 'fix-string-fn-link' into 'main'
docs(glib): Fix link in string-utils ref

See merge request GNOME/glib!4269
2024-09-12 12:18:44 +00:00
FeRD (Frank Dana)
0bda424669 docs(glib): Fix link in string-utils ref 2024-09-12 06:04:34 -04:00
Benjamin Gilbert
b7203e9406 build: Drop redundant install_tag arguments for headers
All supported versions of Meson will autodetect the tag.
2024-09-11 22:04:39 -07:00
Benjamin Gilbert
cddb084a3f subprojects: Update proxy-libintl to current HEAD
Fix Meson warnings.
2024-09-11 22:04:39 -07:00
Philip Withnall
7fb8c80507 Merge branch 'main' into 'main'
Update Russian translation

See merge request GNOME/glib!4262
2024-09-11 22:04:47 +00:00
Philip Withnall
927683ebd9 Merge branch 'update-lt-translation' into 'main'
Updated Lithuanian translation

See merge request GNOME/glib!4256
2024-09-11 09:34:15 +00:00
Ask Hjorth Larsen
6a8468d9e2 Update Danish translation 2024-09-10 22:54:42 +02:00
jtux270
0661cba66c Update Russian translation 2024-09-10 16:46:16 +00:00
Michael Catanzaro
7a1c8d9ba3 Merge branch 'main' into 'main'
gsocket windows: check event before calling WSAEnumNetworkEvents

See merge request GNOME/glib!4261
2024-09-10 13:08:50 +00:00
Silvio Lazzeretti
cfdb60d11d gsocket windows: check event before calling WSAEnumNetworkEvents
The WSAEnumNetworkEvents API is called every time the socket
needs to be checked for status changes. Doing this in an application
with several sockets could generate a high cpu usage since
this call is done for each socket at each iteration of the main loop.
Since there is also a WSAEvent that gets signaled when there is
a change in the status of the socket, checking its status and
calling the WSAEnumNetworkEvents API only if the event is signaled,
can reduce the overall cpu usage.
2024-09-10 09:05:19 +02:00
Philip Withnall
c09ffca226 Merge branch 'ebassi/collate-docs' into 'main'
Collation keys are not encoded in UTF-8

See merge request GNOME/glib!4260
2024-09-09 19:30:39 +00:00
Emmanuele Bassi
0630b8145d Collation keys are not encoded in UTF-8
The value returned when generating a collation key is an opaque binary
blob that is only meant to be used for byte-wise comparisons; we should
not imply it's a nul-terminated, UTF-8 string.

This is especially true for language bindings that try to convert C
strings returned by GLib into UTF-8 encoded strings.

Ideally, the collation functions should return a byte array, but the
closest thing we have is the OS native encoding type that we use for
paths and environment variables.

See: https://github.com/gtk-rs/gtk-rs-core/issues/1504
2024-09-09 16:58:38 +01:00
Philip Withnall
2ec62d638d Merge branch 'main' into 'main'
Update British English translation (main)

See merge request GNOME/glib!4254
2024-09-09 10:24:49 +00:00
Philip Withnall
e2dba45bda Merge branch 'main' into 'main'
Update Bulgarian translation

See merge request GNOME/glib!4253
2024-09-09 10:18:39 +00:00
Philip Withnall
f4f8a7b8fd Merge branch 'input-stream-doc' into 'main'
gio: Fix overindented docstring of buffer argument

See merge request GNOME/glib!4252
2024-09-09 10:17:11 +00:00
Philip Withnall
963e271da0 Merge branch 'urbalazs-main-patch-41523' into 'main'
Update Hungarian translation

See merge request GNOME/glib!4257
2024-09-09 10:04:37 +00:00
Balázs Úr
23dcc59290 Update Hungarian translation 2024-09-09 06:50:13 +00:00
Aurimas Černius
69901d7cd1 Updated Lihuanian translation 2024-09-08 19:32:11 +00:00
Bruce Cowan
3135592423 Update British English translation 2024-09-08 19:13:22 +00:00
twlvnn kraftwerk
d1a5ac8205 Update Bulgarian translation
Proof-read via D-L.
2024-09-08 18:25:59 +02:00
Guido Günther
10910cc896 gio: Improve linking for g_io_input_stream_read_all*
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-09-08 10:19:07 +02:00
Guido Günther
cdd807aaa8 gio: Fix overindented docstring of buffer argument
Otherwise it'll be rendered as verbatim block

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-09-08 10:18:44 +02:00
Michael Catanzaro
8810cf7a24 Merge branch 'gerror-improvements-dir' into 'main'
dir: Avoid some allocations

See merge request GNOME/glib!4248
2024-09-06 15:59:17 +00:00
Matthias Clasen
5d986fd42a dir: Avoid some allocations
If no error is passed, we don't need to do charset conversions.
2024-09-06 10:49:31 -04:00
Philip Withnall
ced5c6d960 Merge branch 'main' into 'main'
Update Galician translations for main

See merge request GNOME/glib!4239
2024-09-04 12:07:14 +00:00
Fran Diéguez
1360d47138 Update gl.po 2024-09-04 09:56:45 +00:00
Philip Withnall
2c7624fafb Merge branch 'translation/main/fr_FR' into 'main'
Update French translation

See merge request GNOME/glib!4237
2024-09-03 15:07:47 +00:00
Vincent Chatelain
d6acea5de5 Update french translation 2024-09-03 11:06:25 +00:00
Philip Withnall
85286f4f57 Merge branch 'cherry-pick-4229-4234-translations-main' into 'main'
Cherry pick Polish and Brazilian Portuguese translations from glib-2-82 to main

See merge request GNOME/glib!4236
2024-09-03 09:36:52 +00:00
Rafael Fontenelle
1cf1b2f04b Update Brazilian Portuguese translation 2024-09-03 10:06:34 +01:00
Piotr Drąg
1df8df0cce Update Polish translation 2024-09-03 10:06:34 +01:00
Philip Withnall
396ffaa9ba Merge branch 'update_uk1' into 'main'
Update Ukrainian translation

See merge request GNOME/glib!4235
2024-09-03 08:54:47 +00:00
Yuri Chornoivan
485002bd2e Update Ukrainian translation 2024-09-02 21:55:28 +03:00
Philip Withnall
8fdb8c44c3 Merge branch 'mcatanzaro/gspawn-close' into 'main'
gspawn: close child_err_report_fd before exiting on error

See merge request GNOME/glib!4227
2024-09-01 17:43:48 +00:00
Philip Withnall
f505d3df98 Merge branch 'cs-update' into 'main'
Update Czech translation

See merge request GNOME/glib!4225
2024-09-01 17:33:12 +00:00
Philip Withnall
007879405c Merge branch 'patch-pt-1' into 'main'
Update Portuguese translation

See merge request GNOME/glib!4226
2024-09-01 17:27:41 +00:00