1
0
mirror of https://gitlab.gnome.org/GNOME/glib.git synced 2025-07-14 06:20:56 +02:00
Commit Graph

21389 Commits

Author SHA1 Message Date
c8d4154e3d GThreadPool - Add test for
And two other basic threadpool tests.
2020-02-07 16:24:48 +02:00
7f4cb36e8e 2.63.5
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.63.5
2020-02-03 14:26:39 +00:00
f6abc575e2 Merge branch 'wip/oholy/gio-info-mount' into 'master'
gio-tool-info: Print unix mount information where available

See merge request 
2020-02-03 13:14:15 +00:00
e5658c608d Merge branch '715-setenv-warnings' into 'master'
genviron: Message if g_setenv()/g_unsetenv() are used after threads spawned

See merge request 
2020-02-03 12:34:47 +00:00
a82372ba3e gio-tool-info: Print also root path if available
"gio info" got support to print information about mount points,
let's print also root path similarly as it is done by findmnt.
2020-02-03 12:22:43 +00:00
3e10ce89f4 gio-tool-info: Print unix mount information where available
"gio info" output doesn't contain any information about mount points, but
that information can be useful when debugging issues in facilities that
depend on knowing about mount points, such as the trash API.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Co-authored-by: Ondrej Holy <oholy@redhat.com>
2020-02-03 12:22:43 +00:00
260cff0e5f Merge branch 'wip/oholy/peek-path-fixes' into 'master'
gfile: Do not return target-uri from g_file_peek_path()

See merge request 
2020-02-03 11:47:21 +00:00
197ea9fe43 gfile: Fix g_file_peek_path() for remote locations
g_file_peek_path() doesn't work for GVfs locations on the first attempt,
because the compare-and-swap loop is broken before the return value is
set.
2020-02-03 11:09:25 +00:00
b4f6333783 gfile: Do not return target-uri from g_file_peek_path()
Documentation says that g_file_peek_path() returns exactly the same
what g_file_get_path(), but this is not true. Apart from that the code
segfaults for some uris (e.g. for "trash:///"), it returns target-uri
for trash and recent schemes. This is unexpected and can lead to various
issues among others because the target-uri paths are not automatically
translated back to GDaemonFile as it is done with gvfsd-fuse paths.
g_file_get_path() returns NULL for trash and recent schemes, because
fuse paths are not provided for those schemes. So g_file_peek_path()
should return NULL as well. It is up to the concrete application to
use target-uri when appropriate.

This change was	made as a part of commit 4808a957, however, neither
the commit message, neither the corresponding bug doesn't mention this
crucial change and doesn't give any clear reasoning. So let's revert
this.
2020-02-03 11:09:25 +00:00
40bcd3d9a5 Merge branch 'leak-supp' into 'master'
glib.supp: update g-threaded-resolver-getaddrinfo-config

See merge request 
2020-02-03 08:34:31 +00:00
12ee603039 Merge branch 'dab_libmount_auto_detection' into 'master'
meson: libmount autodectection

See merge request 
2020-02-03 08:20:44 +00:00
484d08249e glib.supp: update g-threaded-resolver-getaddrinfo-config
This leak is now detected as 'definite' in newer version of Fedora,
see https://gitlab.freedesktop.org/gstreamer/gst-ci/merge_requests/226
2020-02-03 10:26:33 +05:30
68ec02400c Updated Lithuanian translation 2020-02-02 22:18:50 +02:00
b220033cf0 meson: libmount autodectection
As it can be disabled, it should be automatic as the packahge might be
unavailable for a given target.
2020-02-01 18:53:56 +01:00
5e20086edc Merge branch '1551-todo-ci' into 'master'
ci: Add checks for ‘TODO’ in merge requests

Closes 

See merge request 
2020-01-31 15:35:29 +00:00
afde4a2c72 Merge branch 'benzea/mark-g-source-func' into 'master'
gmain: Mark G_SOURCE_FUNC as available in 2.58

See merge request 
2020-01-31 15:31:28 +00:00
2f18278da5 Merge branch 'locker' into 'master'
doc: Clarify that _locker_new() does not actually allocate memory

See merge request 
2020-01-31 15:26:21 +00:00
8c61dce545 doc: Clarify that _locker_new() does not actually allocate memory
It is important to document the performance (non-)impact of such
critical functions.
2020-01-31 16:00:28 +01:00
d02d22733b Merge branch 'no-typedef-redef' into 'master'
Remove global declaration of GMemoryMonitor

