Commit Graph

27819 Commits

Author SHA1 Message Date
Matthias Clasen
5d80471d4b docs: Move the GVariant Text Format documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
758c5de24e docs: Move the ‘running GLib’ documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
7c5fc4eb26 docs: Move the GSlice documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
0d05b87b9f docs: Move GObject concepts/intro to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
390d9a446d docs: Move GModule documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
fc29022f0b docs: Move GIO overview to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
c09f48bb28 docs: Move migrating-gnome-vfs.xml to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
221ba4e211 docs: Move migrating-gconf.xml to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
4411023462 docs: Move GValue documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
e298f1a078 docs: Move floating refs documentation to Markdown
And add some new sections on strategies for avoiding designing APIs
around floating refs.

Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
58019515d6 docs: Move enum type documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
24e93078d3 docs: Move boxed type documentation to Markdown
And add some additional new content and examples.

Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
1a090564d2 docs: Move GTest/test framework documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
d8b25ecda3 docs: Move GMainLoop documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
6c6337aa27 docs: Move macros documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
48c70b557e docs: Move logging documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
7b954a8d15 docs: Move i18n documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
46eed6009b docs: Move GError documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
a73d3d7b8f docs: Move byte conversion macro documentation to Markdown
Helps: #3037
2023-10-11 14:01:28 +01:00
Matthias Clasen
9725c012b1 docs: Move character set conversion docs to Markdown
Helps: #3037
2023-10-11 14:01:28 +01:00
Matthias Clasen
0b56387ad5 docs: Move GThread documentation to Markdown
Helps: #3037
2023-10-11 14:01:28 +01:00
Matthias Clasen
c3713e1b67 docs: Move GRcBox/GArcBox and refcounting docs to Markdown
Helps: #3037
2023-10-11 14:01:28 +01:00
Philip Withnall
6107f50cc7 build: Disable gtk-doc unit tests
As we start moving documentation over from gtk-doc to gi-docgen, the
gtk-doc coverage is going to go down and things are going to start
breaking. That’s OK; we don’t need to test it any more.

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

Helps: #3037
2023-10-11 14:01:28 +01:00
Matthias Clasen
39e9ef54be docs: Add initial support for using gi-docgen for docs
The files here are copied from the docs-gtk-org
branch of gtk.

This adds gi-docgen to the CI Dockerfiles and ensures the new versions
(including the OS upgrades from the previous commit) are used during CI.

Helps: #3037
2023-10-11 14:01:28 +01:00
Philip Withnall
9dd59ba8ad ci: Ignore a ‘dubious ownership’ warning when updating submodules
It’s irrelavent.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-11 14:01:28 +01:00
Philip Withnall
13c3595363 ci: Upgrade CI images to the new oldest-supported OS versions
That means Debian Bookworm and Fedora 37.

Also rework the mingw Dockerfile to be based on the Fedora one, so that
the underlying layers can be shared. This should reduce the disk
consumption of the registry a little.

`.gitlab-ci.yml` has not been updated to use the new images in this
commit, as the images will be modified further in the following commit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-11 13:54:13 +01:00
Philip Withnall
9b51346237 Merge branch 'wip/smcv/auto-unix-pipe' into 'main'
glib-unix: Add convenience API for pipes

See merge request GNOME/glib!3457
2023-10-09 18:00:36 +00:00
Simon McVittie
e80b0c4e4b gspawn: Use GUnixPipe on Unix
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-10-09 18:44:38 +01:00
Simon McVittie
9e20a7d0e7 tests: Exercise GUnixPipe
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-10-09 18:44:38 +01:00
Simon McVittie
26c7b308ba tests: Break out assert_fd_was_closed() into a header
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-10-09 18:44:38 +01:00
Simon McVittie
f31db7d370 glib-unix: Add convenience API for pipes
We can't easily use g_autofd with g_unix_open_pipe, because its
parameter is an array of two fds that both need closing. Add an inline
convenience wrapper providing the obvious semantics.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-10-09 18:44:38 +01:00
Philip Withnall
240156d174 Merge branch '3098-keyfile-escaping' into 'main'
Revert "gkeyfile: Temporarily re-allow invalid escapes when parsing strings"

Closes #3098

See merge request GNOME/glib!3618
2023-10-09 16:50:56 +00:00
Simon McVittie
6fd1037361 gspawn: Use g_clear_fd() instead of reinventing it
g_clear_fd() is documented to be async-signal safe whenever the
fd is either negative or valid (which it should be here) and the error
is NULL (which it always is here).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-10-09 17:42:04 +01:00
Philip Withnall
e93e1cb547 Merge branch 'g-wakeup-eintr-check' into 'main'
wakeup: Fix g_wakeup_acknowledge if signal comes in

