platform/upstream/glib.git
9 years agoGDesktopAppInfo: fix default app logic
Ryan Lortie [Thu, 4 Sep 2014 17:17:27 +0000 (13:17 -0400)]
GDesktopAppInfo: fix default app logic

We use "tweaks" structures to track how a particular directory impacts
the list of added, removed and default applications.  We maintain this
set of tweaks for each directory, in a hash table, keyed by unaliased
mime type name, in order to facilitate fast lookups.

A typo in the logic for creating and maintaining the uniqueness of these
structures was causing the default app to be selected incorrectly from
time to time.  Fix that.

9 years agoGCredentials: credentials messages are not correctly supported on NetBSD
Patrick Welche [Mon, 1 Sep 2014 16:42:43 +0000 (18:42 +0200)]
GCredentials: credentials messages are not correctly supported on NetBSD

https://bugzilla.gnome.org/show_bug.cgi?id=735819

9 years agoUpdated Indonesian translation
Andika Triwidada [Wed, 3 Sep 2014 13:49:48 +0000 (13:49 +0000)]
Updated Indonesian translation

9 years agoUpdated Polish translation
Piotr Drąg [Wed, 3 Sep 2014 01:10:27 +0000 (03:10 +0200)]
Updated Polish translation

9 years ago2.41.4 2.41.4
Matthias Clasen [Tue, 2 Sep 2014 15:36:32 +0000 (11:36 -0400)]
2.41.4

9 years agoUpdated Korean translation
Changwoo Ryu [Tue, 2 Sep 2014 04:05:58 +0000 (13:05 +0900)]
Updated Korean translation

9 years agoUpdated French translation
Claude Paroz [Mon, 1 Sep 2014 07:30:32 +0000 (09:30 +0200)]
Updated French translation

9 years agoUpdated German translation
Christian Kirbach [Sun, 31 Aug 2014 22:00:45 +0000 (22:00 +0000)]
Updated German translation

9 years agoDon't mark GThread struct as deprecated
Matthias Clasen [Fri, 29 Aug 2014 19:12:31 +0000 (15:12 -0400)]
Don't mark GThread struct as deprecated

Having a definition of struct _GThread inside a deprecation
ifdef confuses gtk-doc into marking it as deprecated. Avoid this.

https://bugzilla.gnome.org//show_bug.cgi?id=735297

9 years agoUpdated Greek translation
Maria Mavridou [Thu, 28 Aug 2014 21:25:31 +0000 (21:25 +0000)]
Updated Greek translation

9 years agoUpdated Hebrew translation
Yosef Or Boczko [Thu, 28 Aug 2014 15:11:06 +0000 (18:11 +0300)]
Updated Hebrew translation

9 years agoUpdated Oriya translation
Manoj Kumar Giri [Wed, 27 Aug 2014 13:34:53 +0000 (13:34 +0000)]
Updated Oriya translation

9 years agoGUnixMounts: Improve efficiency in polling case
Patrick Welche [Tue, 26 Aug 2014 16:27:23 +0000 (17:27 +0100)]
GUnixMounts: Improve efficiency in polling case

https://bugzilla.gnome.org/show_bug.cgi?id=583330

9 years agogmacros.h: add G_GNUC_*_IGNORE_DEPRECATIONS macros for clang
Thomas Haller [Fri, 1 Aug 2014 14:59:36 +0000 (16:59 +0200)]
gmacros.h: add G_GNUC_*_IGNORE_DEPRECATIONS macros for clang

https://bugzilla.gnome.org/show_bug.cgi?id=734126

Signed-off-by: Thomas Haller <thaller@redhat.com>
9 years agogsocketclient: Handle cancellation between CONNECTING and CONNECTED
Philip Withnall [Thu, 21 Aug 2014 18:00:13 +0000 (19:00 +0100)]
gsocketclient: Handle cancellation between CONNECTING and CONNECTED

