Commit Graph

20383 Commits

Author SHA1 Message Date
Fabio Tomat
907431da3d Update Friulian translation 2019-03-04 13:33:49 +00:00
Sebastian Dröge
a092dba5f8 Merge branch 'gmarshal-cleanup' into 'master'
Clean up gmarshal.[ch]

See merge request GNOME/glib!703
2019-03-04 13:00:27 +00:00
Matthias Clasen
d7145866a9 Merge branch 'keyfile-backend-dir-permissions' into 'master'
keyfile settings: Use tighter permissions

Closes #1658

See merge request GNOME/glib!604
2019-03-04 12:41:54 +00:00
Philip Withnall
ab93f3f86a gmarshal: Move marshaller documentation comments to above functions
Grouping things together makes them easier to find and keep up to date.
This doesn’t modify any of the comments or make any functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
23f042d284 gmarshal: Drop trailing whitespace from gmarshal.c
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
251430d467 gmarshal: Add copyright headers to gmarshal.[ch]
They were originally generated by glib-genmarshal, which documents its
output as being under the same license as the containing project. In
this case, that’s LGPL.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
1a8e84c540 gmarshal: Drop references to gmarshal.list
It was removed in commit 9c66e65b29.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:33:17 +00:00
Philip Withnall
54317c9118 tests: Run /gsettings/keyfile test in a temporary directory
Don’t pollute the build directory with files generated by running the
test.

Note that there are still other tests in the gsettings.c test suite
which use the build directory, but fixing them is a bit more involved
than I have time for right now. This is a step in the right direction.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 12:28:37 +00:00
Matthias Clasen
5e4da714f0 keyfile settings: Use tighter permissions
When creating directories, create them with 700 permissions,
instead of 777.

Closes: #1658
2019-03-04 12:28:37 +00:00
Philip Withnall
95e00c7581 docs: Various markup improvements to glib-mkenums man page
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 11:14:22 +00:00
Philip Withnall
c3ac761a18 build: Rename gobjectenumtypes.[ch] to glib-enumtypes.[ch]
To reflect the fact that they contain the GObject types for various
enums defined in libglib.

See https://gitlab.gnome.org/GNOME/glib/merge_requests/481#note_451086.

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

Helps: GNOME/gobject-introspection#267
2019-03-04 11:12:59 +00:00
Philip Withnall
1f793e9680 Merge branch 'code-owners-more' into 'master'
docs: Add Ting-Wei Lan as a BSD/kqueue code reviewer

See merge request GNOME/glib!701
2019-03-04 11:12:57 +00:00
Philip Withnall
175f0243ed docs: Add Ting-Wei Lan as a BSD/kqueue code reviewer
As agreed on
https://gitlab.gnome.org/GNOME/glib/issues/1668#note_450631. Thanks!

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

Helps #1668
2019-03-04 10:38:17 +00:00
Марко Костић
f90e1f317e Update Serbian translation 2019-03-03 16:23:22 +00:00
Daniel Șerbănescu
59954adf6a Update Romanian translation 2019-03-02 20:05:57 +00:00
Марко Костић
6b165f0c3e Update Serbian translation 2019-03-01 15:14:49 +00:00
Philip Withnall
fe01ce2c8d Merge branch 'krnowak/closures-fix' into 'master'
tests: Fix closure-refcount to preserve old semantics

See merge request GNOME/glib!699
2019-02-28 13:32:35 +00:00
Marek Cernocky
6575a9ab79 Updated Czech translation 2019-02-28 12:56:37 +01:00
Krzesimir Nowak
d687a45704 tests: Fix closure-refcount to preserve old semantics
The threads used to iterate at least 10000 times before setting the
"seen thread" flag to true. After porting they inadvertently did that
in the first iteration.
2019-02-28 07:05:29 +01:00
Changwoo Ryu
70cfc9d24c Update Korean translation 2019-02-28 03:15:07 +00:00
Tim Sabsch
acf32b13bb Update German translation 2019-02-27 18:22:53 +00:00
Philip Withnall
7536bacb3d Merge branch 'refcount-fixups' into 'master'
Move closures refcount test to gobject/tests/

See merge request GNOME/glib!696
2019-02-27 16:47:58 +00:00
Michael Catanzaro
8f1cbda085 Merge branch 'wip/tingping/threaded-resolver-unused-pool' into 'master'
gthreadedresolver: Remove unused thread pool

See merge request GNOME/glib!698
2019-02-27 15:53:51 +00:00
Patrick Griffis
5967b4501c gthreadedresolver: Remove unused thread pool 2019-02-27 10:41:32 -05:00
Philip Withnall
0d63ee0908 Merge branch 'wip/tingping/socket-client-slow-fix' into 'master'
gsocketclient: Fix critical on cancellation

Closes #1693 and #1653

See merge request GNOME/glib!688
2019-02-27 14:35:53 +00:00
Patrick Griffis
f0fcb68da5 tests: Unmark gsocketclient-slow as flaky
Closes #1653
2019-02-27 09:20:28 -05:00
Patrick Griffis
80af199d7d gsocketclient: Fix critical on cancellation
We need to be more explicit in handling cancellation to avoid
multiple task returns.

