Commit Graph

28922 Commits

Author SHA1 Message Date
Emmanuele Bassi
5e7c512609 docs: Fix various invalid links 2023-10-23 10:25:31 +01:00
Emmanuele Bassi
3013a0ef4a docs: Fix the annotation for GSubprocessLauncher 2023-10-23 10:25:31 +01:00
Emmanuele Bassi
d3d69cb8ba docs: Fix annotations for GSimpleProxyResolver
Drop "nullable" from the default-proxy property docblock, and correctly
separate the annotation from the return value's description.
2023-10-23 10:25:31 +01:00
Emmanuele Bassi
cfb11a8d63 docs: Avoid a bare "returns:"
Lines inside a docblock cannot begin with "returns:", as that is the tag
for the documentation of the return value.
2023-10-23 10:25:30 +01:00
Emmanuele Bassi
c86f469c1e Ignore autocleanups when generating introspection data 2023-10-23 10:25:30 +01:00
Emmanuele Bassi
0f8aaee2bf Add missing annotation separator 2023-10-23 10:25:30 +01:00
Emmanuele Bassi
fb84bad077 Remove unnecessary annotation
All pointer-based properties are nullable by definition, and the
`nullable` annotation is not accepted at the identifier level.
2023-10-23 10:25:30 +01:00
Emmanuele Bassi
c5eb130175 Fix broken annotation in GIOChannel
Missing separator between annotation and description.
2023-10-23 10:25:30 +01:00
Philip Withnall
9a03cdbcad Merge branch '3148-appinfo-skip-if-utils-unavailable' into 'main'
tests: Skip appinfo/associations test if update-*-database not installed

Closes #3148

See merge request GNOME/glib!3658
2023-10-22 23:35:40 +00:00
Michael Catanzaro
ceca2dc5bc Merge branch '3144-file-set-contents-truncation' into 'main'
gfileutils: Add a missing ftruncate() call when writing files

Closes #3144

See merge request GNOME/glib!3650
2023-10-22 22:41:56 +00:00
Philip Withnall
8629024243 tests: Skip appinfo/associations test if update-*-database not installed
If `update-desktop-database` or `update-mime-database` are not
installed, there are a few `GAppInfo` methods for modifying file
associations which will print a `g_warning()` when called. Something
like:
```
GLib-GIO-FATAL-WARNING: Failed to execute child process ‘update-desktop-database’ (No such file or directory)
```