If a g_socket_client_connect_async() operation is cancelled between the
CONNECTING and CONNECTED events (i.e. while in the
g_socket_connection_connect_async() call), the code in
g_socket_client_connected_callback() would previously unconditionally
loop round and try the next socket address from the address enumerator
(by calling enumerator_next_async()). This would correctly handle the
cancellation and return from the overall task — but not before emitting
a spurious RESOLVING event.

Avoid emitting the spurious RESOLVING event by explicitly handling
cancellation at the beginning of g_socket_client_connected_callback().

https://bugzilla.gnome.org/show_bug.cgi?id=735179

9 years agoUpdated Czech translation
Marek Černocký [Fri, 22 Aug 2014 06:08:51 +0000 (08:08 +0200)]
Updated Czech translation

9 years agoUpdated Traditional Chinese translation(Hong Kong and Taiwan)
Chao-Hsiung Liao [Thu, 21 Aug 2014 09:06:03 +0000 (17:06 +0800)]
Updated Traditional Chinese translation(Hong Kong and Taiwan)

9 years agoGApplication: Add g_application_add_main_option
Jonas Danielsson [Wed, 13 Aug 2014 11:06:36 +0000 (07:06 -0400)]
GApplication: Add g_application_add_main_option

This function adds a single main option entry to be handeled by
GApplication. The option entry has it arg_data field set to NULL
and will be added to the applications packed_options.

The rationale for this is that bindings will be able to add
command line options even when they can't use the un-boxed struct
GOptionEntry.

https://bugzilla.gnome.org/show_bug.cgi?id=727455

9 years agoGUnixMounts: Fall back to polling on systems without mtab
Patrick Welche [Mon, 18 Aug 2014 20:48:28 +0000 (21:48 +0100)]
GUnixMounts: Fall back to polling on systems without mtab

This is necessary for many of the BSD family at least.

https://bugzilla.gnome.org/show_bug.cgi?id=583330

9 years agoUpdated Assamese translation
ngoswami [Mon, 18 Aug 2014 15:44:42 +0000 (15:44 +0000)]
Updated Assamese translation

9 years agodocs: Fix broken gtk-doc formatting
Rico Tzschichholz [Mon, 18 Aug 2014 12:08:41 +0000 (14:08 +0200)]
docs: Fix broken gtk-doc formatting

9 years agodocs: Add index for 2.42 api
Rico Tzschichholz [Sun, 17 Aug 2014 20:54:22 +0000 (22:54 +0200)]
docs: Add index for 2.42 api

9 years ago[l10n] Updated Catalan (Valencian) translation
Carles Ferrando [Sun, 17 Aug 2014 11:19:46 +0000 (13:19 +0200)]
[l10n] Updated Catalan (Valencian) translation

9 years ago[l10n] Updated Catalan translation
Gil Forcada [Sun, 17 Aug 2014 11:19:42 +0000 (13:19 +0200)]
[l10n] Updated Catalan translation

9 years agoUpdates for 2.41.3 2.41.3
Matthias Clasen [Sat, 16 Aug 2014 12:59:40 +0000 (08:59 -0400)]
Updates for 2.41.3

9 years agoUpdated German translation
Christian Kirbach [Fri, 15 Aug 2014 15:56:35 +0000 (17:56 +0200)]
Updated German translation

9 years agoVisual C++ Builds: Update README.txt's
Chun-wei Fan [Wed, 13 Aug 2014 01:55:11 +0000 (09:55 +0800)]
Visual C++ Builds: Update README.txt's

Update notes about usage of PCRE and for people attempting to build GLib
on a Chinese, Japanese or Korean locale.

9 years agodocs: hyphenate "High-level" and "Low-level"
Dan Winship [Tue, 12 Aug 2014 11:50:20 +0000 (07:50 -0400)]
docs: hyphenate "High-level" and "Low-level"

9 years agoMSVC Builds: Generate glib-mkenums If Possible
Chun-wei Fan [Fri, 8 Aug 2014 09:39:22 +0000 (17:39 +0800)]
MSVC Builds: Generate glib-mkenums If Possible

