Commit Graph

3032 Commits

Author SHA1 Message Date
Philip Withnall
94d2265429 docs: Convert the migrating-posix page to Markdown
Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
e2efafb857 docs: Delete the generated gdbus-object-manager-example docs
They were previously `xi:include`d into some of the GDBus documentation,
but since the GDBus documentation was ported to Markdown that’s no
longer possible, so the object manager example docs now serve no
purpose.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
6a22d58f6b docs: Move the types SECTION
Move it to a mega separate file.

This has been a journey.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
33c10e8711 docs: Move the windows SECTION
Move it to a separate file.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
3532e3ca1c docs: Move the warnings SECTION
Move it to a separate file.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
877b0affb6 docs: Move the numerical SECTION
Move it to a separate Markdown file.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
3957b47e59 docs: Move the checkedmath SECTION
Move it to a separate Markdown file.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
b93e35dc17 docs: Move the datalist and dataset SECTIONs
Move them to a separate page as they don’t really have a ‘class’ struct
each to hang docs off.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
790131687c docs: Move the unix SECTION
Move it to a separate page.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
244721baf9 docs: Move the misc_utils SECTION
Move it to a separate page, with a massive great list of all the misc
utils. Not a great documentation page, but equivalent to what we had
before, and it can be improved in future.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
74de872bb9 docs: Move the spawn SECTION
Move it to a separate page.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
6dca578f9d docs: Move the memory SECTION
Move it to a separate page.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
25a4205d9d docs: Move the ghostutils SECTION
Sadly, this is about hostnames rather than ghosts. 😞

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
425731f766 docs: Move the string_utils SECTION
Move it to a mega separate file.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
cf52727f03 docs: Move the shell SECTION
Move it to a separate file.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
229b76a388 docs: Move the version SECTION
Move it to a separate documentation file, since most of what’s covered
isn’t introspectable.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
359c1034e0 docs: Move the GUuid SECTION
Move it to a separate page as there’s no public struct to hang the
docs off.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
43588fcdd9 docs: Move the grand SECTION
Move it to a separate page so the difference between `g_rand_*()` and
`g_random_*()` can be explained.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
158ec5be34 docs: Move the gfileutils SECTION
Move it to a separate page so more detail can be provided about all the
groups of API.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
c850d25d67 docs: Move the gatomic SECTION
Move it to a standalone page.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
ac91b8f4a2 docs: Move the base64 SECTION
Move it to a separate file as there is no struct to hang the docs off.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
552f62a059 docs: Move the threads-deprecated SECTION
Move it to a separate page so an overview of the deprecated threading
API can be given.

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

Helps: #3037
2023-11-28 13:52:05 +00:00
Philip Withnall
8f6f382940 Merge branch 'test-trap-subprocess-envp' into 'main'
gtestutils: Add g_test_trap_subprocess_with_envp() for testing envs

See merge request GNOME/glib!3721
2023-11-28 11:49:11 +00:00
Aleksandr Mezin
c03c983d94 gapplicationcommandline: add .done() method
Fixes #596
2023-11-27 14:15:36 +00:00
Philip Withnall
6a6b36bbc7 gtestutils: Add g_test_trap_subprocess_with_envp() for testing envs
This is a variant of `g_test_trap_subprocess()` which allows the
environment for the child process to be specified. This is quite useful
when you want to test code which reads environment variables, as it’s
not safe to set those after the start of `main()`.

This will be useful within and outwith GLib for testing such code.

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

Helps: #1618
2023-11-23 12:18:21 +00:00
Philip Withnall
6e4d50fa5c docs: Move the gunixmounts SECTION
Move it to a separate page.

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

Helps: #3037
2023-11-15 11:48:23 +00:00
Philip Withnall
9c414d437e docs: Move the gpollableutils SECTION
Move it to a separate page.

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

Helps: #3037
2023-11-15 11:48:23 +00:00
Philip Withnall
708de2fc12 docs: Move the gnetworking SECTION
Move it to a separate page.

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

Helps: #3037
2023-11-15 11:48:23 +00:00
Philip Withnall
de8e39b344 docs: Move the gmenumodel SECTION
Move it to a separate page, since it doesn’t quite make sense to
incorporate into the `GDBusConnection` docs.

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