Fixes #1693
2019-02-27 09:20:28 -05:00
Philip Withnall
1ae54da69b tests: Continue closure-refcount test until all three threads are seen
Previously, the test assumed that thread1 and thread2 would be scheduled
enough to set seen_thread{1,2} by the fact that the test runs for a high
number of iterations. On some platforms/schedulers, that’s not true,
which causes the test to spuriously fail.

Fix that by forcing the test to continue iterating until both threads
are seen. If this takes too long, the Meson test runner timeout will be
hit and the test will be terminated.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
86f4a02b65 tests: Fix thread safety in closure-refcount test
Previously, all three threads would access several global variables
without locking.

Fix that by using atomic accesses to data stored within the
test_closure_refcount() function, which also eliminates the global state
(which would confuse further tests if they were added to this file).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
5a2a7f7db1 tests: Port closure-refcount from g_thread_create() to g_thread_new()
g_thread_create() has been deprecated for a long time.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
85c02df04e tests: Use g_assert_*() in closure-refcount, rather than g_assert()
g_assert() can be compiled out if G_DISABLE_ASSERT is defined; and
g_assert_*() provide more specific error messages on failure.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
d6e9111986 tests: Fix some code formatting in closure-refcount
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
31664e62f9 tests: Remove unnecessary static attributes from variables
These functions are not run more than once, so the variables don’t need
to be static to save state between runs.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
3aec6a3976 tests: Minor GObject cleanup in closure-refcount
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 12:31:06 +00:00
Philip Withnall
b4aadf6557 tests: Port closure-refcount to g_test_message() from g_print()
This allows more structured test output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 11:59:24 +00:00
Philip Withnall
15958c3ba9 tests: Port closure-refcount to use g_test_run()
This allows more structured test running and output.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 11:59:23 +00:00
Philip Withnall
c96bfd57af build: Move tests/refcount/closures to gobject/tests/closure-refcount
One step towards removing the top-level tests/ directory.

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

Helps: #1434
2019-02-27 11:48:29 +00:00
Sebastian Dröge
cdcb6c2cf1 Merge branch '1698-base64-encoding' into 'master'
Resolve "g_base64_encode(NULL, 0) causes critical warnings"

Closes #1698

See merge request GNOME/glib!695
2019-02-27 11:42:04 +00:00
Philip Withnall
2484d1c950 gbase64: Remove an unnecessary condition
At that point in the code, len can only be 0, 1 or 2. The code below is
a no-op if (len == 0), so the condition is pointless.

Remove it, and we should be able to achieve full branch coverage of
gbase64.c.

This should introduce no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 11:21:43 +00:00
Philip Withnall
387e762879 tests: Add base64 tests from §(Test Vectors) of RFC 4648
While I’m here, we might as well check that we output what the RFC says
we should output.

https://tools.ietf.org/html/rfc4648#section-10

(We do.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 10:45:02 +00:00
Philip Withnall
f9dfddf8eb gbase64: Fix an impossible condition
len is unsigned, so it’s not possible for it to be less than zero.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 10:44:48 +00:00
Philip Withnall
ff76f6920e gbase64: Allow g_base64_encode (NULL, 0) and g_base64_decode ("", *)
Relax a precondition in g_base64_encode_step() to allow this. It’s valid
to base64 encode an empty string, as per RFC 4648.

Similarly for g_base64_decode(), although calling it with a NULL string
has never been allowed. Instead, clarify the case of calling it with an
empty string.

This includes a unit test.

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

Fixes: #1698
2019-02-27 10:44:14 +00:00
Philip Withnall
86e099c134 gbase64: Convert a precondition from g_error() to g_return_val_if_fail()
The caller needs to check this themselves in any case, so we might as
well at least follow convention in defining the precondition.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-27 10:13:18 +00:00
Tomasz Miąsko
153f63d13e gvariant-parser: Fix pattern coalesce of M and *
Previously pattern_coalesce incorrectly concluded that maybe type is not
present when one pattern starts with `M` and other pattern with anything
else than `M` or `m`. This is false when the other pattern is `*`, since
it includes the maybe type.
2019-02-26 17:27:49 +01:00
Philip Withnall
5c97cf666d Merge branch 'ossfuzz-11578-variant-text-type-detection' into 'master'
gvariant-parser: Fix error handling when type coalescing fails

See merge request GNOME/glib!639
2019-02-26 14:19:08 +00:00
Claude Paroz
d05466753f Update French translation 2019-02-25 14:41:35 +00:00
Tomasz Miąsko
c52021f340 tests: Don't leak check-proxies thread 2019-02-25 14:29:35 +01:00
Tomasz Miąsko
d75605e866 tests: Synchronize access to stopping flag 2019-02-25 14:29:35 +01:00
Philip Withnall
dc6b5f88c4 Merge branch 'update-gvdb' into 'master'
Update gvdb submodule

See merge request GNOME/glib!674
2019-02-25 13:04:08 +00:00
Philip Withnall
2b1bcbc99b Merge remote-tracking branch 'gvdb/master' into update-gvdb 2019-02-25 12:40:10 +00:00