As glib-mkenums would likely be used in the building of the other
components of the stack, such as Cogl, Clutter and
gsettings-desktop-schemas, generate that using a Python script (if Python
can be found) and "install" it.

9 years agogtype: Fast-path for g_type_is_a
Edward Hervey [Mon, 23 Jun 2014 09:39:04 +0000 (11:39 +0200)]
gtype: Fast-path for g_type_is_a

Do I really need to explain why ?

https://bugzilla.gnome.org/show_bug.cgi?id=732085

9 years agoDo not crash when checking whether an instance type is of a given fundamental.
Andre Moreira Magalhaes (andrunko) [Wed, 30 Jul 2014 00:04:48 +0000 (21:04 -0300)]
Do not crash when checking whether an instance type is of a given fundamental.

Not all instances have a TypeNode associated (e.g. GstEvent), so lets check if node is available
before trying to use it.

This crash can be easily reproduced by creating an event with gst_event_new_eos and using
G_IS_OBJECT on the event instance.

https://bugzilla.gnome.org/show_bug.cgi?id=733982

9 years agoUpdated Slovenian translation
Matej Urbančič [Wed, 6 Aug 2014 12:15:40 +0000 (14:15 +0200)]
Updated Slovenian translation

9 years agoMake sure compiled resources only have / as dirsep
Руслан Ижбулатов [Mon, 21 Apr 2014 15:00:18 +0000 (15:00 +0000)]
Make sure compiled resources only have / as dirsep

https://bugzilla.gnome.org/show_bug.cgi?id=725511

9 years agoUpdated Slovenian translation
Martin Srebotnjak [Tue, 5 Aug 2014 19:03:32 +0000 (21:03 +0200)]
Updated Slovenian translation

9 years agoUpdated Basque language
Inaki Larranaga Murgoitio [Tue, 5 Aug 2014 12:02:42 +0000 (14:02 +0200)]
Updated Basque language

9 years agoChange W32 console detection to look at the window, not stdout
Руслан Ижбулатов [Wed, 30 Jul 2014 07:15:39 +0000 (07:15 +0000)]
Change W32 console detection to look at the window, not stdout

Check for console window being attached to the process, not for stdout
being redirected into a console window.

https://bugzilla.gnome.org/show_bug.cgi?id=733960

9 years agoFix tests to compile again - add missing headers to W32, call correct process-id...
Руслан Ижбулатов [Mon, 21 Apr 2014 15:44:47 +0000 (15:44 +0000)]
Fix tests to compile again - add missing headers to W32, call  correct process-id-getting function

https://bugzilla.gnome.org/show_bug.cgi?id=725513

9 years agoSilence a controversial warning in win_iconv
Руслан Ижбулатов [Sat, 2 Aug 2014 12:36:37 +0000 (12:36 +0000)]
Silence a controversial warning in win_iconv

https://bugzilla.gnome.org/show_bug.cgi?id=711547

9 years agoSilence some uncontroversial warnings
Руслан Ижбулатов [Sat, 2 Aug 2014 12:35:43 +0000 (12:35 +0000)]
Silence some uncontroversial warnings

https://bugzilla.gnome.org/show_bug.cgi?id=711547

9 years agoFix printf-tests on W32 by ifdefing the expected output
Руслан Ижбулатов [Sat, 2 Aug 2014 12:22:16 +0000 (12:22 +0000)]
Fix printf-tests on W32 by ifdefing the expected output

https://bugzilla.gnome.org/show_bug.cgi?id=725515

9 years agoSave errno and pass it along to make sure gettext does not change it
Руслан Ижбулатов [Mon, 21 Apr 2014 15:55:59 +0000 (15:55 +0000)]
Save errno and pass it along to make sure gettext does not change it

https://bugzilla.gnome.org/show_bug.cgi?id=725514

9 years agowin32: improve the package installation dir lookup
Ignacio Casal Quinteiro [Tue, 29 Jul 2014 16:59:21 +0000 (18:59 +0200)]
win32: improve the package installation dir lookup

As an example, the core of gedit is in a private library
placed in %INSTALLDIR%/lib/gedit/libgedit.dll