See merge request 
2020-01-31 14:57:23 +00:00
f5f4828721 Remove global declaration of GMemoryMonitor
The GMemoryMonitor interface uses G_DECLARE_INTERFACE, which provides a
typedef for the interface dummy type. We declare the same type inside
the global giotypes.h header, which leads to typedef redeclaration
warnings on toolchains that do not support—intentionally or not—the C11
feature of typedef redefinition.

While we do have a toolchain requirement for C11 typedef redefinitions
listed on our wiki, we also suspended it temporarily to allow users of
non-C11 compilers to work on newer versions of GLib; so, let's keep them
working a while longer.
2020-01-31 14:29:15 +00:00
84896e558d Merge branch 'docs-hash-table-add' into 'master'
ghash: Clarify that g_hash_table_add() always consumes the key

See merge request 
2020-01-31 14:24:07 +00:00
a0e74a8c47 Merge branch '1993-codegen-version-args' into 'master'
Rename gdbus-codegen --glib-min-version argument to --glib-min-required and add --glib-max-allowed

Closes 

See merge request 
2020-01-31 13:49:20 +00:00
e855e30d6d Merge branch 'gtkdoc-check-fix' into 'master'
Various fixes to make gtkdoc-check pass on glib

See merge request 
2020-01-31 13:23:42 +00:00
c07d9434f4 Merge branch 'wip/oholy/gfile-docs' into 'master'
Symlink-related fixes for `g_file_move()`

Closes 

See merge request 
2020-01-31 12:56:15 +00:00
087b9829f4 gdbus-codegen: Tidy up version comparisons
Python tuple comparisons actually do what we want for comparing major
and minor versions, so tidy things up by using that.

This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-31 12:23:50 +00:00
bb501bb8be Merge branch 'mcatanzaro/pkcs11-deferral' into 'master'
Revert "gtlscertificate: Add support for PKCS  backed certificates"

See merge request 
2020-01-31 12:19:15 +00:00
5941bfa49c Merge branch 'mcatanzaro/#2020' into 'master'
Fix crash caused by g_network_monitor_base_add_network()

Closes 

See merge request 
2020-01-31 12:15:20 +00:00
b52bb75327 ghash: Clarify that g_hash_table_add() always consumes the key
Even if the key already exists in the table, `g_hash_table_add()` will
call the hash table’s key free func on the old key and will then replace
the old key with the newly-passed-in key. So `key` is always `(transfer
full)`.

In particular, `key` should never need to be freed by the caller if
`g_hash_table_add()` returns `FALSE`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-31 12:13:23 +00:00
b6b18f0190 Update Japanese translation 2020-01-30 16:21:59 +00:00
556b8df3fd Update Japanese translation 2020-01-30 16:14:13 +00:00
d58e5de9e9 Revert "gtlscertificate: Add support for PKCS backed certificates"
This reverts commit b6d8efbebc.

This GLib API is good, but the implentation is not ready, so there's no
reason to commit to the API in GLib 2.64. We can reland again when the
implementation is ready.

There are three problems: (a) The glib-networking implementation normally
works, but the test has been broken for a long time. I'm not comfortable
with adding a major new feature without a working test. This is
glib-networking#104. (b) The WebKit implementation never landed. There
is a working patch, but it hasn't been accepted upstream yet. This API
isn't needed in GLib until WebKit is ready to start using it.
https://bugs.webkit.org/show_bug.cgi?id=200805. (c) Similarly, even if
the WebKit API was ready, that itself isn't useful until an application
is ready to start using it, and the Epiphany level work never happened.

Let's try again for GLib 2.66. Reverting this commit now just means we
gain another six months before committing to the API forever. No reason
to keep this in GLib 2.64 when nothing is using it yet.
2020-01-30 04:19:22 -06:00
527d6201c3 doc: Fix undocumented G_SIZEOF_MEMBER
A body in the documentation comment is required.
2020-01-29 18:26:21 +01:00
47a20304bd ci: Update Meson to 0.52.1 in fedora docker
This is required to be able to build the doc. The debian docker is still
pinned to 0.49.2 which ensure we can build with both versions of meson.

