Commit Graph

30568 Commits

Author SHA1 Message Date
Philip Withnall
2b7678b41b Merge branch 'ebassi/pointer-types' into 'main'
Dump pointer types in the introspection blob

See merge request GNOME/glib!4098
2024-06-03 10:58:41 +00:00
Philip Withnall
5bcc6ad458 Merge branch 'glib-compile-schemas-docs-1' into 'main'
docs: Mention XDG_DATA_HOME in glib-compile-schemas manual

See merge request GNOME/glib!4100
2024-06-03 10:56:41 +00:00
Philip Withnall
24dd331c2c Merge branch 'ebassi/issue-2896' into 'main'
Build HTML versions of the man pages

Closes #2896

See merge request GNOME/glib!4090
2024-06-02 15:15:31 +00:00
Emmanuele Bassi
10fd218666 Build HTML versions of the man pages
And install them in the same directory as the API reference, so it's
possible to link them.

Fixes: #2896
2024-06-02 15:15:31 +00:00
Sebastian Dröge
59fd9b84e2 Merge branch 'fix-finish-func-annotations' into 'main'
gfile: Fix finish-func annotations

See merge request GNOME/glib!4099
2024-06-02 07:52:10 +00:00
Keyu Tao
b27e6b1a43 docs: Mention XDG_DATA_HOME in glib-compile-schemas manual
glib-compile-schemas considers XDG_DATA_HOME in addition to
XDG_DATA_DIRS since GLib 2.53.2, but this is not mentioned in its manual
and might bring confusion to readers.
2024-06-02 03:12:15 +08:00
Maximiliano Sandoval
a7557f125e
gfile: Fix finish-func annotations
The finish-func should not contain the library_class prefix.
2024-06-01 16:49:34 +02:00
Emmanuele Bassi
d242bad64e Dump pointer types in the introspection blob
Instead of skipping types that inherit from G_TYPE_POINTER, add a new
ancillary element into the raw dump that gets processed by g-ir-scanner.

See: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/470
2024-05-31 18:40:21 +01:00
Philip Withnall
2bb2595eb9 Merge branch 'docs-gtype-pointer-conversion' into 'main'
docs: Improve conversion-macros formatting and add GTYPE_TO_POINTER/GPOINTER_TO_TYPE

See merge request GNOME/glib!4092
2024-05-28 13:00:43 +00:00
Philip Withnall
ce71681f57 Merge branch 'fix-docs' into 'main'
docs: Fix docs reference to main-loop

See merge request GNOME/glib!4097
2024-05-28 09:42:56 +00:00
Tanmay Patil
37333d63d6 docs: Fix docs reference to main-loop
Signed-off-by: Tanmay Patil <tanmaynpatil105@gmail.com>
2024-05-28 14:27:43 +05:30
Matthijs Velsink
c260521056 docs: Add and use anchors in conversion-macros
The documented conversion macros don't have their own page, so can't be
linked to directly.

Instead, introduce and use anchors for them.
2024-05-27 23:31:15 +02:00
Matthijs Velsink
f2df7c3115 docs: Add GTYPE_TO_POINTER/GPOINTER_TO_TYPE
Commit d0e03f09 introduced GTYPE_TO_POINTER/GPOINTER_TO_TYPE, on which
work started before the move of conversion macros to Markdown. It did
get merged after that move, but the macros never made it into the docs.

Let's do so now.
2024-05-27 23:24:42 +02:00
Jordi Mas i Hernandez
7cf878df83 Update Catalan translation
(cherry picked from commit 0043895879)
2024-05-27 14:56:38 +00:00
Philip Withnall
c02f50f0ba Merge branch 'clear-pointer-doc' into 'main'
gmem.c: Update g_clear_pointer() documentation

See merge request GNOME/glib!4093
2024-05-24 10:16:51 +00:00
Chun-wei Fan
3f11a55983 gmem.c: Update g_clear_pointer() documentation 2024-05-24 10:16:51 +00:00
Simon McVittie
2032d150b0 Merge branch 'wip/pwithnall/macos-symlink' into 'main'
tests: Fix compilation failure on macOS due to missing include

See merge request GNOME/glib!4094
2024-05-24 09:38:08 +00:00
Philip Withnall
6187d40a0f
tests: Fix compilation failure on macOS due to missing include
It’s needed for the `symlink()` function.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-24 09:52:55 +01:00
Philip Withnall
60845fce0a Merge branch 'dont-rm-rf-root' into 'main'
gtestutils: Don't follow symlinks when deleting tests' tempdir

Closes #3290

See merge request GNOME/glib!4018
2024-05-23 23:08:39 +00:00
Will Thompson
56c6e28c68 Test that isolate-dirs doesn't follow symlinks during cleanup 2024-05-23 23:01:32 +01:00
Will Thompson
dc97423ead Test cleaning up unreadable temporary test directory
Neither the new nftw()-based rm_rf() implementation, nor the fallback
implementation, should fail the test if there is an error during cleanup
of the directory tree. And the output on stderr that the nftw()-based
implementation emits should not interfere with Meson parsing the TAP
stream on stdout.