Before this patch we would get %INSTALLDIR%/lib/gedit as the
installation package dir, while what we actually want is to get
%INSTALLDIR%

https://bugzilla.gnome.org/show_bug.cgi?id=733934

9 years agoEnsure critial sections are released before returning
Руслан Ижбулатов [Thu, 31 Jul 2014 10:12:59 +0000 (10:12 +0000)]
Ensure critial sections are released before returning

https://bugzilla.gnome.org/show_bug.cgi?id=734035

9 years agodoap category core
Olav Vitters [Wed, 30 Jul 2014 13:41:13 +0000 (15:41 +0200)]
doap category core

9 years agoRemove atomics from g_clear_object/g_clear_pointer
Alexander Larsson [Wed, 30 Jul 2014 10:32:21 +0000 (12:32 +0200)]
Remove atomics from g_clear_object/g_clear_pointer

Practically no caller of these functions require atomic behaviour,
but the atomics are much slower than normal operations, which makes
it desirable to get rid of them. We have not done this before because
that would be a break of the ABI.

However, I recently looked into this and it seems that even if the
atomics *are* used for g_clear_* it is not ever safe to use this.  The
atomics protects two threads that are racing to free a global/shared
object from freeing the object twice. However, any *user* of the global
object have no protection from the object being freed while in use,
because there is no paired operation the reads and refs the object
as an atomic unit (nor can such an operation be implemented using
purely atomic ops).

So, since nothing could safely have used the atomic aspects of these
functions I consider it acceptable to just remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=733969

9 years agotests/gobject/performance: Clean up and add refcount performance test
Alexander Larsson [Wed, 30 Jul 2014 10:09:01 +0000 (12:09 +0200)]
tests/gobject/performance: Clean up and add refcount performance test

9 years agogfile: Fix memory leak in g_file_move()
David King [Wed, 7 May 2014 09:25:40 +0000 (10:25 +0100)]
gfile: Fix memory leak in g_file_move()

https://bugzilla.gnome.org/show_bug.cgi?id=729703

9 years agoconfigure.ac: fix typo in last patch
Ryan Lortie [Sun, 27 Jul 2014 08:08:00 +0000 (10:08 +0200)]
configure.ac: fix typo in last patch

20e709d8b92e28d162c78b147afe4040e3a48b85 fixed some issues in
configure.ac but also introduced a typo.  Fix that.

9 years agoUpdated Lithuanian translation
Aurimas Černius [Sat, 26 Jul 2014 22:03:32 +0000 (01:03 +0300)]
Updated Lithuanian translation

9 years agoconfigure: Remove unintentional nested functions
Alessandro Di Federico [Fri, 25 Jul 2014 08:16:00 +0000 (04:16 -0400)]
configure: Remove unintentional nested functions

More of the same as 9362a1b2d987125a8aa0723b916d29aaaece329a.

https://bugzilla.gnome.org/show_bug.cgi?id=733715

9 years agogdbus: Properly fix encoding of double arrays
Ryan Lortie [Thu, 24 Jul 2014 09:36:57 +0000 (11:36 +0200)]
gdbus: Properly fix encoding of double arrays

It turns out that this bug actually would (sometimes) impact any sort of
fixed-sized array with an alignment requirement of 8 due to incorrectly
counting the alignment inserted between the (aligned 4) array length and
the actual data.

Fix this properly and remove the exception for doubles.

https://bugzilla.gnome.org/show_bug.cgi?id=732754

9 years agogtlsinteraction: Hoist precondition before allocation
Colin Walters [Tue, 22 Jul 2014 18:04:44 +0000 (14:04 -0400)]
gtlsinteraction: Hoist precondition before allocation

We're using a precondition in the middle of the function, and if we
hit it, we leak the closure.

Let's allocate the closure per path; this allows us to allocate it
before path-specific preconditions, and better avoids a pointless
malloc/free pair in the unhandled case.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogio: Fix regression encoding an array of doubles
Stef Walter [Tue, 22 Jul 2014 19:29:27 +0000 (21:29 +0200)]
gio: Fix regression encoding an array of doubles

