Commit Graph

19730 Commits

Author SHA1 Message Date
Jordi Mas
0f7839f0ff Update Catalan translation 2019-02-10 15:35:49 +01:00
Charles Monzat
97b41e10c7 Update French translation
(cherry picked from commit f7970e55c4)
2019-02-09 10:50:02 +00:00
Michael Catanzaro
6d8c8f509e Merge branch 'wip/tingping/network-address-errors' into 'master'
gnetworkaddress: Fix incorrect error propagation when resolving addresses

Closes #1644

See merge request GNOME/glib!642
2019-02-07 21:16:16 +00:00
Patrick Griffis
ed57faeeda tests: Use fewer magic numbers in network-address tests 2019-02-07 11:56:22 -05:00
Patrick Griffis
5827cef22d tests: Unmark network-address test as flaky 2019-02-07 11:56:22 -05:00
Patrick Griffis
5b0fdfda6d gnetworkaddress: Fix incorrect error propagation when resolving addresses
Previously this would always error if ipv6 errored after ipv4
succeeded which was incorrect.

This explicitly tests the order of erroring.

Fixes #1644
2019-02-07 11:56:22 -05:00
Philip Withnall
01cff0e9b8 Merge branch 'spawn-docs-typo-fix' into 'master'
Minor typo fixes to GSpawn documentation

See merge request GNOME/glib!641
2019-02-07 11:12:58 +00:00
Philip Withnall
47e8f521ba gspawn: Tiny improvement to formatting of documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-07 10:33:24 +00:00
Philip Withnall
5cef08977b gspawn: Fix minor typo in documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-07 10:30:49 +00:00
Philip Withnall
0af468e9c9 Merge branch 'wip/rishi/gtask-return-cancelled' into 'master'
gtask: Ensure that cancelled tasks are returned asynchronously

Closes #1608

See merge request GNOME/glib!509
2019-02-06 13:40:49 +00:00
Debarshi Ray
381af21072 gio/tests/task: Ensure that cancelled tasks are returned asynchronously
Closes https://gitlab.gnome.org/GNOME/glib/issues/1608
2019-02-06 13:30:01 +00:00
Debarshi Ray
6f3d57d2ee gtask: Return cancelled tasks asynchronously
Once cancelled, a GTask's callback should not only be invoked
asynchronously with respect to the creation of the task, but also with
respect to the GCancellable::cancelled handler. This is particularly
relevant in cases where the cancellation happened in the same thread
where the task is running.

Spotted by Dan Winship and Michael Catanzaro.

Closes https://gitlab.gnome.org/GNOME/glib/issues/1608
2019-02-06 13:30:01 +00:00
Will Thompson
0f8a4f61b0 Merge branch 'socket-service-flaky' into 'master'
tests: Tag socket-service test as ‘flaky’

See merge request GNOME/glib!640
2019-02-06 13:16:35 +00:00
Philip Withnall
cffed58737 tests: Tag socket-service test as ‘flaky’
It needs investigating and fixing properly, but let’s not let it disrupt
the CI in the meantime.

Follow-up in https://gitlab.gnome.org/GNOME/glib/issues/1679.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-06 12:50:38 +00:00
Philip Withnall
82c3e92855 Merge branch 'macos-user-dirs' into 'master'
Fix g_get_user_special_dir() on MacOS

Closes #1048

See merge request GNOME/glib!594
2019-02-05 15:54:05 +00:00
Philip Withnall
2bcce9b2e0 Merge branch '535-strfunc' into 'master'
macros: Try to use the standard __func__ first in G_STRFUNC

Closes #535

See merge request GNOME/glib!635
2019-02-05 12:35:09 +00:00
Javier Jardón
9f75cc9edf macros: Try to use the standard __func__ first in G_STRFUNC
__func__ is part of the C99 standard.
__FUNCTION__ is another name for __func__. Older versions of GCC
recognize only this name. However, it is not standardized.
For maximum portability, Its recommended to use __func__.
__PRETTY_FUNCTION__ is yet another name for __func__. However, in C++,
__PRETTY_FUNCTION__ contains the type signature of the function as
well as its bare name

http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html

https://gitlab.gnome.org/GNOME/glib/issues/535
2019-02-05 12:20:23 +00:00
Philip Withnall
f2d51adc13 Merge branch 'fix-protocol-test-win32' into 'master'
Use win32 io channel on windows for the protocol test