The test is run in a subprocess so that we can clean up after ourselves.
2024-05-23 23:01:32 +01:00
Philip Withnall
31c85d3985 Merge branch 'gpattern-docs' into 'main'
gpattern: Port the docs to gi-docgen syntax

See merge request GNOME/glib!4081
2024-05-23 09:55:32 +00:00
Philip Withnall
d6abaf7921
gpattern: Port the docs to gi-docgen syntax
And make a few formatting fixes.

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

Helps: #3250
2024-05-23 10:36:50 +01:00
Philip Withnall
4fde1a6cfc Merge branch 'ebassi/override-test-c_args' into 'main'
build: Use C89 for the standard version check

See merge request GNOME/glib!4091
2024-05-23 08:53:00 +00:00
Will Thompson
5f6dda5bdc gtestutils: Don't follow symlinks when deleting tests' tempdir
Previously, when cleaning up the temporary directory tree created by
passing G_TEST_OPTION_ISOLATE_DIRS, any symbolic links in that tree
would be followed recursively. If the test case has created a symbolic
link in its temporary directory to a directory outside that tree, this
could lead to unexpected data loss; in particular, if the test case
author has (unwisely) created a symbolic link to /, they could lose all
data on the system.

On systems that have the ftw.h header, replace the current rm_rf()
implementation with one that uses nftw() to perform a depth-first
traversal (FTW_DEPTH) without following symbolic links (FTW_PHYS), and
without crossing mount points (FTW_MOUNT) in case a test has mounted
some other filesystem in the temporary directory.

The callback logs any error to the standard error stream, but returns 0
rather than -1 to allow nftw() to keep walking the tree rather than
terminating immediately. Suppose we are trying to clean up the following
tree:

    tmpdir/
      a/
        f/ (directory not readable for some reason)
        g/
          p
      b/
        c
        d

Since tmpdir/a/f is not readable, we can expect to fail to delete
tmpdir/a/f, tmpdir/a and tmpdir; but it is preferable to (attempt) to
delete the rest of the tree rather than failing outright. The cost is
that three errors will be logged (for tmpdir/a/f, tmpdir/a and tmpdir).

nftw() is part of POSIX.1-2001, SUSv1, and glibc ≥ 2.1, so should be
available on effectively every platform except Windows. (And Windows
does not enable symbolic links by default so the developer error is less
likely to occur there.)

The macOS ftw(3) manpage says:

> These functions are provided for compatibility with legacy code.  New
> code should use the fts(3) functions.

fts(3) does not seem to be part of any standard, but it does seem to be
equally widely supported. The Linux manpages do not indicate that
nftw() is deprecated.

Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/3290
2024-05-22 22:43:42 +01:00
Matthijs Velsink
9b153495b6 docs: Improve conversion-macros formatting
There is no need to use double backticks. Also, insert extra newlines
between header and item, which paragraphs the item [1, 2], increading
readability by giving a little more "breathing" room between items. This
is also done in `macros.md`. Also, indentation of the definition block
should technically be 4 if extra paragraphs are needed, but it's better
to use 4 indentation always to prevent future problems after edits.

[1] https://python-markdown.github.io/extensions/definition_lists/
[2] https://michelf.ca/projects/php-markdown/extra/#def-list
2024-05-22 22:40:31 +02:00
Emmanuele Bassi
11157ca936 build: Use override_options for C standard selection
Do not try to inject the C standard into `c_args`: Meson already
generates a compiler command line with the appropriate C standard, and
adding another one into it at a random position is either potentially
undefined behaviour, or it's going to break the build because the
compiler does not accept more than one switch.

Meson has an `override_options` argument for the executable() object,
and we are already using it in places.
2024-05-22 17:05:03 +01:00
Emmanuele Bassi
4fcdbd6f84 build: Use C89 for the standard version check
The '90' version is for ISO C90, but Meson does not understand it. As
far as GCC and Clang are concerned, `-std=c89` is exactly the same as
`-std=c90`. As of VS 2017, MSVC supports `/std:c11` as the minimum
version of the C standard, with C89 (plus Microsoft extensions) being
the default.

See:

- GCC: https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/C-Dialect-Options.html
- MSVC: https://learn.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=msvc-170#c-standards-support-1
2024-05-22 17:04:51 +01:00
Philip Withnall
dc24e78286 Merge branch 'gobject_fix_links_to_param_name_rules' into 'main'
gobject: fix broken links to parameters and signals naming rules

See merge request GNOME/glib!4083
2024-05-21 22:32:21 +00:00
gwillems
d6e0cf9884 gobject: fix broken links to parameters and signals naming rules 2024-05-21 22:32:20 +00:00
Philip Withnall
317739c8e2 Merge branch 'ebassi/revert-bool-constants' into 'main'
Revert "Alias TRUE and FALSE to C99's true and false"

See merge request GNOME/glib!4089
2024-05-21 22:31:14 +00:00
Emmanuele Bassi
db419ffbde Revert "Alias TRUE and FALSE to C99's true and false"
This reverts commit 67d89a5a87.