Take the simple slow path in this case. Encoding a double
takes special precautions as you can see in append_value_to_blob()
and friends.

https://bugzilla.gnome.org/show_bug.cgi?id=732754

9 years agogio: Add regression test for double array encoding
Stef Walter [Tue, 22 Jul 2014 19:13:50 +0000 (21:13 +0200)]
gio: Add regression test for double array encoding

https://bugzilla.gnome.org/show_bug.cgi?id=732754

9 years agoRevert "gatomic: statically assert that our assumptions hold"
Owen W. Taylor [Wed, 23 Jul 2014 13:27:31 +0000 (09:27 -0400)]
Revert "gatomic: statically assert that our assumptions hold"

This reverts commit 7269d75321b9d2a967a59fb35f243397f577eb41.

Adding G_STATIC_ASSERT() into a header file caused compilation
problems with at least one app (Anjuta). Reverting to keep
GNOME continuous testing running.

https://bugzilla.gnome.org/show_bug.cgi?id=730932

9 years agoUpdated Norwegian bokmål translation.
Kjartan Maraas [Wed, 23 Jul 2014 12:57:15 +0000 (14:57 +0200)]
Updated Norwegian bokmål translation.

9 years agogcredentials: Add assertion to pacify static analysis
Colin Walters [Tue, 22 Jul 2014 18:31:25 +0000 (14:31 -0400)]
gcredentials: Add assertion to pacify static analysis

This should always be true.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogkeyfilesettingsbackend: Add assertion for known-true condition
Colin Walters [Tue, 22 Jul 2014 18:23:47 +0000 (14:23 -0400)]
gkeyfilesettingsbackend: Add assertion for known-true condition

We know the group exists since we enumerated it.  Should silence a
static analysis warning.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agoglocalfileinfo: Suppress static analysis return value warning
Colin Walters [Tue, 22 Jul 2014 18:22:23 +0000 (14:22 -0400)]
glocalfileinfo: Suppress static analysis return value warning

Just ignore the return value, since we're checking contents != NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogsettingsschema: Suppress return value check
Colin Walters [Tue, 22 Jul 2014 18:21:31 +0000 (14:21 -0400)]
gsettingsschema: Suppress return value check

We're intentionally ignoring the value here.  Pacifies static
analysis.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogapplicationimpl-dbus: Fix leak of fd list object
Colin Walters [Tue, 22 Jul 2014 18:14:46 +0000 (14:14 -0400)]
gapplicationimpl-dbus: Fix leak of fd list object

Spotted by static analysis.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogsettingsschema: Close directory
Colin Walters [Tue, 22 Jul 2014 18:11:25 +0000 (14:11 -0400)]
gsettingsschema: Close directory

Spotted by static analysis.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogthreadedresolver: Unref unexpected address
Colin Walters [Tue, 22 Jul 2014 18:08:00 +0000 (14:08 -0400)]
gthreadedresolver: Unref unexpected address

I don't believe any real app would hit this, but we do leak
if it occurs.

Spotted by static analysis.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogfileutils: Add missing g_free() in error path
Colin Walters [Tue, 22 Jul 2014 18:00:23 +0000 (14:00 -0400)]
gfileutils: Add missing g_free() in error path

Discovered by static analysis.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agogfile: Initialize variable to pacify static analysis
Colin Walters [Tue, 22 Jul 2014 17:58:53 +0000 (13:58 -0400)]
gfile: Initialize variable to pacify static analysis

Not a real bug, but will quiet the analysis.

https://bugzilla.gnome.org/show_bug.cgi?id=733576

9 years agoglib-init: statically assert that we have 8-bit bytes
Simon McVittie [Sun, 20 Jul 2014 11:41:57 +0000 (12:41 +0100)]
glib-init: statically assert that we have 8-bit bytes

configure.ac assumes this.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932