Helps: #3037
2023-11-15 11:48:23 +00:00
Philip Withnall
ef049cbaca docs: Move the GIOScheduler SECTION
Move it to a separate page, as there isn’t a `GIOScheduler` struct.
Ensure that all its functions/methods/types are correctly marked as
deprecated. Fix a few broken links about I/O priority which pointed to
it.

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

Helps: #3037
2023-11-15 11:48:23 +00:00
Philip Withnall
fe8785862a docs: Move the GIOError SECTION
Move it to a separate page as there’s no struct documentation to hang it
off.

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

Helps: #3037
2023-11-14 14:32:19 +00:00
Philip Withnall
74735d878f docs: Move the dbusutils SECTION
Move it to a separate page as there’s no struct to hang the
documentation off.

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

Helps: #3037
2023-11-14 14:32:19 +00:00
Philip Withnall
6492dd7054 docs: Move the GDBus name watching SECTION
Move it to a separate content page as there’s no struct to hang the docs
off.

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

Helps: #3037
2023-11-14 14:32:19 +00:00
Philip Withnall
beb56279ef docs: Move the GDBus name owning SECTION
Move it to a separate content page as there’s no struct to hang the docs
off.

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

Helps: #3037
2023-11-14 14:32:19 +00:00
Philip Withnall
c7e21d2f59 docs: Move the GDBusIntrospection SECTION
Move it to a separate content page as there is no `GDBusIntrospection`
type to hang the rest of the documentation off.

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

Helps: #3037
2023-11-14 14:32:19 +00:00
Philip Withnall
84bed2f6ae docs: Move the GDBusError SECTION
Adding it all to the docs for the `GDBusError` enum seemed a bit much,
so I moved it to its own content page.

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

Helps: #3037
2023-11-14 14:32:19 +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
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
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
Michael Catanzaro
eadbdb439e Merge branch 'meson-version-bump' into 'main'
build: Bump Meson dependency to 1.2.0

See merge request GNOME/glib!3666
2023-10-25 13:23:53 +00:00
Alex Richardson
d0e03f0930 GType: introduce GTYPE_TO_POINTER/GPOINTER_TO_TYPE
On CHERI-enabled systems we use uintptr_t as the underlying storage for
GType and therefore casting to gsize strips the upper bits from a pointer.
Fix this by casting via uintptr_t instead and introduce a new set of
macros to convert between GType and pointers.
2023-10-25 12:01:02 +01:00
Philip Withnall
4ce58df854 build: Change configure_file() to fs.copyfile() when copy is set
Meson has preferred `fs.copyfile()` since 0.62. This fixes a set of
Meson warnings.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-10-25 11:20:36 +01:00
Philip Withnall
508e164056 docs: Move the GFileAttribute SECTION to Markdown
It needs to be in a separate page because there isn’t actually a
`GFileAttribute` type.

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

Helps: #3037
2023-10-23 13:43:27 +01:00
Philip Withnall
824ae3f931 docs: Move the GIcon SECTION
Move it to the struct docs.

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

Helps: #3037
2023-10-23 13:18:13 +01:00
Philip Withnall
5ae6bcb728 docs: Move the value collection documentation to Markdown
It needs to be in a separate page because it’s all macros and they have
no type/class associated with them.

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

Helps: #3037
2023-10-23 13:18:13 +01:00
Philip Withnall
a6aaa701a5 docs: Mention dependency cycle between GLib and gobject-introspection
And how to break that cycle.

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

Helps: #3037
2023-10-23 11:26:53 +01:00
Emmanuele Bassi
160e5db742 Remove old introspection data
We don't need it any more.
2023-10-23 11:26:53 +01:00
Emmanuele Bassi
3ffa33825b Build the API references with the generated GIR data
Gate the API reference on the availability of the introspection data as
well, so we don't accidentally try and generate the documentation
without a description of our API.
2023-10-23 11:26:53 +01: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
Matthias Clasen
95717eacea docs: Move the signal SECTION
Move the content to the new signals.md file.

Helps: #3037
2023-10-16 23:34:35 +01:00
Matthias Clasen
f3eac349f9 docs: Move the GType SECTION
Move the contents to the new types.md files.