See merge request GNOME/glib!613
2019-02-05 11:31:36 +00:00
Philip Withnall
22c168d5b7 Merge branch 'socket.win32' into 'master'
Win32: gio/gsocket.c: Set WSAEWOULDBLOCK on G_POLLABLE_RETURN_WOULD_BLOCK

See merge request GNOME/glib!634
2019-02-05 11:25:52 +00:00
Chun-wei Fan
bb73a22448 Win32: gio/gsocket.c: Set WSAEWOULDBLOCK on G_POLLABLE_RETURN_WOULD_BLOCK
To make things consistent across the board as that is the WinSock2 error
code that is received by g_socket_send_message_with_timeout() when it
returns G_POLLABLE_RETURN_WOULD_BLOCK.
2019-02-05 11:15:50 +08:00
Philip Withnall
bc1443b2b6 2.59.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-02-04 13:40:43 +00:00
Philip Withnall
1f7d5b85d7 Merge branch 'trash-portal' into 'master'
Support the trash portal

See merge request GNOME/glib!276
2019-02-04 13:38:03 +00:00
Philip Withnall
5d719c782c Merge branch 'script-enum' into 'master'
Define enum types for Unicode enums

See merge request GNOME/glib!481
2019-02-04 12:28:02 +00:00
Philip Withnall
1ed7a35650 Merge branch 'fix-gi-minint-macro-values' into 'master'
gtypes: add g-i annotations for G_MININT macros. Fixes #1673

Closes #1673

See merge request GNOME/glib!632
2019-02-04 12:22:10 +00:00
Piotr Drąg
7827b83a74 Update Polish translation 2019-02-03 17:42:45 +01:00
Balázs Úr
edb18172c7 Update Hungarian translation 2019-02-03 15:31:31 +00:00
Aurimas Černius
d706e758ce Updated Lithuanian translation 2019-02-03 16:58:39 +02:00
James Westman
11729cdc0c Fix g_get_user_special_dir() on macOS
This uses newer methods that support more folders such as Downloads. The
Objective-C code is in a separate file, gosxutils.m.

Based on !85 by Patrick Griffis.
2019-02-01 09:10:02 -06:00
Christoph Reiter
0cf55f4fd9 gtypes: add g-i annotations for G_MININT macros. Fixes #1673
They were changed in 6a2cfde2 to reuse the G_MAXINT values but
parsing nexted macros is currently broken in g-i and results in wrong
values.

Add value annotations for g-i to override the values.

This also moves the annotations to the macro definitions to have
everything g-i uses in one place.
2019-02-01 15:04:57 +01:00
Philip Withnall
66f3016026 Merge branch 'ignore-more-decorators' into 'master'
docs: Ignore more version macros

See merge request GNOME/glib!630
2019-02-01 09:41:50 +00:00
Matthias Clasen
fc6044a4b1 Define enum types for Unicode enums
We want to stop shipping PangoScript in pango, so
we need a replacement for the type that used to
be provided by pango.
2019-01-31 19:38:26 -05:00
Philip Withnall
5360fd0666 Merge branch '1224-tsan-fixes' into 'master'
Patches to improve GObject and GThread with TSAN

Closes #1224

See merge request GNOME/glib!383
2019-02-01 00:25:33 +00:00
Matthias Clasen
bca4ff7c5e Support the trash portal
When we are in a sandbox, try to trash files via a portal.
It works.
2019-01-31 19:00:19 -05:00
Krzesimir Nowak
9babfecba8 docs: Ignore more version macros
Looks like we tend to forget to update the list of ignored decorators
when adding new version macros.
2019-01-31 21:52:40 +01:00
Colin Walters
630fa82ed0 gthread: Rework to avoid holding a mutex half the time
This code was a persistent source of `-fsanitize=thread` errors
when I was trying to use it on OSTree.

The problem is that while I think this code is functionally correct,
we hold a mutex during the writes, but not the reads, and TSAN (IMO
correctly) flags that.

Reading this, I don't see a reason we need a mutex at all.  At the
cost of some small code duplication between posix/win32, we can just
pass the data we need down into each implementation.  This ends up
being notably cleaner I think than the awkward "lock/unlock to
serialize" dance.

(Minor review changes made by Philip Withnall <withnall@endlessm.com>.)

https://gitlab.gnome.org/GNOME/glib/issues/1224
2019-01-31 13:19:29 +00:00
Colin Walters
4631cd892d gobject: Change assertions to read values via atomics
I'm trying to use `-fsanitize=thread` for OSTree, and some of
these issues seem to go into GLib.  Also, the sanitizers work better if
the userspace libraries are built with them too.

