Commit Graph

25895 Commits

Author SHA1 Message Date
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
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
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
Tom Levy
bd3abd0bde docs: Fix markup error in code blocks for "DEPRECATED" macros 2022-09-18 13:09:09 +00:00
Sabri Ünal
74b9f4e3c0 Update Turkish translation 2022-09-18 08:10:26 +00:00
Baurzhan Muftakhidinov
02c14bb65c Update Kazakh translation 2022-09-18 06:20:51 +00:00
Emmanuele Bassi
115d8b48ac Post-release version bump to 2.74.1 2022-09-17 19:50:37 +01:00
Marco Trevisan (Treviño)
30bd57ecf8
2.74.0
Signed-off-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
2022-09-17 20:38:17 +02:00
Bruce Cowan
6d56a75ab2 Update British English translation 2022-09-17 07:54:29 +00:00
Marco Trevisan (Treviño)
2401e1a090 glocalfileoutputstream: Do not double-close an fd on unlink error
In case we fail unlinking a file we could close again an FD that has
been already just closed. So avoid this by unsetting it when closing.

Coverity CID: #1474462
2022-09-16 15:11:47 +02:00
Marco Trevisan
ee470da7c8 Merge branch 'pr-docs-improve-wording-glib-unix' into 'main'
docs: Improve wording in documentation of g_unix_signal_source_new()

See merge request GNOME/glib!2900
2022-09-16 12:30:43 +00:00
Tom Levy
eeaef8b950 docs: Improve wording in documentation of g_unix_signal_source_new()
- Insert missing word "from".

- Remove space between function name and "()" so syntax highlighting
  can recognise it as a function.

- Avoid "you"/"your" when discussing the reentrancy issues of regular
  UNIX signal handlers, because it gives the false impression that
  these issues are applicable to g_unix_signal_source_new().

Unrelated:

- Fix missing space in documentation of g_signal_new_class_handler().
2022-09-16 08:25:46 +00:00
Jason Francis
9cd9787c52
gio: make g_task_get_cancellable return value nullable 2022-09-16 01:27:12 -04:00
Kjell Ahlstedt
37dba1c425 gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for clang
The clang compiler requires the static_assert expression to be an integral
constant expression. `"text"` is not, but `sizeof "text"` is.

Fixes #2740
2022-09-15 12:55:18 +02:00
Matthias Clasen
d37beda25e Merge branch 'expose-artifacts-in-pr' into 'main'
ci: Expose the coverage report and docs as links in the MR's

See merge request GNOME/glib!2820
2022-09-15 01:41:31 +00:00
Marco Trevisan (Treviño)
d6a378afa7 run-docker: Do not require sudo if the user is part of docker group 2022-09-15 03:16:52 +02:00
Marco Trevisan (Treviño)
3ddfb10b0b ci: Generate Cobertura XML and use it to feed gitlab for MR integration
gitlab has coverage integration in MRs, but we need a cobertura
formatted XML files (each must be less than 10 MB [1]) to show it, so
generate it using a python script and inform gitlab about it.

See https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html

[1] https://gitlab.com/gitlab-org/gitlab/-/issues/328772#note_840831654
2022-09-15 03:16:52 +02:00
Marco Trevisan (Treviño)
29cf6b2b65 ci: Install lcov-cobertura and cobertura-split script in coverage images
These are needed to be able to get cobertura reports in gitlab.
2022-09-15 03:12:08 +02:00
Marco Trevisan (Treviño)
22f5016303 ci: Expose the coverage report as link in the MR's
It's making handier to check how changes are tested.
2022-09-15 01:44:29 +02:00
Emmanuel Fleury
d9ba615090 Handling collision between standard i/o file descriptors and newly created ones
Though unlikely to happen, it may happen that newly created file
descriptor take the value 0 (stdin), 1 (stdout) or 2 (stderr) if one
of the standard ones have been dismissed in between. So, it may
confuse the program if it is unaware of this change.

The point of this patch is to avoid a reasign of standard file
descriptors on newly created ones.

Closes issue #16
2022-09-14 08:50:40 +02:00
Jiri Grönroos
4f4ac4ac1a Update Finnish translation 2022-09-13 20:06:48 +00:00
Sebastian Dröge
a20a36b26f Merge branch 'revert-de57914b' into 'main'
Revert "Merge branch 'wip/smcv/deprecated-construct-prop' into 'main'"