Helps: #3037
2023-10-16 23:34:29 +01:00
Sid
027f4b4c73 Cleanup and add content to glib debugging using gdb scripts 2023-10-16 08:50:39 +00:00
Guido Günther
bc4ba05d34 gstrvbuilder: Add g_strv_builder_take
g_strv_builder_take() allows to transfer ownership of the passed in
string.

This can be useful to avoid additional allocations when using functions
that transfer ownership to the caller like g_strdup_printf().

The testcase uses g_strv_builder_take and g_strv_builder_add to demo
that calls can be mixed.
2023-10-15 15:45:58 +02:00
Matthias Clasen
f27af99233 docs: Move the unicode SECTION
Move the content to the new unicode.md file.

Helps: #3037
2023-10-11 17:38:31 +01:00
Matthias Clasen
97cb9fa220 docs: Move the refstring SECTION
Move the contents to the data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
8164220213 docs: Move the sequence SECTION
Add the contents to the data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
c226088028 docs: Move the GNode SECTION
Move the contents to the data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
2191c6024a docs: Move the tree SECTION
Move the content to the new data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
0ce33a6fee docs: Move the asyncqueue SECTION
Move the contents to the new data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
25aeddd2a7 docs: Move the queue SECTION
Add the content to the new data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
f88d96e2ad docs: Move the GHashTable SECTION
Move the content to the new data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
ed1bc3228b docs: Move list SECTIONs
Move the content to the data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Matthias Clasen
09733b6531 docs: Move the array SECTIONs
Move the content to the new data-structures.md file.

Helps: #3037
2023-10-11 17:38:30 +01:00
Philip Withnall
c140f83922 Merge branch 'migrate-to-gi-docgen' into 'main'
Switch to using gi-docgen for docs (batch 1)

See merge request GNOME/glib!3591
2023-10-11 15:21:10 +00:00
Matthias Clasen
ab066d4856 docs: Move the GOption SECTION
Move the content to the new goption.md file.

Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
8b9c4cfb87 docs: Move the GMarkup SECTION
Move the content to the new markup.md file.

Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
3d55be0b82 docs: Move the GObject tutorial to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
682e9c9f56 docs: Move migrating-gdbus.xml to Markdown
This copies the test code inline into the Markdown, which means it could
diverge from the test code which is compiled and run as part of the
tests. That needs improving, but that can happen in a subsequent commit.

Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
e1d6168e5b docs: Move the auto-cleanup documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
c2798e6c2a docs: Move building documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
abf99f533f docs: Move compiling documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
4784bb10b1 docs: Move the cross-compilation documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
Matthias Clasen
057f4fa2a5 docs: Move GVariant Format Strings documentation to Markdown
Helps: #3037
2023-10-11 14:01:29 +01:00
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
7e8fb7ba24 Merge branch 'hurd-codeowners' into 'main'
Add Hurd code owners

See merge request GNOME/glib!3627
2023-10-09 23:01:06 +00: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
Sergey Bugaev
e50cba31f6 docs: Add bugaevc and sthibaul as Hurd code owners
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-10-09 15:08:38 +03: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
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
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
Emmanuele Bassi
ab83d965e8 Merge branch 'version-bump' into 'main'
build: Post-release version bump

See merge request GNOME/glib!3605
2023-10-04 09:33:58 +00:00
Philip Withnall
b4e6a834a2 Merge branch 'tls-callbacks' into 'main'
Make use of TLS callbacks for static builds on Windows

Closes #3087

See merge request GNOME/glib!3560
2023-10-03 10:00:44 +00:00
Philip Withnall
3a1e53b80d docs: Add 2.80 release series documentation pages to the build
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-03 10:24:19 +01:00
Luca Bacci
af0a9489e7 Docs: Static builds on MSVC are supported 2023-10-03 10:26:10 +02:00
Luca Bacci
51cbb63cd5 Add support for TLS callbacks on Windows 2023-10-03 10:25:06 +02:00
Philip Withnall
5bc6c2035a gio: Rename GTK_USE_PORTAL to GIO_USE_PORTALS
The `GTK_USE_PORTAL` environment variable has started to be misused by
users, which is causing deployment issues (such as portal services
themselves ending up being forced to use portals, which is never going
to work).

