Commit Graph

30089 Commits

Author SHA1 Message Date
Simon McVittie
31b9c2f589 girparser: Make sizes in integer_aliases more obviously correct
We don't actually need to use the Meson-detected size macros here,
because the result of `sizeof()` is an integer constant expression.

No functional change.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-17 12:34:09 +00:00
Simon McVittie
fa45ea2ac9 girparser: Allow time_t, off_t, etc. to appear in GIR XML
g-ir-scanner currently maps these to lower-level types at scan time by
assuming that time_t is an alias for long, off_t is an alias for size_t
and so on. This is not always accurate: some ILP32 architectures have
64-bit time_t (for Y2038 compatibility) and 64-bit off_t (for large file
support), and that mismatch is tracked as GNOME/gobject-introspection#494.

One option for resolving this g-ir-scanner bug is to have it pass these
types through to the GIR XML, and teach g-ir-compiler and its replacement
gi-compile-repository to convert them to the corresponding concrete
type tag, as they already do for abstract types such as `long long` and
`size_t`.

Loosely based on GNOME/gobject-introspection!451 by Shuyu Liu.

Co-authored-by: Shuyu Liu <liushuyu011@gmail.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-16 10:25:30 +00:00
Simon McVittie
d2a6c379e8 girparser: Don't assume sizeof(size_t) == sizeof(void *)
We don't actually need to use the results of configure-time checks here:
sizeof is a perfectly reasonable integer constant expression, so we can
use that directly.

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-16 10:24:58 +00:00
Emmanuele Bassi
e64a93269d Merge branch 'wip/smcv/lint-env' into 'main'
tests: Provide G_TEST_SRCDIR, G_TEST_BUILDDIR to lint scripts

Closes #3289

See merge request GNOME/glib!3968
2024-03-16 00:04:09 +00:00
Simon McVittie
6da055b5ab tests: Provide G_TEST_SRCDIR, G_TEST_BUILDDIR to lint scripts
These scripts use $(readlink -f) to guess their own path if necessary,
but macOS readlink doesn't support the -f option, and POSIX doesn't
guarantee that readlink even exists.

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/3289
Fixes: d7601f7e "Incorporate some lint checks into `meson test`"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-15 15:15:21 +00:00
Vincent Chatelain
968372a619 Update French translation 2024-03-14 18:23:47 +00:00
Piotr Drąg
27f7d7ca18 Update Polish translation 2024-03-14 13:47:35 +00:00
Fran Dieguez
d990779dc6 Update Galician translation 2024-03-14 09:17:38 +00:00
Michael Catanzaro
c6d4fef43c Merge branch '3287-docs-dirs' into 'main'
docs: Reduce nesting of documentation directories

Closes #3287

See merge request GNOME/glib!3964
2024-03-13 21:16:48 +00:00
Philip Withnall
548ec9f186 docs: Reduce nesting of documentation directories
The `gi-docgen` tool is not designed to be used like that. In
particular, when nesting documentation directories, the generated
`*.devhelp2` files (needed by Devhelp to show the documentation) are
nested one directory level too deep for Devhelp to find them, and hence
are useless, and the documentation doesn’t show up in this common
documentation viewer.

So, change the installed documentation directory hierarchy:
 * `${PREFIX}/share/doc/glib-2.0/gio` → `${PREFIX}/share/doc/gio-2.0`
 * `${PREFIX}/share/doc/glib-2.0/glib-unix` →
   `${PREFIX}/share/doc/glib-unix-2.0`
 * `${PREFIX}/share/doc/glib-2.0/gobject` →
   `${PREFIX}/share/doc/gobject-2.0`
 * etc.
 * `${PREFIX}/share/doc/glib-2.0/glib` → `${PREFIX}/share/doc/glib-2.0`

This is going to seem like pointless churn (the contents of the
documentation have not changed), and packagers may mourn the split of
content in `/usr/share/doc` from `/usr/share/doc/${package_name}` to
`/usr/share/doc/${pkg_config_id}` instead, but that seems to be the best
approach to fix this issue in GLib. gi-docgen’s behaviour does feel
fairly consistent and correct with the rest of how it works (single
output directory).

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

Fixes: #3287
2024-03-13 18:51:21 +00:00
Changwoo Ryu
92eb8d2ddc Update Korean translation 2024-03-13 10:34:45 +00:00
Michael Catanzaro
d0dfd551b2 Merge branch 'needless-recompile' into 'main'
meson: Fix a needless recompilation of some gdbus tests

See merge request GNOME/glib!3962
2024-03-12 23:32:09 +00:00
Nirbheek Chauhan
92a97c4f48 meson: Fix a needless recompilation of some gdbus tests
The gdbus-example-objectmanager visibility header was being re-created
on reconfigure, causing a needless rebuild of gdbus tests that were
using the visibility header.