This fix is similar to
b6814bb37c

Mixing atomic and non-atomic reads trips TSAN, so let's change the
assertions to operate on the local values returned from atomic
read/writes.

Without this change I couldn't even *build* GLib with TSAN, since we
use gresources during compilation, which uses GSubprocess, which hits
this code.

(Minor review fixes made by Philip Withnall <withnall@endlessm.com>.)

https://gitlab.gnome.org/GNOME/glib/issues/1224
2019-01-31 13:18:40 +00:00
Philip Withnall
097dc30ad9 Merge branch 'fixing_warnings' into 'master'
Fixing warnings

See merge request GNOME/glib!622
2019-01-31 13:15:23 +00:00
Emmanuel Fleury
5d78256796 Silencing cast-function-type warnings
A lot of code cast function pointer to incorrect types. There is no
other way but silencing the warning. Follows an example of such cast:

glib/glist.c: In function ‘g_list_free_full’:
glib/glist.c:223:25: error: cast between incompatible function types from ‘GDestroyNotify’ {aka ‘void (*)(void *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
   g_list_foreach (list, (GFunc) free_func, NULL);
                         ^
2019-01-31 10:24:39 +01:00
Emmanuel Fleury
4cd8fccc11 Fixing missing initializer in g_static_rec_mutex_init()
glib/deprecated/gthread-deprecated.c: In function ‘g_static_rec_mutex_init’:
glib/deprecated/gthread-deprecated.c:657:3: error: missing initializer for field ‘depth’ of ‘GStaticRecMutex’ {aka ‘const struct _GStaticRecMutex’} [-Werror=missing-field-initializers]
   static const GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT;
   ^~~~~~
In file included from glib/deprecated/gthread-deprecated.c:30:
glib/deprecated/gthread.h:161:9: note: ‘depth’ declared here
   guint depth;
         ^~~~~
2019-01-31 10:24:32 +01:00
Simon McVittie
52b8947bf6 Merge branch 'settings-test-cleanups-subset' into 'master'
Various memory leak cleanups to GSettings tests (subset)

See merge request GNOME/glib!629
2019-01-30 18:56:28 +00:00
Philip Withnall
6c14e9a14b tests: Fix a minor memory leak in the gsettings test
g_settings_backend_get_default() returns a strong reference.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-30 14:41:15 +00:00
Philip Withnall
caf5103d4b gsettingsbackend: Fix a minor memory leak
This never caused any problems because the default GSettingsBackend is
cached forever by GIOModule anyway.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-30 14:41:15 +00:00
Philip Withnall
5beed066d1 glib.supp: Add suppressions from gsettings test
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-30 14:41:15 +00:00
Philip Withnall
f829b65e51 gsettings: Clarify ownership transfer in a few places
I was trying to debug some memory leaks in the gsettings test.
Eventually, it seems that actually they’re caused by the
GMemorySettingsBackend being cached by GIOModule — so this commit makes
no functional changes. It should make the code and documentation a bit
clearer though.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-30 14:41:15 +00:00
Philip Withnall
9d89ed0c54 gkeyfilesettingsbackend: Add a code comment to clarify things
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-30 14:41:15 +00:00
Philip Withnall
799b6678be Merge branch 'wip/sadiq/fixes' into 'master'
gmarkup: Optimize g_markup_escape_text()

Closes #1376

See merge request GNOME/glib!328
2019-01-30 14:36:14 +00:00
Mohammed Sadiq
2934dfa2bd gmarkup: Optimize g_markup_escape_text() 2019-01-30 14:36:14 +00:00
Michael Catanzaro
930883609c Merge branch 'wip/tingping/gsocketclient-criticals' into 'master'
gsocketclient: Fix criticals

Closes #1649 and #1646

See merge request GNOME/glib!627
2019-01-29 20:59:18 +00:00
Patrick Griffis
d553d92d6e gsocketclient: Fix criticals
This ensures the parent GTask is kept alive as long as an enumeration
is running and trying to connect.

Closes #1646
Closes #1649
2019-01-29 14:46:52 -05:00
Philip Withnall
2a9ddc6303 Merge branch 'wip/ernestask/gcc-9-null-directive-argument' into 'master'
gdbus: Avoid printing null strings

See merge request GNOME/glib!626
2019-01-29 11:25:37 +00:00