Try and sidestep users’ broken configurations by renaming the
environment variable, and also separating it from the old GTK
environment variable, since the GLib one affects a lot more processes.
This environment variable is meant to be used for
debugging and development, and never in production.

GTK already renamed their environment variable in
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4829, so keeping the
`GTK_USE_PORTAL` name in GLib doesn’t make sense anyway.

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

Fixes: #3107
2023-10-02 15:00:23 +01:00
Emmanuele Bassi
9723c5595c ci: Use meson compile rather than bare ninja
This makes it more consistent with `meson setup` in the rest of the
file.
2023-08-16 13:07:05 +01:00
René de Hesselle
0c73ff3a08 meson: Use 'meson setup' to configure
This removes a deprecation warning when using 'meson' without 'setup'.
2023-08-16 13:06:40 +01:00
Philip Withnall
627dc1415c Revert "build-sys: drop -mms-bitfields GCC flag"
This reverts commit 252bbcd207.

After further discussion in !3511, we’ve decided that there are risks
associated with this change, and it’s not the best way of addressing the
original problem.

The original motivation for the change turned out to be that
`-mms-bitfields` was not handled by `windres`, which was receiving it
from `pkg-config --cflags glib-2.0` in some projects. However, if
`windres` is claiming to accept CFLAGS then it should accept (and
ignore) `-mms-bitfields`, since the `-m` family of options are defined
in `man gcc`, just like `-I`, `-D`, etc.

There is some question that there might still be third party projects
which are built with an old enough compiler that `-mms-bitfields` is not
the compiler default. For that reason, we should either still continue
to specify `-mms-bitfields` in the `.pc` file, or add a test to assert
that third party projects are always compiled with `-mms-bitfields` set.
But adding a new test for all third-party compilations is risky (if we
get it wrong, things will break; and it’s a test which may behave
differently on different platforms), so it seems safer to just keep
`-mms-bitfields` in `.pc` for now.

Once all compilers which we require specify `-mms-bitfields` by default,
we can finally drop this flag (without adding a test for third-party
compilations).

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3511
2023-07-29 11:54:22 +03:00
Simon McVittie
be2c9220d6 testutils: Factor out g_test_disable_crash_reporting()
We're already repeating this in 4 places, and in a subsequent commit
I'll extend it to do more.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-07-26 15:41:47 +01:00
Philip Withnall
e051f4abaf Merge branch 'win32' into 'main'
build-sys: drop -mms-bitfields GCC flag

See merge request GNOME/glib!3509
2023-07-24 15:52:10 +00:00
Marc-André Lureau
252bbcd207 build-sys: drop -mms-bitfields GCC flag
This flag is problematic for some usages, and is no longer needed since
~2012 GCC 4.7 (https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a6c467624ade35128)

It is dropped from MINGW since:
https://github.com/msys2/MINGW-packages/pull/12891

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-07-24 14:45:09 +04:00
Philip Withnall
9b80774ca7 Merge branch 'fileinfo-filepath' into 'main'
gfileinfo: add file_path methods for language bindings

See merge request GNOME/glib!3461
2023-07-22 05:27:12 +00:00
Jason Francis
04b683c34f gfileinfo: add file_path methods for language bindings
Including some tests by Philip Withnall.
2023-07-21 21:24:50 +01:00
Philip Withnall
741a561c4d Merge branch 'supported-platforms-docs' into 'main'
docs: Expand supported platforms documentation a little

See merge request GNOME/glib!3485
2023-07-14 11:57:03 +00:00
Marco Trevisan
4cf6c78512 Merge branch 'codegen-docs' into 'main'
gdbus-codegen: Fix some minor typos in the documentation

See merge request GNOME/glib!3477
2023-07-05 11:58:20 +00:00
Marco Trevisan
14907d2f77 Merge branch 'backports-typo-fix' into 'main'
docs: Fix a typo in the backports policy