9 years agogatomic: statically assert that our assumptions hold
Simon McVittie [Sun, 20 Jul 2014 11:39:24 +0000 (12:39 +0100)]
gatomic: statically assert that our assumptions hold

This code assumes that int is exactly 4 bytes, and that pointers
are either 4 or 8 bytes, on platforms with __ATOMIC_SEQ_CST.
In practice this is going to be true.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932

9 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 22 Jul 2014 10:29:34 +0000 (12:29 +0200)]
Updated Spanish translation

9 years agogio/tests/socket: add some missing g_assert_no_error()s
Dan Winship [Wed, 7 May 2014 13:17:05 +0000 (09:17 -0400)]
gio/tests/socket: add some missing g_assert_no_error()s

9 years agogsocket: Set SO_NOSIGPIPE on sockets on Darwin
Dan Winship [Thu, 1 May 2014 13:59:05 +0000 (09:59 -0400)]
gsocket: Set SO_NOSIGPIPE on sockets on Darwin

This is a best-effort approach to preventing SIGPIPE emissions on Darwin
and iOS, where they continue to be intercepted by the Xcode debugger
even if SIG_IGN prevents them crashing the program.

This is similar to the existing code which sets MSG_NOSIGNAL on all
send() calls. MSG_NOSIGNAL doesn't exist on Darwin though.

Based on a patch from Philip Withnall.

https://bugzilla.gnome.org/show_bug.cgi?id=728730

9 years agogsocket: move set_fd_nonblocking() into g_socket_constructed()
Dan Winship [Thu, 1 May 2014 13:58:07 +0000 (09:58 -0400)]
gsocket: move set_fd_nonblocking() into g_socket_constructed()

9 years agoUpdated Brazilian Portuguese translation
Enrico Nicoletto [Fri, 18 Jul 2014 18:49:04 +0000 (18:49 +0000)]
Updated Brazilian Portuguese translation

9 years agoginetaddress: Add a precondition to g_inet_address_new_from_string()
Philip Withnall [Fri, 18 Jul 2014 07:49:19 +0000 (08:49 +0100)]
ginetaddress: Add a precondition to g_inet_address_new_from_string()

Ensure that the input string is non-NULL, as inet_pton() does not like
NULL strings.

https://bugzilla.gnome.org/show_bug.cgi?id=733345

9 years agosocketservice: minor cleanup
Ignacio Casal Quinteiro [Thu, 17 Jul 2014 11:27:54 +0000 (13:27 +0200)]
socketservice: minor cleanup

9 years agoBump version
Matthias Clasen [Mon, 14 Jul 2014 14:48:09 +0000 (10:48 -0400)]
Bump version

9 years ago2.41.2 2.41.2
Matthias Clasen [Mon, 14 Jul 2014 13:11:46 +0000 (09:11 -0400)]
2.41.2

9 years agoRemove redundant checks before free
Marek Kasik [Mon, 14 Jul 2014 13:37:06 +0000 (15:37 +0200)]
Remove redundant checks before free

Remove checks for NULL before g_free().

https://bugzilla.gnome.org/show_bug.cgi?id=733156

9 years agogspawn-win32: do not rely on __argc and __argv global vars.
Ignacio Casal Quinteiro [Mon, 14 Jul 2014 06:54:45 +0000 (08:54 +0200)]
gspawn-win32: do not rely on __argc and __argv global vars.

Since we are getting passed Unicode values these global vars
might not have the correct value. Instead always get the wide arguments
and convert them to utf8 to use them.

https://bugzilla.gnome.org/show_bug.cgi?id=733146

9 years agoFix typos in gbytes_hash and g_time_zone_find_interval docs
Gergely POLONKAI [Sat, 12 Jul 2014 07:36:00 +0000 (07:36 +0000)]
Fix typos in gbytes_hash and g_time_zone_find_interval docs

https://bugzilla.gnome.org/show_bug.cgi?id=733084

9 years agogio: avoid g_object_ref(NULL) in g_dbus_object_manager_client_finalize
SyncEvolution Nightly Testing [Thu, 10 Jul 2014 09:52:26 +0000 (09:52 +0000)]
gio: avoid g_object_ref(NULL) in g_dbus_object_manager_client_finalize

