Commit Graph

28136 Commits

Author SHA1 Message Date
Sergey Bugaev
a3d02ad565 gmain: Correct g_source_get_ready_time () doc
Mention that ready time being equal to the current time means the source
will fire immediately.

Related to https://gitlab.gnome.org/GNOME/glib/-/issues/3148

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-11-06 15:14:07 +03:00
Sergey Bugaev
150965a9b3 gsocket: Fix detecting timeouts
If she socket is dispatched at exactly the previously set ready time,
it should already be considered to have timed out. This can easily
happen in practice when using a low resolution timer.

This fixes a test failure on GNU/Hurd, see
https://gitlab.gnome.org/GNOME/glib/-/issues/3148

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-11-06 15:14:02 +03:00
Sergey Bugaev
6b7b211338 gio: Add G_IO_ERROR_DESTINATION_UNSET
...and map EDESTADDRREQ to it.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-11-06 15:04:01 +03:00
Philip Withnall
734f8184e8 Merge branch 'gvalue-steal-string' into 'main'
gvalue: add "steal_string"

See merge request GNOME/glib!3695
2023-11-04 11:05:47 +00:00
Alexander Slobodeniuk
7880d87091 gvalue: add g_value_steal_string()
This call is needed to avoid an extra copy after
serialization of the data.
2023-11-04 10:40:30 +00:00
Philip Withnall
7e7a6271fe Merge branch 'migrate-to-gi-docgen9' into 'main'
Switch to using gi-docgen for docs (batch 9)

See merge request GNOME/glib!3690
2023-11-02 17:01:19 +00:00
Philip Withnall
0fe15f9b9b docs: Move the GChecksum SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
9e95163a3c docs: Move the GZlib*Compressor SECTIONs
Move them to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
38c4809719 docs: Move the GWin32RegistryKey SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
754047849c docs: Move the GWin32*Stream SECTIONs
Move them to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
7df150eaac docs: Move the GVolumeMonitor SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
ed247401bf docs: Move the GVolume SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
830db4e3c0 docs: Move the GUnixSocketAddress SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
1390713af9 docs: Move the GUnix*Stream SECTIONs
Move them to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
68d3f6e53a docs: Move the GUnixCredentialsMessage SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
2be7859f10 docs: Move the GUnixConnection SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
78411d0975 docs: Move the GTlsDatabase SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
15ae12628d docs: Move the GTls*Connection SECTIONs
Move them to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
a463a29522 docs: Move the GTlsCertificate SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
45a815ae6d docs: Move the GSocketService SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
bf5c0cc2ba docs: Move the GSocketListener SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
1c34680833 docs: Move the GSocketAddressEnumerator SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
832bf0f90c docs: Move the GSimpleProxyResolver SECTIONs
Move them to the struct docs.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-11-02 16:30:23 +00:00
Philip Withnall
c16c639729 docs: Move the GSettings SECTIONs
Move them to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
8c3e0aa406 docs: Move the GRemoteActionGroup SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
bfa5d99305 docs: Move the GDBusObject SECTION
Move it to the struct docs.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
ac7cbb146e docs: Move the gtls SECTION
Move it to a separate Markdown page.

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

Helps: #3037
2023-11-02 16:30:23 +00:00
Philip Withnall
aa936e12da Merge branch 'zbrown/gtask-prefix-error' into 'main'
gtask: Add g_task_return_prefixed_error()

See merge request GNOME/glib!3674
2023-11-02 12:53:03 +00:00
Philip Withnall
7785c5150a Merge branch 'ebassi/doc-gir-include-path' into 'main'
build: Fix the inclusion paths for GIR files in gi-docgen

See merge request GNOME/glib!3688
2023-11-02 12:26:01 +00:00
Emmanuele Bassi
3dbef3223b build: Fix the inclusion paths for GIR files in gi-docgen
The GIR files are now built by GLib itself, so they will be in the build
directories of each sub-library, except for GLib-2.0 which is built
alongside GObject-2.0.
2023-11-02 11:22:06 +00:00
Zander Brown
d33752b5ce
gtask: Add g_task_return_prefixed_error()
An equivalent to g_propagate_prefixed_error, but for errors sent though
GTask, allowing tasks to easily provide extra context to callers.
2023-11-02 02:55:55 +00:00
Philip Withnall
1969608db5 Merge branch 'wip/smcv/issue3157' into 'main'
tests: Don't assume that sh optimizes simple commands into exec

Closes #3157

See merge request GNOME/glib!3685
2023-11-01 22:33:07 +00:00
Philip Withnall
c1eb8ded7b Merge branch 'fix-gmessage-domain-drop' into 'main'
gmessages: fix dropping irrelevant log domains

See merge request GNOME/glib!3679
2023-11-01 22:24:46 +00:00
Alexander Slobodeniuk
ae8018d360 gmessages: fix dropping irrelevant log domains
If the string of one log domain is contained in
another, it was printing both.

For example, if G_MESSAGES_DEBUG is "Gtkspecial",
it would also keep the logs of the "Gtk" domain
2023-11-01 22:24:45 +00:00
Simon McVittie
76148fc6db tests: Don't assume that sh optimizes simple commands into exec
Depending on the operating system, /bin/sh might either be bash (for
example on Fedora or Arch) or dash (for example on Debian or Ubuntu)
or some other POSIX shell.

