Commit Graph

26351 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
19cfc55847 gicon: Add introspection for to_tokens / from_tokens vfunc's
The GIconIface virtual functions were not introspectable as they use
complex parameters that GI isn't able to compute alone.

So provide introspection metadata to the two function pointers
definitions.

GIcon::from_tokens is a static virtual function so it won't actually
work until GI support for it [1] is merged.

[1] https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/361
2022-10-06 17:25:10 +02:00
Yaron Shahrabani
2b8b866bae Update Hebrew translation 2022-10-06 13:23:20 +00:00
Sebastian Dröge
07e3ec6e04 Merge branch 'aleksander/gdatetime-return-if-fail' into 'main'
gdatetime: add missing g_return_() check in g_date_time_format_iso8601

See merge request GNOME/glib!2931
2022-10-05 07:09:47 +00:00
AJ Jordan
e052dddd1d Fix style warning in gvariant.c 2022-10-05 06:47:26 +00:00
Aleksander Morgado
737ca7de91 gdatetime: add missing g_return_() check in g_date_time_format_iso8601
A clear warning is better than a NULL pointer dereference.

Signed-off-by: Aleksander Morgado <aleksandermj@chromium.org>
2022-10-04 21:37:58 +00:00
Quentin PAGÈS
f5a51089d8 Update Occitan translation 2022-10-04 17:40:02 +00:00
Fabio Tomat
e3c56a2f65 Update Friulian translation 2022-10-03 09:09:10 +00:00
Xavier Claessens
2843eef4a4 Merge branch 'gbsneto/python-find' into 'main'
build: Let Meson figure out Python installation

See merge request GNOME/glib!2928
2022-09-30 12:57:58 +00:00
Georges Basile Stavracas Neto
255fa26b96 build: Let Meson figure out Python installation
Commit 4a4d9eb662 initially switched Meson to find the python
program using find_program('python3'). Sadly that caused a
regression, since in some cases with MSVC it would fallback to
'meson.exe runpython', which is undesired.

However, that particular code was reverted back to an also
undesired lookup method, find_installation('python3'). This
way of finding python also breaks on Windows + MSVC, in particular
when setting it up as follows:

```
winget install python
winget install meson
```

This fails building GLib with:

> python3 not found

Fix that by not passing any argument to find_installation(), which
lets Meson figure it all out by itself.
2022-09-29 17:18:10 -03:00
Nart Tlisha
274761d68f Update Abkhazian translation 2022-09-29 15:32:11 +00:00
Fabio Tomat
ce48bf1abd Update Friulian translation 2022-09-28 08:38:58 +00:00
Marco Trevisan
df8403eec4 Merge branch 're-js-compat' into 'main'
gregex: Allow G_REGEX_JAVASCRIPT_COMPAT in compile mask

See merge request GNOME/glib!2920
2022-09-27 14:29:59 +00:00
Guido Günther
664ee9ca6a gregex: Drop explanation G_REGEX_JAVASCRIPT_COMPAT
It's not supported as of glib 2.74
2022-09-27 13:52:05 +02:00
Guido Günther
a164b49532 gregex: Allow G_REGEX_JAVASCRIPT_COMPAT in compile mask for g_regex_new
The flag is still ignored but this way we properly deprecate
at compile time without raising an unexpected criticals at runtime:

   g_regex_new: assertion '(compile_options & ~G_REGEX_COMPILE_MASK) == 0' failed

and then failing to create the regex completely.

Fixes 8d5a44dc8 ("replace pcre1 with pcre2")
2022-09-27 13:52:05 +02:00
Emmanuele Bassi
f0dd96c287 Merge branch 'ebassi/issue-2770' into 'main'
Empty values are not valid GParamSpec

Closes #2770

See merge request GNOME/glib!2921
2022-09-25 19:41:00 +00:00
Emmanuele Bassi
0b43858f46 Merge branch 'ebassi/fix-python-style-check' into 'main'
ci: Conform to Python's coding style

See merge request GNOME/glib!2922
2022-09-25 19:40:10 +00:00
Emmanuele Bassi
8f975d07f3 ci: Conform to Python's coding style
The check-missing-install-tag.py script breaks PEP8, and the style check
CI job complains about it.
2022-09-25 18:51:22 +01:00
Emmanuele Bassi
ea3f17d598 Empty values are not valid GParamSpec
The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
which means the is_valid() vfunc should do the same.

