Commit Graph

30395 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
e12dc942c2 ci/coverage-docker: Ignore unused patterns
gnulib doesn't seem to be used at the moment so it's _build folder, but let's
still try and don't fail if that's not happening
2024-05-24 20:04:06 +02:00
Marco Trevisan (Treviño)
90b561aff6 tools/glib.supp: Also ignore possible leaks on g_set_user_dirs()
Newer valgrind is smarter so g_set_user_dirs() are now possible leaks
2024-05-24 19:19:01 +02:00
Marco Trevisan (Treviño)
3b8c1d92a5 glib/tests/unix: Free fds before exiting
Old valgrind wasn't spotting this but we're smarter now!
2024-05-24 19:10:08 +02:00
Marco Trevisan (Treviño)
c76cc8fe72 ci: Actually use a fedora 39 image
Also start using a more reliable versioning scheme for the fedora images
so that the tag is always vFEDORA_VERSION.IMAGE_VERSION to make it
easier to understand on future updates

Fixes: #3381
2024-05-24 18:54:54 +02:00
Marco Trevisan (Treviño)
25e3808890 ci: Update coverage files atomically
Since we run tests in parallel we may end up rewriting the coverage info
while running files acting on the same source files.

The compiler can be smart though, so let's use the proper flag.
2024-05-24 18:53:34 +02:00
Marco Trevisan (Treviño)
79ae65fcfc ci: Ignore lcov errors on source missing
When using dtrace some temporary files may be leaked as source files and
this may lead to build issues such as

  geninfo: ERROR: unable to open
    /builds/GNOME/glib/_build/.dtrace-temp.ed1c5ba9.c:
    No such file or directory

AFAIK there's no way to keep these temporary files around, so the only
thing we can do is making lcov less strict about missing files
2024-05-24 18:42:56 +02: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
Michael Catanzaro
329a69e558 Change sysprof build option default value to 'auto'
Now sysprof can be enabled by default in distros that use
-Dauto_features=enabled or for developers who already have sysprof
installed, while it's still disabled for developers who do not have
sysprof installed. See #3354
2024-05-17 15:22:41 -05:00
Michael Catanzaro
153cda6669 Convert systemtap from bool to feature option type
Now systemtap can be enabled by default in distros that use
-Dauto_features=enabled or for developers who already have systemtap
installed, while it's still disabled for developers who do not have
systemtap installed. See #3354
2024-05-17 15:22:41 -05:00
Michael Catanzaro
ed020a688a Convert dtrace from bool to feature option type
Now dtrace can be enabled by default in distros that use
-Dauto_features=enabled or for developers who already have dtrace
installed, while it's still disabled for developers who do not have
dtrace installed. See #3354
2024-05-17 15:22:41 -05:00
Philip Withnall
04de380f74 Merge branch 'wip/smcv/gdbusconn-comment' into 'main'
gdbusconnection: Fix a misleading comment

See merge request GNOME/glib!4063
2024-05-16 23:42:06 +00:00
Philip Withnall
5b1817c07b Merge branch 'wip/smcv/more-gdbus-constants' into 'main'
gdbus: Make more use of symbolic constants for various aspects of the D-Bus protocol

See merge request GNOME/glib!4069
2024-05-16 23:27:02 +00:00
Philip Withnall
04a6ee3e9b Merge branch 'wip/3v1n0/gi-repository-leak-fixes' into 'main'
girepository/build: Actually use our compiler to generate GLib typelibs and fix parser leaks

See merge request GNOME/glib!4064
2024-05-16 23:15:16 +00:00
Philip Withnall
52e850d54c Merge branch 'ebassi/i18n-docs' into 'main'
Document the magic gettext macros in gi18n.h

Closes #3361

See merge request GNOME/glib!4071
2024-05-16 22:27:48 +00:00
Philip Withnall
5433bb23a0 Merge branch '3303-girepository-typelib-determinicity' into 'main'
girepository: Keep an ordered list of the loaded typelibs