When establishing a D-Bus connection failed, g_dbus_object_manager_client_finalize()
calls g_object_ref(manager->priv->connection) when that pointer is NULL,
which is considered and logged as error by glib.

https://bugzilla.gnome.org/show_bug.cgi?id=732984

9 years agoFix a failing testcase
Matthias Clasen [Mon, 14 Jul 2014 12:27:30 +0000 (08:27 -0400)]
Fix a failing testcase

This fix is a bit of a blind guess, I couldn't really discern
from recent commits whether this is an expected behavior change
or not.

9 years agodocs: Use "Returns:" instead "Return:"
Javier Jardón [Thu, 10 Jul 2014 16:09:07 +0000 (17:09 +0100)]
docs: Use "Returns:" instead "Return:"

9 years agoFix typo
Michael Catanzaro [Wed, 9 Jul 2014 15:48:47 +0000 (10:48 -0500)]
Fix typo

9 years agoGDBusMessage: add some G_UNLIKELY on error paths
Ryan Lortie [Wed, 9 Jul 2014 15:19:58 +0000 (11:19 -0400)]
GDBusMessage: add some G_UNLIKELY on error paths

More for documentation than anything else...

9 years agoGCond (linux): fix g_cond_wait_until() return value on timeout
Tim-Philipp Müller [Sat, 5 Jul 2014 14:03:22 +0000 (15:03 +0100)]
GCond (linux): fix g_cond_wait_until() return value on timeout

It should return FALSE on timeout (and only on timeout), and
TRUE otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=731986

9 years agoGMutex (linux): detect and report some errors
Ryan Lortie [Sun, 29 Jun 2014 21:47:10 +0000 (17:47 -0400)]
GMutex (linux): detect and report some errors

Detect the following two errors:

 - attempting to unlock a mutex that is not locked

 - attempting to clear a mutex that was not initialised or was
   initialised but is still locked

Both of these are fatal errors.  We avoid using g_error() here because
doing so would involve calls back into the GMutex code, and if things
are going off the rails then we want to avoid that.

https://bugzilla.gnome.org/show_bug.cgi?id=731986

9 years agoGLib: implement GMutex natively on Linux
Ryan Lortie [Tue, 10 Jun 2014 12:28:32 +0000 (08:28 -0400)]
GLib: implement GMutex natively on Linux

If we have futex(2) then we can implement GMutex natively and gain a
substantial performance increase (vs. using pthreads).

This also avoids the need to allocate an extra structure in memory when
using GMutex or GCond: we can use the structure directly.

The main reason for the increase in performance is that our
implementation can be made more simple: we don't need to support the
array of options on pthread_mutex_t (which includes the possibility, for
example, of being recursive).

The result is a ~30% improvement in uncontended cases and a much larger
increase (3 to 4 times) in contended cases for a simple testcase.

https://bugzilla.gnome.org/show_bug.cgi?id=731986

9 years agoFix up failure-to-see-expected-message logging
Dan Winship [Thu, 10 Apr 2014 15:37:23 +0000 (11:37 -0400)]
Fix up failure-to-see-expected-message logging

When GLib had been told to expect message X, but then actually saw
message Y, it would log the "did not see expected message" error with
message Y's log level and domain, which makes no sense. Change it to
log with domain "GLib" and G_LOG_LEVEL_CRITICAL instead.

Also, include the expected domain in the error message, so that if
that's the reason why the expectation didn't match, you can tell that
from the error message.

Update glib/tests/testing.c for these changes; for all other test
programs in GLib and elsewhere, this change should not break any
existing tests, it should only improve the output on failure.

https://bugzilla.gnome.org/show_bug.cgi?id=727974

9 years agoGDBusMessage: fast-path decoding of fixed arrays
Ryan Lortie [Fri, 4 Jul 2014 19:00:49 +0000 (15:00 -0400)]
GDBusMessage: fast-path decoding of fixed arrays