This avoids a segfault when calling g_param_value_is_valid() on a
GParamSpecParam.

Fixes: #2770
2022-09-25 14:20:24 +01:00
Christian Kirbach
d2818c2033 Update German translation 2022-09-24 21:44:20 +00:00
Sebastian Dröge
54abb0f17b Update version in the docs to 2.74.1 for the fixed handling of non-NUL-terminated structured logging strings 2022-09-22 15:57:01 +03:00
Matthias Clasen
4e61dbc07b Merge branch 'log-field-nul-termination' into 'main'
Consider the GLogField.length of "MESSAGE"/"GLIB_DOMAIN" fields in g_log_writer_format_fields()

See merge request GNOME/glib!2915
2022-09-22 12:37:41 +00:00
Sebastian Dröge
cfdcdaacc1 Consider the GLogField.length of "MESSAGE"/"GLIB_DOMAIN" fields in g_log_writer_format_fields()
Previously it was wrongly assuming that a NUL-termianted string is
passed and the whole string should be written out.

Also document this bug in the documentation of g_log_structured() to
avoid surprises when using older GLib versions.
2022-09-22 15:09:56 +03:00
Peter Williams
7f7171e68a gio: properly guard use of utimensat()
Closes #2766.
2022-09-21 11:56:33 -04:00
Marco Trevisan (Treviño)
0f869ec5c6 regex: Use critical messages if an unexpected NULL parameter is provided
As programmer error we should be consistent in using criticals.
2022-09-21 13:48:18 +02:00
Marco Trevisan (Treviño)
6caf952e48 gregex: Use pcre2 error messages if we don't provide a specific one
In case we got a compilation or match error we should try to provide
some useful error message, if possible, before returning a quite obscure
"internal error" or "unknown error" string.

So rely on PCRE2 strings even if they're not translated they can provide
better information than the ones we're currently giving.

Related to: https://gitlab.gnome.org/GNOME/glib/-/issues/2691
Related to: https://gitlab.gnome.org/GNOME/glib/-/issues/2760
2022-09-21 13:47:56 +02:00
Simon McVittie
831f5c5c2d tests: Run all tests with deprecated property warnings enabled
The tests that functionally rely on G_ENABLE_DIAGNOSTIC=1 still set it
explicitly, so that they will behave as expected when run as
installed-tests or manually.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-21 11:20:34 +01:00
Simon McVittie
7254fd7aa3 gobject/tests: Don't unref a floating object reference by mistake
This goes undiagnosed under normal circumstances, but is a critical
warning (which is fatal by default) under G_ENABLE_DIAGNOSTIC. This is a
programming error, so we should only exercise it under
g_test_undefined(), and only in a test that is intentionally doing this
(as in the previous commit).

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-21 11:19:52 +01:00
Simon McVittie
0bba27eea9 gobject/tests: Exercise a floating object reaching last-unref
This was previously exercised (probably by mistake) in
gobject/tests/type.c, but without making any assertions about what
happened, and the test would fail under G_ENABLE_DIAGNOSTIC if GLib was
compiled with debug enabled.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-21 11:19:41 +01:00
Simon McVittie
25d21edb32 gio/tests: Disable deprecation warnings where necessary
The defaultvalue test sets all properties, even the deprecated ones.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-21 11:19:31 +01:00
Simon McVittie
88e160dfe4 tests: Move common test environment variables to top level
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-21 11:19:28 +01:00
Marco Trevisan
87b4771d1f Merge branch 'install-tag-2' into 'main'
meson: Set install_tag remaining installed files