See merge request GNOME/glib!3484
2023-06-29 16:54:22 +00:00
Philip Withnall
0c640f0130 docs: Document issue and merge request triaging and review guidelines
This documents the practices that I’ve been trying to follow for the
last few years for managing GLib issues and merge requests, and why they
seem to work well enough.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 16:50:00 +01:00
Philip Withnall
05b861db8b docs: Expand supported platforms documentation a little
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 15:51:44 +01:00
Philip Withnall
7c6d306927 docs: Fix a typo in the backports policy
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 15:40:59 +01:00
Philip Withnall
28ad519ff8 gdbus-codegen: Fix some minor typos in the documentation
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-27 14:23:01 +01:00
Emmanuele Bassi
6fc6d9ea3e Merge branch 'ebassi/keyfile-docs' into 'main'
docs: Use the type name as the section name for GKeyFile

See merge request GNOME/glib!3453
2023-05-31 01:05:34 +00:00
Emmanuele Bassi
23a9dbdaf6 Allow proper introspection of GTypeValueTable
The introspection scanner cannot deal very well with function pointers
into a plain structure. In order to document the various function
pointers in GTypeValueTable we need to create typed callbacks, and
use them to replace the anonymous function pointers inside the
structure. This not only allows us to properly document the function
pointers, but it also allows us to annotate the arguments and return
value of those function pointers.

See also: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/400#note_1721707
2023-05-30 14:38:16 +01:00
Emmanuele Bassi
28e8f5c136 docs: Rename the GBookmarkFile section
Use the type name, to ensure that the section docblock gets merged into
the type docblock in the introspection data.

Helps: #2961
2023-05-30 13:33:45 +01:00
Emmanuele Bassi
4386d912d7 docs: Use the type name as the section name for GKeyFile
Without this, the section docblock for GKeyFile disappears into the
ether when generating the introspection data.

Helps: #2961
2023-05-30 12:46:30 +01:00
Philip Withnall
153c7f7b99 Merge branch 'wip/p3732/truncate-middle' into 'main'
gutf8: Add a g_utf8_truncate_middle() function

See merge request GNOME/glib!3440
2023-05-30 11:02:03 +00:00
Philip Withnall
57087ff42d Merge branch 'remove-action-entries' into 'main'
gactionmap: Add g_action_map_remove_action_entries()

See merge request GNOME/glib!3450
2023-05-26 09:47:30 +00:00
Guido Günther
b3b23072f3 gactionmap: Add g_action_map_remove_action_entries()
Since we have a convenience method to add actions let's allow to remove
them just as easily. This makes resource cleanup as simple as initially
adding the entries.
2023-05-26 10:30:40 +01:00
Peter Eisenmann
cd3837174b gutf8: Add a g_utf8_truncate_middle() function
Adds a helper to truncate UTF8 strings in the middle, allowing to make
them fit certain size constraints.

This function is modeled after similar functionality that has existed
since 2008 in nautilus and in eel before that.
2023-05-25 00:36:56 +02:00
Philip Withnall
f6f250fc38 docs: Move README.win32.md to the docs folder
It’s a bit confusing to have two files called `README`, especially given
that `README.win32.md` only contains build instructions and none of the
other overview/contribution/bug reporting information that `README.md`
contains.

It feels like these would be better organised by having one top-level
`README.md`, and pointing to the Windows build instructions from there.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-05-24 16:19:47 +01:00
Sonny Piers
0b73d72a44 gio: Add g_file_new_build_filenamev 2023-05-23 10:14:28 +00:00
Peter Eisenmann
afdab4f493 gstring: add g_string_new_take
Adds a GString constructor that takes over ownership of an existing,
dynamically allocated, string.
2023-05-16 11:27:45 +01:00
Philip Withnall
eee3885077 Merge branch 'gtk-plus' into 'main'
Rename GTK+ to GTK (mostly comments and documentation)

See merge request GNOME/glib!3429
2023-05-10 08:39:58 +00:00
Philip Withnall
329213f742 Merge branch 'main' into 'main'
gtestutils: Improve g_assert_cmpuint

Closes #2997

See merge request GNOME/glib!3424
2023-05-10 08:35:27 +00:00
Arnaud Rebillout
f722f11e57 Rename GTK+ to GTK (mostly comments and documentation)
GTK lost it's '+' suffix back in 2019, according to
<https://mail.gnome.org/archives/gtk-devel-list/2019-February/msg00000.html>