Instead of creating a separate GVariant for each of the 'y's in an 'ay',
use g_variant_new_fixed_array().

https://bugzilla.gnome.org/show_bug.cgi?id=732754

9 years agoGDBusMessage: fast-path encoding of fixed arrays
Ryan Lortie [Fri, 4 Jul 2014 22:42:14 +0000 (18:42 -0400)]
GDBusMessage: fast-path encoding of fixed arrays

Instead of handling each item separately, handle the array as a whole.

https://bugzilla.gnome.org/show_bug.cgi?id=732754

9 years agogtask: fix leak in example code
Dan Winship [Wed, 9 Jul 2014 14:36:57 +0000 (10:36 -0400)]
gtask: fix leak in example code

9 years agoAdded missing "Since:" annotations for g_input_stream_read_bytes() APIs.
Tristan Van Berkom [Tue, 8 Jul 2014 16:13:51 +0000 (13:13 -0300)]
Added missing "Since:" annotations for g_input_stream_read_bytes() APIs.

9 years agoGDBusMessage: simplify byteswapping
Ryan Lortie [Fri, 4 Jul 2014 18:59:17 +0000 (14:59 -0400)]
GDBusMessage: simplify byteswapping

Remove some duplication by simplifying our byteswap checks.

https://bugzilla.gnome.org/show_bug.cgi?id=732754

9 years agogapplication tests: test resource base path
Ryan Lortie [Fri, 4 Jul 2014 23:18:40 +0000 (19:18 -0400)]
gapplication tests: test resource base path

Run some cases to make sure resource base path is behaving as we expect
it to.

https://bugzilla.gnome.org/show_bug.cgi?id=722092

9 years agoGApplication: add a "resource base path"
Ryan Lortie [Fri, 4 Jul 2014 13:53:51 +0000 (09:53 -0400)]
GApplication: add a "resource base path"

We don't use this for anything inside of GApplication yet, but Gtk is
about to start using it to find various bits of the application (such as
its menus, icons, etc.).

By default, we form the base path from the application ID to end up with
the familiar /org/example/app style.

https://bugzilla.gnome.org/show_bug.cgi?id=722092

9 years agoginetsocketaddress: Explicitly initialise flags for getaddrinfo()
Philip Withnall [Fri, 4 Jul 2014 13:04:17 +0000 (14:04 +0100)]
ginetsocketaddress: Explicitly initialise flags for getaddrinfo()

This is not a functional change, as the hints field is static and hence
automatically initialised to zero — which happens to be what AF_UNSPEC
and the unspecified protocol are defined as. However, it’s best to be
explicit about this, in case AF_UNSPEC is _not_ defined as zero.

https://bugzilla.gnome.org/show_bug.cgi?id=732739

9 years agoFix typo
Michael Catanzaro [Sun, 6 Jul 2014 01:27:58 +0000 (20:27 -0500)]
Fix typo

9 years agoUpdated Lithuanian translation
Aurimas Černius [Sat, 5 Jul 2014 10:41:58 +0000 (13:41 +0300)]
Updated Lithuanian translation

9 years agodoc: small improvement and fixes
Sébastien Wilmet [Thu, 3 Jul 2014 17:53:51 +0000 (19:53 +0200)]
doc: small improvement and fixes

- Add an example to g_strsplit(), like it is done for g_strsplit_set().

- GTK-Doc generates a list if a "1." is at the beginning of a line.

https://bugzilla.gnome.org/show_bug.cgi?id=732704

9 years agodoc: improve doc of g_input_stream_read()
Sébastien Wilmet [Thu, 3 Jul 2014 16:02:31 +0000 (18:02 +0200)]
doc: improve doc of g_input_stream_read()

I recently needed to nul-terminate the returned buffer, and I wasn't
sure if g_input_stream_read() does that or not. I've checked
glocalfileinputstream.c, which calls read(2) which doesn't nul-terminate
the buffer. So I assume it's the same behavior for all GInputStream
subclasses.

https://bugzilla.gnome.org/show_bug.cgi?id=732704