When bash is asked to run a simple command with no shell keywords or
metacharacters, like this one, it replaces itself with the program
via execve(), but dash does not have that optimization and treats it
like any other program invocation in a larger script: it will fork,
exec the program in the child, and wait for the child in the parent.

This seems like it conflicts with sleep_and_kill() assuming that it can
use the subprocess's process ID as the sleep(1) process ID. Specifically,
if it sends SIGKILL, it will go to the sh(1) process and not the sleep(1)
child, which could result in the sh(1) process being terminated and
its sleep(1) child being leaked.

To get the bash-like behaviour portably, explicitly use the exec builtin
to instruct the shell to replace itself with sleep(1), so that the
process ID previously used for the shell becomes the process ID of the
sleep process.

This appears to resolve an intermittent hang and test timeout on Debian
machines (especially slower ones), although I'm not 100% clear on the
mechanics of how it happens.

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/3157
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-11-01 17:56:48 +00:00
Philip Withnall
6d38e8be22 Merge branch 'wip/pwithnall/macos-leak-sanitizer' into 'main'
glib: Disable dynamic asan loading on macOS

See merge request GNOME/glib!3683
2023-11-01 15:37:11 +00:00
Philip Withnall
6ab8062dbb Merge branch 'hurd-ci-fix' into 'main'
ci: Remove .build-linux from Hurd CI scheduled job

See merge request GNOME/glib!3665
2023-11-01 15:20:23 +00:00
Marco Trevisan
d1fcb4f253 Merge branch 'gio-test-dependencies' into 'main'
tests: Fix dependency of test.gresource on test-generated.txt

See merge request GNOME/glib!3682
2023-11-01 14:55:25 +00:00
Philip Withnall
3b4846611d glib: Disable dynamic asan loading on macOS
The weak symbol resolution doesn’t seem to work (see
https://gitlab.gnome.org/GNOME/glib/-/jobs/3265405):
```
Undefined symbols for architecture x86_64:
  "___lsan_enable", referenced from:
      _g_leak_sanitizer_is_supported in gutils.c.o
  "___lsan_ignore_object", referenced from:
      _g_ignore_leak in gquark.c.o
      _g_ignore_leak in gthreadpool.c.o
      _g_ignore_leak in gutils.c.o
      _g_leak_sanitizer_is_supported in gutils.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

See !3672

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-11-01 14:34:37 +00:00
Philip Withnall
5ff31ae57d Merge branch 'zbrown/fix-4ce58df8' into 'main'
codegen: install codegen, not just the wrapper

Closes #3161

See merge request GNOME/glib!3670
2023-11-01 14:22:29 +00:00
Philip Withnall
a61888bceb tests: Fix dependency of test.gresource on test-generated.txt
`test-generated.txt` is listed in `test.gresource.xml`, so it needs to
be specified as a dependency in the `custom_target()` which uses
`test.gresource.xml`.

Fixes intermittent build failures like:
```
FAILED: gio/tests/test.gresource
/builds/GNOME/glib/_build/gio/glib-compile-resources --compiler=gcc --target=gio/tests/test.gresource --sourcedir=/builds/GNOME/glib/gio/tests --sourcedir=/builds/GNOME/glib/_build/gio/tests --internal ../gio/tests/test.gresource.xml
../gio/tests/test.gresource.xml: Failed to locate test-generated.txt in any source directory.
```

See !3671 and #3163.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-11-01 11:24:17 +00:00
Philip Withnall
9695ddfc70 Revert "gio/tests: Add test generated txt as the resources test dependency"
This reverts commit 0b9900e4e7.

The dependency was added in the wrong place: `test-generated.txt` is
needed when compiling `test.gresource`, not when compiling the test
which ultimately uses that gresource.

See !3671 and #3163.
2023-11-01 11:10:39 +00:00
Philip Withnall
f3f23b0229 Merge branch 'gsignalgroup-avoid-g-return-macro' into 'main'
gsignalgroup: Avoid function call with side effect in g_return_* macro

See merge request GNOME/glib!3678
2023-11-01 10:53:55 +00:00
Kleis Auke Wolthuizen
9ec6c19342 gsignalgroup: Avoid function call with side effect in g_return_* macro 2023-11-01 10:53:55 +00:00
Michael Catanzaro
8773121ba2 Merge branch 'gquark-register-leaks' into 'main'
Make GQuark register intentional leaks

See merge request GNOME/glib!3677
2023-10-31 17:26:09 +00:00
Seppi Wilhelmi
fc3d3a5499 Make GQuark register intentional leaks 2023-10-31 16:53:40 +01:00
Philip Withnall
6d45bdb1bf Merge branch 'lsan-dynamic-loading' into 'main'
glib-private: Check for LSAN support at runtime when controlling it

See merge request GNOME/glib!3672
2023-10-29 20:40:11 +00:00
Yuri Chornoivan
f3ae26d68d Update Ukrainian translation
(cherry picked from commit ea71087141)
2023-10-29 12:09:17 +00:00
Michael Catanzaro
cd1e11d1b1 Merge branch 'generated-txt-as-dep' into 'main'
gio/tests: Add test generated txt as the resources test dependency

See merge request GNOME/glib!3671
2023-10-27 17:07:42 +00:00
Marco Trevisan (Treviño)
0b9900e4e7 gio/tests: Add test generated txt as the resources test dependency
This is required by the resources used in some tests, however we did not
depend on it so we had some random build failures:
  https://gitlab.gnome.org/3v1n0/glib/-/jobs/3253787
2023-10-27 18:41:51 +02:00