This commit can be re-generated with:

    git grep -l GTK+ \
    | grep -v -e ^NEWS -e ^glib/tests/collate.c \
    | xargs sed -i 's/GTK+/GTK/g'

Most of the changes are in comments and documentation.
2023-05-10 10:56:44 +07:00
Eric Blake
2ab2ce57e6 gtestutils: Improve g_assert_cmpuint
While x86_64 has enough precision in long double to do a round trip
from guint64 to long double and back, this is platform-specific, and
is a disservice to users trying to debug failing unit tests on other
architectures where it loses precision for g_assert_cmp{int,uint,hex}.
See also https://bugzilla.gnome.org/show_bug.cgi?id=788385 which
mentions having to add casts to specifically silence the compiler on
platforms where the precision loss occurs.

Meanwhile, g_assert_cmpuint() does an unsigned comparison, but outputs
signed values if the comparison fails, which is confusing.

Fix both issues by introducing a new g_assertion_message_cmpint()
function with a new 'u' numtype.  For backwards compatibility, the
macros still call into the older g_assertion_message_cmpnum() when not
targetting 2.78, and that function still works when passed 'i' and 'x'
types even though code compiled for 2.78 and later will never invoke
it with numtype anything other than 'f'.  Note that g_assert_cmpmem
can also take advantage of the new code, even though in practice,
comparison between two size_t values representing array lengths that
can actually be compiled is unlikely to have ever hit the precision
loss.  The macros in signals.c test code does not have to worry about
versioning, since it is not part of the glib library proper.

Closes #2997
Signed-off-by: Eric Blake <eblake@redhat.com>
2023-05-09 08:28:09 -05:00
Marco Trevisan
08aee6b5f4 Merge branch 'unixfdlist-again' into 'main'
docs: Don’t ignore gunixfdlist.h when building docs on Windows

See merge request GNOME/glib!3409
2023-05-09 12:53:19 +00:00
Philip Withnall
63e1e83c33 Merge branch 'wip/p3732/timeout-seconds-once' into 'main'
add g_timeout_add_seconds_once

See merge request GNOME/glib!3383
2023-05-09 12:50:39 +00:00
Patrick Griffis
de2ff26454 Merge branch '116-utf8-docs' into 'main'
docs: Document high-level UTF-8 requirements for GLib

Closes #116

See merge request GNOME/glib!3414
2023-05-02 19:20:30 +00:00
Philip Withnall
ff315e8407 docs: Fix list formatting in supported-platforms.md
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-05-02 14:34:21 +01:00
Philip Withnall
377e8a2d9e docs: Update various broken/redirected links
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-05-02 14:26:52 +01:00
Peter Eisenmann
3abf23b2a7 add g_timeout_add_seconds_once
Add a new call combing behaviors of g_timeout_add_seconds and
g_timeout_add_once.
2023-05-02 13:42:54 +02:00
Philip Withnall
5803a24826 docs: Add lb90 as a Windows maintainer
They’ve been actively doing good work.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-05-02 11:19:31 +01:00
Philip Withnall
0e941418d1 docs: Document high-level UTF-8 requirements for GLib
I’ve finally found the right place in the docs to put this stuff.

This doesn’t auto-link this section from every string in the GLib
documentation, but I think that at this point (with gtk-doc in
maintenance mode, and gi-docgen not fully applied to GLib) I don’t think
we can do any better. The perfect is the enemy of the good, and having
this stuff documented somewhere means that someone can link to it from
multiple places in future *somehow*.

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

Fixes: #116
2023-05-02 10:41:50 +01:00
Patrick Griffis
8a67f0c5c2 Merge branch 'old-txt-docs' into 'main'
docs: Update/Drop txt documents from docs directory

See merge request GNOME/glib!3408
2023-04-29 03:31:05 +00:00
Patrick Griffis
f009d8e368 Merge branch '2289-setuid-docs' into 'main'
docs: Document that GIO should not be used in privileged processes

Closes #2289

See merge request GNOME/glib!3413
2023-04-29 03:28:10 +00:00