All other invocations of gen_visibility_macros are via custom_target.
2024-03-13 03:32:56 +05:30
Ask Hjorth Larsen
1f8d5a9cbf Update Danish translation 2024-03-12 21:58:43 +00:00
Ekaterine Papava
9bba53cf02 Update Georgian translation 2024-03-11 21:01:48 +00:00
Juliano de Souza Camargo
7480807e93 Update Brazilian Portuguese translation
(cherry picked from commit 36b81fbfb6)
2024-03-11 17:02:02 +00:00
Fran Dieguez
fcacaf33b1 Update Galician translation 2024-03-11 08:21:17 +00:00
Ekaterine Papava
a2021e4b26 Update Georgian translation 2024-03-10 12:30:08 +00:00
Rūdolfs Mazurs
8067f01bd7 Update Latvian translation 2024-03-08 21:36:54 +00:00
Rūdolfs Mazurs
9758db9a40 Update Latvian translation 2024-03-08 19:45:10 +00:00
Milo Casagrande
cb9b33c3b9 Update Italian translation 2024-03-08 13:38:16 +00:00
Philip Withnall
763cc3b238
2.80.0
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-07 21:35:05 +00:00
Philip Withnall
7c909697db Merge branch 'signals-docs' into 'main'
docs: Minor improvements to GSignal documentation

See merge request GNOME/glib!3956
2024-03-07 14:45:42 +00:00
Philip Withnall
a60e6bedae docs: Document that signal connection functions cannot fail
The documentation previously implied that they could. That’s not really
true though: they can only fail if preconditions fail, i.e. they’re
passed invalid input. That’s a programmer error, which is not something
we want to encourage people to check for at runtime (e.g. by dynamically
checking for a 0 return value).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-07 13:12:07 +00:00
Philip Withnall
fafe1a14a8 docs: Minor reformatting / gi-docgenification of signals docs
This is nowhere near a complete check-through and gi-docgenification of
the signals docs, just a few bits I was looking at anyway.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3250
2024-03-07 13:12:07 +00:00
Philip Withnall
8a640f50ca docs: Document signal handler types and arguments
It seems this was missing from the documentation (or, at least, not in
an obvious place).

As spotted on
https://discourse.gnome.org/t/calling-g-main-loop-quit-from-a-signal-handler/19785.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-07 13:12:07 +00:00
Danial Behzadi
095142f504 Update Persian translation 2024-03-06 21:37:21 +00:00
Anders Jonsson
d3b2e8f217 Update Swedish translation 2024-03-06 18:27:35 +00:00
Andi Chandler
87ee7dea85 Update British English translation 2024-03-06 14:44:18 +00:00
Philip Withnall
a6dbfcd601 docs: Slightly rephrase signals docs to not use the first person
The rest of the documentation style is to be more indirect, so let’s
consistently use that.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-06 13:21:56 +00:00
Philip Withnall
536bdabd6e docs: Add subheadings to signals documentation page
Splits the text up a bit and allows linking directly to those subsections.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-06 13:21:30 +00:00
Baurzhan Muftakhidinov
e006624a45 Update Kazakh translation 2024-03-06 03:01:06 +00:00
Michael Catanzaro
a767439117 Merge branch 'wip/bobby285271/fix-docs-dir' into 'main'
docs: Fix building with docs enabled and introspection disabled

See merge request GNOME/glib!3955
2024-03-06 01:12:51 +00:00
Michael Catanzaro
2c2d55e95e Merge branch 'wip/bobby285271/native-gi-docgen' into 'main'
docs: Specify gi-docgen as a native dependency

See merge request GNOME/glib!3953
2024-03-06 01:12:47 +00:00
Bobby Rong
dd97c88f90 docs: Fix building with docs enabled and introspection disabled
We install gvariant-specification-1.0.html to `docs_dir` but that shouldn't require `enable_gir`.

Fixes: docs/reference/glib/meson.build:26:16: ERROR: Unknown variable "docs_dir"
Part-of: <https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3955>
2024-03-05 16:45:21 +00:00
Bobby Rong
c7476cd615 docs: Specify gi-docgen as a native dependency
gi-docgen is supposed to be ran natively on the build machine.

Part-of: <https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3953>
2024-03-05 22:23:01 +08:00
Philip Withnall
04abb73732 Merge branch 'wip/smcv/warn-if-fail' into 'main'
g_warn_if_fail: Document as always evaluating expr

See merge request GNOME/glib!3951
2024-03-05 12:25:42 +00:00
Matej Urbančič
e11d8864d5 Update Slovenian translation 2024-03-05 11:49:43 +00:00
Simon McVittie
88c76b89e0 g_warn_if_fail: Document as always evaluating expr
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-05 11:06:10 +00:00
Matej Urbančič
0211f06be3 Update Slovenian translation 2024-03-04 21:34:16 +00:00
Balázs Úr
a5dcd47000 Update Hungarian translation 2024-03-04 10:52:21 +00:00
Aurimas Černius
dfa3d51601 Update Lithuanian translation 2024-03-03 20:35:17 +00:00
Sabri Ünal
73d523b6be Update Turkish translation 2024-03-03 18:34:45 +00:00
Brage Fuglseth
06c173e6ca Update Norwegian Bokmål translation 2024-03-03 14:45:17 +00:00
Luming Zh
cab1d3d752 Update Chinese (China) translation 2024-03-03 09:57:03 +00:00
Yaron Shahrabani
e00ef0aa97 Update Hebrew translation 2024-03-02 22:17:15 +00:00
Artur S0
4e6f7c6c33 Update Russian translation 2024-03-02 19:48:52 +00:00
Asier Sarasua Garmendia
811b4c90ad Update Basque translation 2024-03-01 19:01:58 +00:00
Danial Behzadi
92aed1bab9 Update Persian translation 2024-03-01 17:06:24 +00:00
Khalid Abu Shawarib
d72129b56e Merge branch 'macros-docs-fix' into 'main'
docs: Fix a typo in the macros docs page

See merge request GNOME/glib!3947
2024-03-01 13:29:22 +00:00