(Example: https://gitlab.gnome.org/zamaudio/glib/-/jobs/3190053)

This will cause the appinfo/associations test to fail, as warnings are
fatal.

If that’s going to happen, skip the test. We can’t hard-depend on these
tools as they are external to GLib and only needed for a few operations.
Instead we have a soft runtime dependency on them; that should be
reflected in the tests.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Helps: #3148
2023-10-22 23:34:00 +01:00
Michael Catanzaro
7a9f8eec35 Merge branch 'alt-digits-locale-change' into 'main'
gdatetime: Fix incorrect alt-digits being used after changing locale

See merge request GNOME/glib!3655
2023-10-22 22:32:34 +00:00
Philip Withnall
4b9ec32b26 ci: Remove some duplicate packages from an install list
This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-22 22:10:07 +01:00
Philip Withnall
afd8dde13f gdatetime: Fix incorrect alt-digits being used after changing locale
The alt-digits are loaded from `nl_langinfo()` in a `GOnce` section,
which means `nl_langinfo()` is not re-queried after the process changes
locale (if that happens).

So, change the `GOnce` to a mutex and store the locale of the alt-digits
alongside them. This will introduce contention when calling
`format_number()` is called, but how often are multiple threads trying
to format dates at the same time?

If this does get highlighted as a performance problem, the other
approach I considered was a `GPrivate` struct containing all the
locale-specific cached data. That comes at the cost of using a
`GPrivate` slot (although that’s only particularly expensive on Windows,
and the locale code is quite different for Windows, so perhaps that
could be avoided entirely). It does mean that all locale printing could
be lock-free and still safely update cached data on a locale change.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-22 22:10:07 +01:00
Philip Withnall
3f705ffa12 gfileutils: Add a missing ftruncate() call when writing files
When calling `g_file_set_contents_full()` without
`G_FILE_SET_CONTENTS_CONSISTENT`, the file is written by opening it,
`write()`ing to it, then closing it.

This is fine as long as the file is not longer than the new content you
want to set its contents to. If it is, the last bit of the old content
remains, because `g_file_set_contents_full()` was missing an
`ftruncate()` call.

Fix that, and change the tests to catch truncation failures in future.

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

Fixes: #3144
2023-10-22 21:37:28 +01:00
Philip Withnall
86a38bdd92 Merge branch 'gmodule-freebsd' into 'main'
gmodule-dl: Use RTLD_DEFAULT on FreeBSD too

See merge request GNOME/glib!3656
2023-10-22 20:13:12 +00:00
Gleb Popov
bb2ab2647d gmodule-dl: Use RTLD_DEFAULT on FreeBSD too 2023-10-22 21:41:33 +03:00
Sabri Ünal
8e959e32b1 Update Turkish translation 2023-10-21 18:59:04 +00:00
Marco Trevisan
ca57acd71b Merge branch '3112-unicode-15.1' into 'main'
gunicode: Update to Unicode 15.1.0

Closes #3112

See merge request GNOME/glib!3651
2023-10-19 17:02:37 +00:00
Philip Withnall
4ba42dc564 Merge branch 'test-hurd-ci' into 'main'
Initial test of Hurd CI - (run_tests.sh status ignored)

Closes #3135

See merge request GNOME/glib!3631
2023-10-18 23:33:04 +00:00
Damien Zammit
f25a9ca10c Initial test of Hurd CI - (run_tests.sh status ignored) 2023-10-18 23:33:04 +00:00
Florentina Mușat
592be87b7a Update Romanian translation 2023-10-18 18:25:14 +00:00
Michael Catanzaro
74985cc556 Merge branch 'date-time-strup-leak' into 'main'
gdatetime: Fix minor leaks from strup/strdown calls

See merge request GNOME/glib!3654
2023-10-18 15:35:37 +00:00
Philip Withnall
b1ae8fb85f gdatetime: Fix minor leaks from strup/strdown calls
These were accidentally introduced in commit 0b114b2687.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-18 15:54:33 +01:00
Philip Withnall
21c6ebf65b Merge branch 'wip/kabus/new-mtime' into 'main'
gio: add a file copy flag for default modification time

Closes #3140

See merge request GNOME/glib!3643
2023-10-18 14:45:49 +00:00
Philip Withnall
f8a40ca4f4 Merge branch 'app-command-line-print-literal' into 'main'
GApplicationCommandLine: add print[err]_literal()

See merge request GNOME/glib!3652
2023-10-18 03:33:33 +00:00
Aleksandr Mezin
b9c90c3a3e GApplicationCommandLine: add print[err]_literal()
GJS (and likely other language bindigs relying on introspection)
can't use `g_application_command_line_print()`/`_printerr()`.
2023-10-18 01:20:23 +03:00
Philip Withnall
17145fab35 gunicode: Update to Unicode 15.1.0
All changes mechanically generated with:
```
./tools/update-unicode-data.sh ~/Downloads/UCD 15.1.0
```

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

Fixes: #3112
2023-10-17 22:59:27 +01:00
Philip Withnall
80aea8e0a6 gen-unicode-tables: Fix indentation at the start of the first row
It was annoying Marco.

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

Helps: #3112
2023-10-17 22:59:27 +01:00
Philip Withnall
cc350774bf gen-unicode-tables: Strip whitespace off parsed fields
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-17 22:45:55 +01:00
Philip Withnall
9770d7ba31 gunicode: Fix a minor typo in a documentation comment
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-17 22:45:55 +01:00
Philip Withnall
444a313b1f gunicode: Add new line-break types from Unicode 15.1.0
See https://unicode.org/reports/tr14/

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

Helps: #3112
2023-10-17 22:45:55 +01:00
Michael Catanzaro
6ad6180b3c Merge branch '3120-libelf-disabling' into 'main'
build: Fix -Dlibelf=disabled on Linux

Closes #3120

See merge request GNOME/glib!3648
2023-10-17 14:18:15 +00:00
Michael Catanzaro
58b66f3d6b Merge branch 'clang-format-14' into 'main'
ci: Update from clang-format-11 to clang-format-14

See merge request GNOME/glib!3646
2023-10-17 14:13:56 +00:00
Philip Withnall
130c2d6373 build: Fix -Dlibelf=disabled on Linux
Commit f6c40b1d fixed libelf detection on FreeBSD (where the library has
no pkg-config file and needs to be found via `find_library()`), but
broke `-Dlibelf=disabled` on Linux, as `get_option('libelf')` was no
longer checked.

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

Fixes: #3120
2023-10-17 15:04:19 +01:00
Philip Withnall
1a659d630d Merge branch 'migrate-to-gi-docgen4' into 'main'
Switch to using gi-docgen for docs (batch 4)

See merge request GNOME/glib!3647
2023-10-17 13:12:23 +00:00
Matthias Clasen
2b22b43edd docs: Move the GDBusInterfaceSkeleton SECTION
Move content to struct docs.

Helps: #3037
2023-10-17 11:20:20 +01:00
Matthias Clasen
8c7591addf docs: Move the GDBusInterface SECTION
Move content to struct docs.

Helps: #3037
2023-10-17 11:20:17 +01:00
Matthias Clasen
2d1a9ed5a3 docs: Move the GDBusConnection SECTION
Move contents to struct docs.

Helps: #3037
2023-10-17 11:20:14 +01:00
Matthias Clasen
c0243f7eaa docs: Move the GDBusAuthObserver SECTION
Move contents to struct docs.

Helps: #3037
2023-10-17 11:20:12 +01:00
Matthias Clasen
985bc0fab3 docs: Move the GDBusActionGroup SECTION
Move content to struct docs.

Helps: #3037
2023-10-17 11:20:10 +01:00
Matthias Clasen
f39640b759 docs: Move the GDataOutputStream SECTION
Move content to struct docs.

Helps: #3037
2023-10-17 11:20:08 +01:00
Matthias Clasen
8371b893a2 docs: Move the GDataInputStream SECTION
Not much to move.

Helps: #3037
2023-10-17 11:20:06 +01:00
Matthias Clasen
081cc5af25 docs: Move the GDatagramBased SECTION
Move contents to struct docs.

Helps: #3037
2023-10-17 11:20:03 +01:00
Matthias Clasen
926f56c7c7 docs: Move the GCredentials SECTION
Move contents to struct docs.

Helps: #3037
2023-10-17 11:20:00 +01:00
Matthias Clasen
dad6ec9651 docs: Move the GConverterOutputStream SECTION
Move content to struct docs.

Helps: #3037
2023-10-17 11:19:57 +01:00
Matthias Clasen
b70b164ba6 docs: Move the GConverterInputStream SECTION
Move content to struct docs.

Helps: #3037
2023-10-17 11:19:55 +01:00
Matthias Clasen
174073722e docs: Move the GConverter SECTION
Move the content to the struct docs.

Helps: #3037
2023-10-17 11:19:52 +01:00
Matthias Clasen
747b81409d docs: Move the GCharsetConverter SECTION
Not much to move here.

Helps: #3037
2023-10-17 11:19:49 +01:00
Matthias Clasen
e267653eab docs: Move the GCancellable SECTION
Move the contents into the struct docs.

Helps: #3037
2023-10-17 11:19:46 +01:00