See merge request GNOME/glib!2905
2022-09-21 10:05:18 +00:00
Simon McVittie
86d4da1634 gobject: Add a test for deprecated properties
Reproduces: https://gitlab.gnome.org/GNOME/glib/-/issues/2748
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-21 10:27:55 +01:00
Simon McVittie
e974c81d0a gobject: Only emit deprecation warnings for user-specified properties
If a deprecated property only gets set because it is G_PARAM_CONSTRUCT
or G_PARAM_CONSTRUCT_ONLY, then there is nothing for the library user
to fix, and we should not emit a deprecation warning.

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2748
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-21 10:27:55 +01:00
Xavier Claessens
497f151810 ci: Check that all installed files have a tag 2022-09-20 11:30:19 -04:00
Xavier Claessens
a73ca336aa meson: Set install_tag on remaining installed files 2022-09-20 11:30:12 -04:00
Xavier Claessens
49fd523af3 meson: Set install_tag on systemtap files
This could be done automatically by Meson, this commit can be reverted
when we have that Meson PR in our CI:
https://github.com/mesonbuild/meson/pull/10829
2022-09-20 11:30:02 -04:00
Xavier Claessens
c00df192ee meson: Set install_tag on installed tests files
This could be done automatically by Meson, this commit can be reverted
when we have that Meson PR in our CI:
https://github.com/mesonbuild/meson/pull/10829
2022-09-20 11:30:02 -04:00
Marco Trevisan
e53c68b52f Merge branch 'cast-error' into 'main'
gthread-win32: Fix conversion error from pointer to integer

See merge request GNOME/glib!2907
2022-09-20 15:26:15 +00:00
Biswapriyo Nath
4f72d3bce7 gthread-win32: Fix conversion error from pointer to integer
glib/gthread-win32.c:359:16: error: incompatible integer to pointer conversion passing 'DWORD' (aka 'unsigned long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
          if (!g_atomic_pointer_compare_and_exchange (&key->p, NULL, impl))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glib/gatomic.h:257:73: note: expanded from macro 'g_atomic_pointer_compare_and_exchange'
    __atomic_compare_exchange_n ((atomic), (void *) (&(gapcae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
                                                                        ^~~~~~~~
2022-09-20 20:28:53 +05:30
Marco Trevisan (Treviño)
5fc8a476c8 gosxcontenttype: Do not mix declarations with code
Fixes: #2759
2022-09-20 15:41:08 +02:00
Marco Trevisan
7b53edbf26 Merge branch 'local-output-stream-prevent-double-fd-close' into 'main'
glocalfileoutputstream: Do not double-close an fd on unlink error

See merge request GNOME/glib!2901
2022-09-20 13:19:04 +00:00
Marco Trevisan
51cf76ebb0 Merge branch 'kjellahl/gio-launch-desktop-clang' into 'main'
gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for clang

Closes #2740

See merge request GNOME/glib!2898
2022-09-19 15:04:21 +00:00
Marco Trevisan
65abaa76c5 Merge branch 'task_get_cancellable_nullable' into 'main'
gio: make g_task_get_cancellable return value (nullable)

See merge request GNOME/glib!2899
2022-09-19 15:02:39 +00:00
Marco Trevisan
871d4f9ccc Merge branch 'tests-error-musl' into 'main'
tests: Only run g_error_new_valist() programmer error test on glibc

See merge request GNOME/glib!2904
2022-09-19 14:38:25 +00:00
Marco Trevisan
7e9625a79b Merge branch 'handling_collision_over_standard_file_descriptors' into 'main'
Handling collision between standard i/o file descriptors and newly created ones

Closes #16

See merge request GNOME/glib!2846
2022-09-19 14:35:45 +00:00
Marco Trevisan
22f0522c10 Merge branch 'mcatanzaro/gtype-criticals' into 'main'
Replace most GObject warnings with criticals

See merge request GNOME/glib!2852
2022-09-19 14:35:12 +00:00
Marco Trevisan
d29e936a6c Merge branch 'mkenum-build-fix' into 'main'
glib-mkenums: Specify output encoding as UTF-8 explicitly for non-English locale

See merge request GNOME/glib!2857
2022-09-19 14:34:01 +00:00
Marco Trevisan
13776b4942 Merge branch 'wip/sadiq/fix-bt-lines-cut' into 'main'
gbacktrace: Don't truncate gdb output

See merge request GNOME/glib!2880
2022-09-19 14:33:14 +00:00
Michal Vasilek
902ba0bc0d tests: Only run g_error_new_valist() programmer error test on glibc
The musl implementation of vasprintf segfaults with NULL
2022-09-18 18:01:40 +02:00
Emmanuele Bassi
b38d5a991f Merge branch 'pr-docs-fix-markup-code-blocks' into 'main'
docs: Fix markup error in code blocks for "DEPRECATED" macros

See merge request GNOME/glib!2903
2022-09-18 14:02:39 +00:00