See merge request GNOME/glib!3624
2023-10-05 16:53:54 +00:00
Ray Strode
7bbd4328f6 wakeup: Fix g_wakeup_acknowledge if signal comes in
It's not very likely, but there is a small chance that an
incoming signal could disturb the non-blocking read calls in
g_wakeup_acknowledge, leading to a subsequent spurious wake up.

This commit addresses the problem by doing the usual EINTR
loop (which is already present on the write side incidentally)
2023-10-05 09:55:49 -04:00
Philip Withnall
24f5711287 Merge branch 'wip/chergert/fix-eventfd-overreads' into 'main'
wakeup: do single read when using eventfd()

See merge request GNOME/glib!3621
2023-10-05 09:38:15 +00:00
Philip Withnall
4863561a46 Merge branch 'once-init-annotations' into 'main'
gthread: Fix optional/nullable annotations for g_once_init_*()

See merge request GNOME/glib!3581
2023-10-04 22:43:49 +00:00
Philip Withnall
da278bdd0b Merge branch 'wip/chergert/queue-for-sourcelist' into 'main'
gmain: avoid a GList traversal when removing source

See merge request GNOME/glib!3620
2023-10-04 22:40:58 +00:00
Philip Withnall
57b41b8fec Merge branch 'g-once-enter-ptr' into 'main'
gthread: introduce g_once_init_{enter,leave}_pointer

See merge request GNOME/glib!3577
2023-10-04 22:22:54 +00:00
Christian Hergert
de79831e3c wakeup: do single read when using eventfd()
Previously, this would loop as long as read() got the expected number of
bytes back, which is 8. That means every successful read() of the eventfd
would perform an additional syscall() as a followup.

This is not ideal because eventfd (unless used as an EFD_SEMAPHORE) will
reset the counter as part of the read(). So that means that we either do
an additional throw-away syscall() or potentially race against a producer
generating new events before this change.
2023-10-04 14:01:23 -07:00
Christian Hergert
5e96ed64c9 gmain: avoid a GList traversal when removing source
Currently the GSourceList has it's own allocation plus a secondary
allocation for the GList which contains it (from GMainContext). Not only
are these a pointer chase, but they are on separate cachelines too. Without
changing the code much we can at least keep things on the same cacheline
so that the pointer chase matters less.

Since the GList becomes embedded in the GSourceList you can use a
g_queue_unlink() directly removing the link without traversing the GList
like was done before.

Furthermore, we can simplify some code with g_queue_push_tail_link()
instead of some extra branching.
2023-10-04 13:37:06 -07:00
Philip Withnall
bd13ec30a9 Merge branch 'mcatanzaro/null' into 'main'
Document NULL pointer pitfall in toolchain requirements

See merge request GNOME/glib!3598
2023-10-04 14:13:43 +00:00
Alex Richardson
5ecd3cbe52 gobject: use g_once_init_enter_pointer for GType initializers
GType is either an integer or a pointer, so we have to use the _pointer
version here to support architectures such as Morello.

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
See also: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3578
2023-10-04 14:50:54 +01:00
Michael Catanzaro
77d1093108 Merge branch '3111-drop-unnecessary-include' into 'main'
tests: Drop unnecessary include from gsubprocess-testprog.c

Closes #3111

See merge request GNOME/glib!3617
2023-10-04 13:22:08 +00:00
Michael Catanzaro
2b0c17f458 Document NULL pointer pitfall in toolchain requirements
I'm not aware of any platforms where this is a problem in practice, but
it's definitely nonportable and doesn't hurt to document it.
I wonder about CHERI....
2023-10-04 14:04:08 +01:00
Philip Withnall
a66cc62f56 Merge branch 'fix-constructor-test-warning-clang' into 'main'
tests/constructor: Fix "unknown pragma ignored" warning on clang

See merge request GNOME/glib!3611
2023-10-04 13:00:26 +00:00
Alex Richardson
a1dfecf11f Use g_once_init_{enter,leave}_pointer where appropriate
This should not result in any functional changes, but will eventually
allow glib to be functional on CHERI-enabled systems such as Morello.

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
2023-10-04 13:57:16 +01:00
Alex Richardson
726eca7c89 gthread: introduce g_once_init_{enter,leave}_pointer
These functions can be used to initalize pointer-type variables rather
than a gsize. This is required to support CHERI-enabled platforms where
gsize cannot be used to store pointers. Follow-up changes will migrate
the uses of g_once_init that store pointers to the new API

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
2023-10-04 13:57:16 +01:00
Luca Bacci
c287e69c0a tests/constructor: Fix "unknown pragma ignored" warning on clang 2023-10-04 13:43:05 +01:00
Philip Withnall
9c81ff46a2 Merge branch 'fix-z-format-tests' into 'main'
tests: Fix gdatetime test on non-UTC systems

See merge request GNOME/glib!3613
2023-10-04 12:41:30 +00:00