See merge request GNOME/glib!2890
2022-09-13 11:32:48 +00:00
Sebastian Dröge
d41b5bf999 Revert "Merge branch 'wip/smcv/deprecated-construct-prop' into 'main'"
This reverts merge request !2888
2022-09-13 11:20:03 +00:00
Sebastian Dröge
de57914b83 Merge branch 'wip/smcv/deprecated-construct-prop' into 'main'
gobject: Only emit deprecation warnings for user-specified properties

Closes #2748

See merge request GNOME/glib!2888
2022-09-13 11:09:26 +00:00
Simon McVittie
fef0408eaa 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-13 11:20:45 +01:00
Simon McVittie
b88474ee7c 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-13 11:16:58 +01:00
Alexander Shopov
98d071498b Update Bulgarian translation 2022-09-13 08:31:20 +00:00
Marco Trevisan
0d823aa926 Merge branch 'wip/3v1n0/regex-pcre2-flags-fixes' into 'main'
GRegex flags fixes and cleanups

Closes gtksourceview#283, #2741, #2729, #2688 e gtksourceview#278

See merge request GNOME/glib!2878
2022-09-12 21:45:57 +00:00
Claude Paroz
a2a0441189 Update French translation 2022-09-12 18:00:20 +00:00
Xavier Claessens
dcb464f013 Merge branch 'install-tag' into 'main'
meson: Set install_tag on all tools

See merge request GNOME/glib!2882
2022-09-12 14:22:03 +00:00
Xavier Claessens
a1c78d63ef meson: Set install_tag on all tools
Those tools are not needed at runtime for typical applications,
distributions typically package them separately.

This makes `meson install --tag runtime` skip installation of those
tools. Omitting `--tag` argument will still install them, as well as
with `--tag bin,bin-devel`.

See https://mesonbuild.com/Installing.html#installation-tags.
2022-09-12 09:50:31 -04:00
Marco Trevisan (Treviño)
653f8eb020 tests/regex: Perform more tests both with and without optimizations 2022-09-12 14:08:13 +02:00
Marco Trevisan (Treviño)
bec68b2d74 glib/regex: Do not use JIT when using unsupported match options
Do not store jit status for regex unless during initial compilation.
After that, decide whether to use it depending on matching options.

In fact there are some matching options that are incompatible with JIT,
as the PCRE2 docs states:

  Setting PCRE2_ANCHORED or PCRE2_ENDANCHORED at match time is not
  supported by the just-in-time (JIT) compiler. If it is set, JIT
  matching is disabled and the interpretive code in pcre2_match() is
  run. Apart from PCRE2_NO_JIT (obviously), the remaining options are
  supported for JIT matching.

Fixes: GNOME/gtksourceview#283
2022-09-12 14:08:13 +02:00
Marco Trevisan (Treviño)
0831393dd0 tests/regex: Make possible to test replacements with options 2022-09-12 13:55:39 +02:00
Marco Trevisan (Treviño)
5e76cde5ff regex: Handle JIT errors more explicitly 2022-09-12 13:55:39 +02:00
Marco Trevisan (Treviño)
fe1c2628d5 regex: Avoid allocating offsets until we've a match
There's no much point of pre-allocating offsets given that we're doing
this when needed if only have matches to store.

So let's just allocate the spaces for the dummy offset we depend on,
while allocate the others on demand.
2022-09-12 13:55:39 +02:00
Marco Trevisan (Treviño)
e8628a7ed5 regex: Compute the offsets size based on match results
While the ovector count would include all the allocated space, we only
care about the actual match values, so avoid wasting allocations and
just use the ones we need to hold the offsets.
2022-09-12 13:55:39 +02:00
Marco Trevisan (Treviño)
aee84cb45c gregex: Avoid re-allocating if we have no size change
This is handled by the syscall underneath, but we can just avoid a call
cheaply.
2022-09-12 13:55:39 +02:00
Marco Trevisan (Treviño)
11521972f4 gregex: Handle the case we need to re-allocate the match data
In case PCRE2 returns an empty match

This can be easily tested by initializing the initial match data to a
value that is less than the expected match values (e.g. by calling
pcre2_match_data_create (1, NULL)), but we can't do it in our tests
without bigger changes.
2022-09-12 13:55:39 +02:00