Turns out that C++ doesn't like it when stuff goes from an integer to a
boolean.

See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/2900
2024-05-21 21:56:04 +01:00
Emmanuele Bassi
af7c7c0495 Merge branch '3369-dead-links' into 'main'
docs: Fix broken links in gdbus-codegen documentation

Closes #3369

See merge request GNOME/glib!4086
2024-05-21 10:27:29 +00:00
Philip Withnall
38d21dcbfa Merge branch 'wip/pwithnall/musl-systemtap' into 'main'
ci: Disable systemtap on musl CI build

See merge request GNOME/glib!4087
2024-05-21 10:09:55 +00:00
Philip Withnall
9e8b0f6730
ci: Disable systemtap on musl CI build
It’s not needed, and is now failing with:
```
meson.build:2578:36: ERROR: Feature systemtap cannot be enabled: Cannot enable systemtap because dtrace feature is disabled
A full log can be found at /builds/GNOME/glib/_build/meson-logs/meson-log.txt
```

See https://gitlab.gnome.org/GNOME/glib/-/jobs/3901860

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-21 10:44:50 +01:00
Andre Klapper
9dae1dc62f DOAP: Link to GitLab Issues instead of New Issue URL
When not logged in, the New Issue URL only redirects to an unhelpful
login page while the Issues page allows you to search for existing
issues and still offers a "New Issue" button.
2024-05-20 17:36:29 +02:00
Philip Withnall
3472a51dc6 Merge branch 'wip/jtojnar/strfunc-docs' into 'main'
docs: Improve g_strescape & g_strcompress descriptions

See merge request GNOME/glib!4084
2024-05-20 15:16:07 +00:00
Philip Withnall
f5322fdfa8 Merge branch 'ebassi/issue-3372' into 'main'
build: Add docs.c to the GLib GIR

Closes #3372

See merge request GNOME/glib!4085
2024-05-20 15:06:59 +00:00
Philip Withnall
066a2cd8cc
docs: Fix broken links in gdbus-codegen documentation
Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3369
2024-05-20 13:50:46 +01:00
Emmanuele Bassi
e7ef715883 build: Add docs.c to the GLib GIR
For historical reasons, some doc blocks are included in an ancillary
file. Add it to the list of sources parsed by g-ir-scanner, to increase
the coverage of various macros.

Fixes: #3372
2024-05-20 13:34:19 +01:00
Jan Tojnar
c068c1cd74 docs: Remove hex escape mention in gvariant-text-format bytestring
bytestring_parse does not actually support hexadecimal escape sequences.
2024-05-20 13:31:03 +01:00
Balázs Úr
974b89e707 Update Hungarian translation 2024-05-19 10:19:18 +00:00
Jan Tojnar
460a9c299c docs: Adjust gvariant-text-format reference on bytestring escapes
- Do not refer to people’s expectation, they can wildly differ.
- Do not link to `strcompress`, that confusingly does not support `\a`. Link Wikipedia instead.
- Reiterate the C escape sequences from string section, they are not that many.
- Mention escaping newline and other characters (also copied from string section).
- Mention Unicode escapes not being supported to contrast with strings.
2024-05-19 00:55:45 +02:00
Jan Tojnar
32b8a8400d docs: Link Wikipedia on C escapes in gvariant-text-format for strings
Unlike in the bytestring section there is no link to explanation.
2024-05-19 00:55:45 +02:00
Jan Tojnar
56d8f14ab2 docs: Correct octal format in gvariant-text-format
There is no o or 0 prefix, just one to three octal numbers.
2024-05-19 00:31:25 +02:00
Jan Tojnar
701412530b gstrfuncs: Remove g_strescape docs from the header
They are not visible in the API reference with gi-docgen.
2024-05-18 23:34:20 +02:00
Jan Tojnar
c167562b38 docs: Describe g_strcompress processing
GVariant Text Format section on bytestrings links to `g_strcompress`
but what it does was only briefly described in the header file,
which is not visible in the gi-docgen-built reference. To really
find out one would have to guess to continue through the rabbit hole
to `g_strescape`.

Let’s merge the description from the header and elaborate on it a bit.
2024-05-18 23:31:59 +02:00
Jan Tojnar
4acedc8669 docs: Improve g_strescape description wording
Saying that it inserts a backslash before special character is incorrect
for anything but a double quote and backslash itself. Instead, it replaces
the special characters with a C escape sequence.

Let’s fix that and also make it less C focused by using Unicode names
of the characters instead of assuming everyone knows C escape sequences
by heart.
2024-05-18 23:00:21 +02:00
Jan Tojnar
275330009a docs: Fix g_strescape rendering escape sequences
In the gi-docgen Markdown flavour, \' will just prevent the apostrophe
from turning into a curly single quote.
2024-05-18 22:55:58 +02:00
Michael Catanzaro
c88cbd06de Merge branch 'mcatanzaro/#3354' into 'main'
Convert dtrace and systemtap to feature option type, and fix sysprof option

Closes #3354

See merge request GNOME/glib!4076
2024-05-17 20:38:17 +00:00