Closes #3303

See merge request GNOME/glib!4033
2024-05-16 22:27:01 +00:00
Simon McVittie
434c105bbe gdbusconnection: Fix a misleading comment
While backporting CVE-2024-34397 fixes I noticed that this comment
claimed that the reference count is immutable after construction, which
is clearly not true. In fact the reference count is the only
mutable field.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:53:11 +01:00
Simon McVittie
510d0716be gdbus: Use symbolic constants for the most common D-Bus error names
To avoid adding a large block of macros to gdbusprivate.h, I've only
added a subset of the well-known error names. I chose to draw the
line by adding constants for the errors emitted via their string names
in GDBusConnection, but not for error names that are only mentioned
in `gdbuserror.c` or in tests.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:23 +01:00
Simon McVittie
7c609f8142 gdbus: Use symbolic constants for interfaces from dbus-specification
Most D-Bus interfaces are domain-specific, but these interfaces from the
D-Bus Specification are intended to be commonly used in any context for
which they are found to be appropriate.

Most of these use `gdbusprivate.h`. One exception is that
`gio/tests/gdbus-example-*` redefine the constants locally: due to these
files' dual role as part of the unit tests and as sample code, it seems
desirable to ensure that they can still be compiled outside GLib.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:23 +01:00
Simon McVittie
b4f8d4a5d5 gdbus: Use symbolic constants for the reserved Local path and interface
These are reserved by the D-Bus Specification.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:23 +01:00
Simon McVittie
7401577074 gdbus: Move protocol constants from gdbusdaemon into gdbusprivate.h
These well-known flags and replies are part of the D-Bus Specification,
and also exist with the same names in libdbus header files.
Moving them into a private header means that unit tests like
gdbus-proxy-threads and gdbus-subscribe don't have to reinvent them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:23 +01:00
Simon McVittie
b0e8612a3b gdbusdaemon: Use shared constants for message bus name, path, interface
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:23 +01:00
Simon McVittie
131a061aca gdbus: Use symbolic constants for various references to the message bus
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:23 +01:00
Simon McVittie
19223803f5 gdbus: Use symbolic constants to subscribe to message bus signals
Unlike the various functions to call D-Bus methods, these sort their
arguments in a non-obvious order (bus name, interface, signal, path),
presumably aiming to sort the most-likely-to-be-used arguments first.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:23 +01:00
Simon McVittie
fe14968c0d gdbus: Use symbolic constants to call message bus methods
These function arguments are arranged in the obvious order from
conceptually largest to smallest: (bus name, path, interface, method).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:22 +01:00
Simon McVittie
2151a82007 gdbus tests: Fix a typo
This test was subscribing to the NameOwnerChanged signal with an
incorrect object path, so the callback would never be called. In this
particular case it doesn't actually matter, because the callback does
nothing anyway (the purpose of this particular test was to test that
the user-data is freed on unsubscription).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-16 22:52:22 +01:00
Marco Trevisan (Treviño)
b27fbf503b girepository/girparser,girmodule: Use a GPtrArray to hold the dependencies
It's just better than a list of strings for various reasons, but mostly
here it allows also to avoid copying the lists but making the
ownership clearer through references
2024-05-16 22:51:12 +01:00
Marco Trevisan (Treviño)
2e2e606208 girparser: Simplify the ownership of context modules and parsed ones
There's no need to copy the list of modules and free it again, we can
just handle this by moving the modules to the parser promptly.
2024-05-16 22:51:12 +01:00
Marco Trevisan (Treviño)
23d3a5e859 girepository/girparser: Free the temporary context modules list when done
When we're about to return the found module we can just drop the list
of modules that we had previously copied in the temporary context
2024-05-16 22:51:12 +01:00
Marco Trevisan (Treviño)
b59c3f73ee girepository/girparser: Free the parsed modules list elements
We were removing the modules themselves, but not the list items
2024-05-16 22:51:12 +01:00