Meson 0.52.0 warns about adding -Wall flag manually, we can remove that
because warning_level=1 (the default) option already implies it.
2020-01-29 15:54:53 +01:00
5bd78907a7 doc: Add gtk-doc subproject fallback
Now that we require Meson 0.52 to build the doc, we can also pull
gtk-doc as subproject when missing from the system. This requires
to pull gtk-doc master because needed changes there haven't been release
yet.
2020-01-29 15:54:53 +01:00
ed0e06097c doc: Requires Meson >=0.52.0 to build documentation 2020-01-29 15:54:53 +01:00
09d995286b doc: Run gtkdoc-check with unit tests
This has the side effect of always rebuilding the doc at each build when
gtk_doc option is enabled (not by default). Most importantly, this will
enable doc check on our CI.
2020-01-29 15:54:53 +01:00
74bb6c98cb doc: add missing indexes 2020-01-29 15:54:53 +01:00
6e8a7c2cd4 doc: Add back gdbus-object-manager-example
This requires Meson 0.52.0 for the return value of gnome.gtkdoc().
2020-01-29 15:40:17 +01:00
6d05ac2fa9 Revert "docs: remove GDBusObjectManager example"
This reverts commit 398c048c66.

It got removed because it used to cause build issues, but now that we
have a CI let's hope it won't be a problem any more.
2020-01-29 15:40:17 +01:00
0d3d3e1d84 Merge branch 'deprecatedvolatile' into 'master'
Avoid C++20 deprecated assignment to volatile

See merge request 
2020-01-29 13:09:38 +00:00
ecdeee26a9 Merge branch 'BUG_running_docs' into 'master'
docs: tag enclose 'all' and 'help' values

See merge request 
2020-01-29 12:54:32 +00:00
3e4bca79ff Avoid C++20 deprecated assignment to volatile
794c1a30bc "macro wrappers for
g_once_init_enter/leave" added this line (whose intent is unclear to me).

<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1152r4.html>
"Deprecating volatile" (scheduled for inclusion in C++20) will make the
assignment expression

  *(location) = (result)

deprecated when the LHS is of (non-class) volatile type, which is the case when
g_once_init_leave is expanded as part of e.g. G_DEFINE_TYPE_WITH_CODE (in
gobject/gtype.h), where location is a pointer to some

  static volatile gsize g_define_type_id__volatile = 0;

Recent Clang trunk emits -Wdeprecated-volatile for it under -std=c++2a since
<https://github.com/llvm/llvm-project/commit/
4a6861a7e5b59be24a09b8b9782255d028e7aade> "[c++20] P1152R4: warn on any
simple-assignment to a volatile lvalue".

The fix is to make the assignment expression a discared-value expression by
casting it to void (which in turn requires casting the second branch of the
surrounding conditional expression to void, too; not sure what the top-level
cast to void was intended for, and whether it would still be needed under
certain circumstances).
2020-01-29 13:33:08 +01:00
fc1e2bc9f0 docs: tag enclose 'all' and 'help' values
so they are not confused as being normal text.

Seen at:
https://developer.gnome.org/glib/stable/glib-running.html
2020-01-29 12:11:24 +00:00
394a72bc11 Fix crash caused by g_network_monitor_base_add_network()
This avoids a crash when starting Evolution, and fixes the
network-monitor and network-monitor-race test cases on my developer
workstation. (I assume the CI is not crashing due to lack of network
access there.)

Problem is that if a network already exists in the networks table,
g_hash_table_add() "destroys" (unrefs) it before adding the new one
(which we failed to ref before adding). This means we just accidentally
lost a ref. In practice, the network gets unexpectedly destroyed here
before returning.

Fixes 
2020-01-27 16:20:20 -06:00
b3328d77c1 Update Swedish translation 2020-01-27 22:06:10 +00:00
ab32d5c920 Update Brazilian Portuguese translation 2020-01-27 17:59:52 +00:00
298281ff55 Update Malay translation 2020-01-27 12:27:35 +00:00
9734e4854e gdbus-codegen: Add --glib-max-allowed argument
This complements the `--glib-min-required` argument, just like the
`GLIB_MIN_REQUIRED` and `GLIB_MAX_ALLOWED` preprocessor defines which
control access to APIs in C.

Currently, it doesn’t affect code generation at all. When we next change
code generation, we will need to gate any new API usage on this
argument.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: 
2020-01-27 10:42:26 +00:00
4d1c3e15f9 gdbus-codegen: Rename --glib-min-version to --glib-min-required
This makes it consistent with the `GLIB_MIN_REQUIRED` defines which are
used for API stability/versioning in C code.

It doesn’t otherwise change the behaviour of the `--glib-min-version`
argument.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: 
2020-01-27 10:11:46 +00:00
93607c4137 Merge branch 'thread-pool-initialization-logic' into 'master'
Fix initialization logic of GThreadPool if the first created pool is an exclusive one

Closes 

See merge request 
2020-01-27 09:39:59 +00:00