platform/upstream/glib.git
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

9 years agodoc: improve doc of g_subprocess_wait()
Sébastien Wilmet [Thu, 3 Jul 2014 13:45:11 +0000 (15:45 +0200)]
doc: improve doc of g_subprocess_wait()

When using this API, I wasn't sure what the cancellable does. I think
it's generally desirable to kill the subprocess if the wait operation is
cancelled, since in this case the application is no longer interested by
the subprocess.

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

9 years agoFix old wiki links
Michael Catanzaro [Wed, 2 Jul 2014 04:52:19 +0000 (23:52 -0500)]
Fix old wiki links

9 years agoUpdated Galician translations
Fran Diéguez [Tue, 1 Jul 2014 16:01:59 +0000 (18:01 +0200)]
Updated Galician translations

9 years agoMSVC 2012/2013 Support: Update Property Sheet Creation
Chun-wei Fan [Tue, 1 Jul 2014 08:08:21 +0000 (16:08 +0800)]
MSVC 2012/2013 Support: Update Property Sheet Creation

Be a bit more careful when copying and updating the property sheets, so that
we don't accidently change fields with '10' in them that are actually not
indicating the Visual Studio version.

9 years agoglib: Fix make dist
Rico Tzschichholz [Mon, 30 Jun 2014 12:46:32 +0000 (14:46 +0200)]
glib: Fix make dist

9 years agovalgrind.h: Disable Valgrind features on x64 Visual C++ Builds
Chun-wei Fan [Mon, 30 Jun 2014 09:31:57 +0000 (17:31 +0800)]
valgrind.h: Disable Valgrind features on x64 Visual C++ Builds

...so that builds of GLib on x64 Visual C++ can be restored, as the build
fails in line 449 of valgrind.h as it only supports MinGW/GCC for x64
Windows and simply will not build otherwise.  Make the x64 Visual C++
builds compile again by defining NVALGRIND when GLib is being built for
Windows on x64 Visual C++.

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

9 years agounicode: Update test data files for unicode 7.0.0
Christian Persch [Sun, 29 Jun 2014 18:17:57 +0000 (20:17 +0200)]
unicode: Update test data files for unicode 7.0.0

https://bugzilla.gnome.org/show_bug.cgi?id=731929#c2

9 years agodoc: improve doc of g_file_equal()
Sébastien Wilmet [Fri, 27 Jun 2014 18:43:39 +0000 (20:43 +0200)]
doc: improve doc of g_file_equal()

A critical message is printed when a parameter of g_file_equal() is not
a GFile. When we read the documentation before this commit, we can think
that passing NULL or another type than GFile is allowed, but it is not
the case.

Another option is to allow NULL parameters. But for consistency with
e.g. g_str_equal(), it's probably better to keep the code as is.

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

9 years agodoc: various improvements
Sébastien Wilmet [Sun, 11 May 2014 16:51:29 +0000 (18:51 +0200)]
doc: various improvements

- g_subprocess_launcher_spawn() and spawnv(): there is no other way
  AFAIK to create a GSubprocess from a launcher. So these
  functions are not "convenience helper".

- annotate optional arguments for g_shell_parse_argv().

- other trivial fix

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

9 years agoGActionEntry: one more docs fix
Ryan Lortie [Sun, 29 Jun 2014 15:34:16 +0000 (11:34 -0400)]
GActionEntry: one more docs fix

Hyperlink "GVariant text format".

9 years agoGActionEntry: improve documentation
Ryan Lortie [Sun, 29 Jun 2014 15:13:25 +0000 (11:13 -0400)]
GActionEntry: improve documentation

Document that giving %NULL for the activate handler is supported since
GLib 2.40.  We documented this on GSimpleAction itself (where the
default handler functionality is implemented) but expecting the user to
dig that up is asking a bit much.

Also, add some more explicit documentation about the conditions under
which each field is expected to be filled in.

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

9 years agoChange gio/data-to-c.pl to /usr/bin/env perl.
Koop Mast [Sun, 23 Feb 2014 00:09:45 +0000 (01:09 +0100)]
Change gio/data-to-c.pl to /usr/bin/env perl.

On FreeBSD perl gets installed in /usr/local, And a compat symlink in
/usr/bin. However this symlink might go away in the future.

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

9 years agogcredentials: add NetBSD support
Patrick Welche [Tue, 15 Apr 2014 14:09:22 +0000 (15:09 +0100)]
gcredentials: add NetBSD support

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

9 years agoGNotification: add priority
Lars Uebernickel [Sun, 15 Jun 2014 13:42:31 +0000 (15:42 +0200)]
GNotification: add priority

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

9 years agogobject: move _g_type_debug_flags from gtype.h to gtype-private.h
Kang Hu [Sat, 10 May 2014 12:47:57 +0000 (20:47 +0800)]
gobject: move _g_type_debug_flags from gtype.h to gtype-private.h

_g_type_debug_flags is used internally to suport GOBJECT_DEBUG
environment variable. it should never be exposed to the outside.

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

9 years agoglib/tests/mainloop: Acquire the context while asserting its state
Mikhail Zabaluev [Sun, 22 Sep 2013 20:34:27 +0000 (23:34 +0300)]
glib/tests/mainloop: Acquire the context while asserting its state

The iteration methods presume that the context is acquired.

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

9 years agoA simple test for polling on a file-like descriptor
Mikhail Zabaluev [Tue, 17 Sep 2013 06:07:07 +0000 (09:07 +0300)]
A simple test for polling on a file-like descriptor

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

9 years agogiochannel: avoid setting uninitialised length
Ryan Lortie [Fri, 6 Jun 2014 16:16:55 +0000 (12:16 -0400)]
giochannel: avoid setting uninitialised length

Our internal call to g_io_channel_read_line_backend() may return
G_IO_STATUS_ERROR, in which case two things will be true:

 - the GError will have been set (if appropriate)

 - the &got_length return value may not have been set

Since it's our convention to leave 'out' parameters untouched in
exception cases, this is perfectly fine.  Unfortunately,
g_io_channel_read_line(), in wrapping this internal function, always
promotes the length parameter, even in the case of error.

Stop doing that in order to avoid overwriting the callers's variable
with junk in the error case.

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

9 years agoGDateTime: Add guards to g_date_time_new()
Bastien Nocera [Thu, 17 Apr 2014 07:18:14 +0000 (09:18 +0200)]
GDateTime: Add guards to g_date_time_new()

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

9 years agodocs: Fix formatting of g_alloca documentation.
Florian Pelz [Thu, 8 May 2014 17:44:30 +0000 (19:44 +0200)]
docs: Fix formatting of g_alloca documentation.

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

9 years agoConvert multiple #if/#endif to single #if/#elif/#endif
Daniel Macks [Tue, 10 Jun 2014 17:43:27 +0000 (13:43 -0400)]
Convert multiple #if/#endif to single #if/#elif/#endif

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

9 years agogmessages: make g_assert_warning compiler friendly
Patrick Welche [Sat, 4 Jan 2014 17:42:23 +0000 (17:42 +0000)]
gmessages: make g_assert_warning compiler friendly

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

9 years agoall: remove use of 'register' keyword
Ryan Lortie [Sun, 25 May 2014 10:18:14 +0000 (12:18 +0200)]
all: remove use of 'register' keyword

We should have done this a decade ago...

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

9 years agounicode: Update to unicode 7.0.0
Christian Persch [Sat, 3 May 2014 17:36:18 +0000 (19:36 +0200)]
unicode: Update to unicode 7.0.0

See bug https://bugzilla.gnome.org/show_bug.cgi?id=731929.

9 years agounicode: Switch compose_second_single to gunichar
Christian Persch [Thu, 19 Jun 2014 17:29:16 +0000 (19:29 +0200)]
unicode: Switch compose_second_single to gunichar

This will be required for the update to unicode 7.0.0.

9 years agounicode: Move gscripttable.h generation into main script
Christian Persch [Sat, 3 May 2014 16:49:07 +0000 (18:49 +0200)]
unicode: Move gscripttable.h generation into main script

So we just have to run one script when updating the unicode data, not two.

9 years agounicode: Simplify width table generation
Christian Persch [Sat, 3 May 2014 15:56:07 +0000 (17:56 +0200)]
unicode: Simplify width table generation

Move width table generation into the gen-unicode-tables.pl script. This makes
updating the tables automatic without the previously required manual editing
required to insert the tables in the right place of the source code.

9 years agoGObject: tweak property deprecation warnings
Ryan Lortie [Fri, 27 Jun 2014 17:21:03 +0000 (13:21 -0400)]
GObject: tweak property deprecation warnings

Don't emit property deprecation warnings for construct properties that
are being set to their default value during construction, but _do_ emit
them in all cases when the property was explicitly given to
g_object_new().

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

9 years agoGTimeZone: remove some dead code
Ryan Lortie [Wed, 25 Jun 2014 01:42:46 +0000 (21:42 -0400)]
GTimeZone: remove some dead code

Remove code that parsed out and stored the unused isstd and isgmt
fields.

9 years agogtype: Remove unused header
Emmanuele Bassi [Wed, 25 Jun 2014 10:56:12 +0000 (11:56 +0100)]
gtype: Remove unused header

GType does not use GBSearchArray any more.

9 years agoRevert "gsettings: remove long-deprecated "schema" property"
Ryan Lortie [Tue, 24 Jun 2014 20:56:20 +0000 (16:56 -0400)]
Revert "gsettings: remove long-deprecated "schema" property"

This reverts commit cf9b162e0d0defaff2ad5c85aeaf7af0899ad22f.

It turns out that there are still a very large number of users of this
API.

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

9 years agoGObject: warn on use of deprecated properties
Ryan Lortie [Tue, 24 Jun 2014 20:13:30 +0000 (16:13 -0400)]
GObject: warn on use of deprecated properties

By default G_PARAM_DEPRECATED means absolutely nothing.  We only emit a
warning if G_ENABLE_DIAGNOSTIC is set to '1' and then, only on sets.

Turn the logic on its head: emit the warning by default, unless
G_ENABLE_DIAGNOSTIC is set to 0.  In order to avoid a torrent of output, only
emit a warning once per property name.

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

9 years agogvalue: New g_value_init_from_instance
Edward Hervey [Thu, 19 Jun 2014 09:28:48 +0000 (11:28 +0200)]
gvalue: New g_value_init_from_instance

Used for the commonly used case (in signal emission) where we
initialize and set a GValue for an instance

Includes a fast-path for GObject

Overall makes it 6 times faster than the previous combination
of g_value_init + g_value_set_instance

Makes signal emission around 10% faster

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

9 years agogvariant tests: workaround libc/compiler "issue"
Ryan Lortie [Tue, 24 Jun 2014 14:40:30 +0000 (10:40 -0400)]
gvariant tests: workaround libc/compiler "issue"

memcmp() is declared by glibc as follows:

  /* Compare N bytes of S1 and S2.  */
  extern int memcmp (const void *__s1, const void *__s2, size_t __n)
       __THROW __attribute_pure__ __nonnull ((1, 2));

despite the fact that it is valid to call it with a null pointer if the
size is zero.

gcc 4.9.0 contains a new optimisation that sees that we pass a pointer
to this function and concludes that it certainly must not be null,
removing a later check and thereby causing a crash.

We protect the invocation of memcmp() with a condition to prevent gcc
from making this false assumption (arguably under wrong advice from
glibc).

9 years agogsettings: remove long-deprecated "schema" property
Ryan Lortie [Mon, 23 Jun 2014 12:53:26 +0000 (08:53 -0400)]
gsettings: remove long-deprecated "schema" property

This property has been deprecated for three years after only having
existed for one.  We've wanted to reuse the name for all that time, so
let's try to actually remove it now and see if we can get away with it.

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

9 years agogsettings test: stop testing long-deprecated API
Ryan Lortie [Mon, 23 Jun 2014 12:53:06 +0000 (08:53 -0400)]
gsettings test: stop testing long-deprecated API

We want to try taking this away now...

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

9 years agodocs: fix typos
Michael Catanzaro [Tue, 24 Jun 2014 15:49:00 +0000 (10:49 -0500)]
docs: fix typos

9 years agoBump version
Matthias Clasen [Tue, 24 Jun 2014 03:14:56 +0000 (23:14 -0400)]
Bump version

9 years ago2.41.1 2.41.1
Matthias Clasen [Tue, 24 Jun 2014 01:58:07 +0000 (21:58 -0400)]
2.41.1

9 years agogsocketlistener: Don’t explicitly close sockets on finalisation
Philip Withnall [Mon, 23 Jun 2014 14:01:28 +0000 (15:01 +0100)]
gsocketlistener: Don’t explicitly close sockets on finalisation

Instead of closing the sockets explicitly, let them close themselves
when their final reference is dropped. This makes use of
g_socket_listener_add_socket() more natural.

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

9 years agogsocket: Document that g_socket_create_source() holds a socket ref
Philip Withnall [Mon, 23 Jun 2014 09:12:08 +0000 (10:12 +0100)]
gsocket: Document that g_socket_create_source() holds a socket ref

This is quite important, as it means you can safely let the GSocket drop
out of scope while maintaining a reference to the GSource, and the
socket will remain open. That means fewer closure structures, simpler
code, and fewer allocations.

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

9 years agogsignal: Add an example to the g_signal_connect_swapped() documentation
Philip Withnall [Sun, 22 Jun 2014 23:59:39 +0000 (00:59 +0100)]
gsignal: Add an example to the g_signal_connect_swapped() documentation

The precise behaviour of and motivation behind swapping parameters was
not entirely clear before.

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

9 years agoReturn folder as icon for directories
Matthias Clasen [Sat, 21 Jun 2014 00:54:47 +0000 (20:54 -0400)]
Return folder as icon for directories

'folder' is the name of the folder icon in the incon naming spec,
and the Adwaita icon theme doesn't include an inode-directory icon.
This fixes folders appearing as generic file in the file chooser.

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

9 years agogtestdbus: Don’t close stdout for dbus-daemon
Philip Withnall [Sat, 21 Jun 2014 22:01:08 +0000 (23:01 +0100)]
gtestdbus: Don’t close stdout for dbus-daemon

The stdout FD passed to dbus-daemon is propagated to all its child
processes, such as service activated processes. If we close the FD after
reading the bus address from the daemon, any child process which
subsequently writes to stdout (e.g. for logging) will get a SIGPIPE and
explode.

Instead of closing the stdout FD immediately after dbus-daemon has
spawned, keep it open until the daemon is killed.

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

9 years agogclosure: Remove an unused alloca() and assignment
Philip Withnall [Sat, 21 Jun 2014 11:29:09 +0000 (12:29 +0100)]
gclosure: Remove an unused alloca() and assignment

Coverity issue: #1159511

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

9 years agogoption: Remove an unused assignment
Philip Withnall [Sat, 21 Jun 2014 11:28:54 +0000 (12:28 +0100)]
goption: Remove an unused assignment

Coverity issue: #1159514

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

9 years agogwakeup: Clarify buffer sizing in g_wakeup_signal()
Philip Withnall [Sat, 21 Jun 2014 09:48:08 +0000 (10:48 +0100)]
gwakeup: Clarify buffer sizing in g_wakeup_signal()

The code in g_wakeup_signal() is currently correct: it writes a 64-bit
counter increment value if the FD is an eventfd, and writes an arbitrary
8-bit value if using a normal pipe.

However, the reasoning behind these buffer sizes is not clear, and the
mismatch between the allocated buffer size and the length passed to
write() in the pipe case could be mistaken for a bug.

Coverity issue: #1159490

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

9 years agodocs: Correct param to interface's default_init()
Zeeshan Ali (Khattak) [Fri, 20 Jun 2014 17:25:03 +0000 (18:25 +0100)]
docs: Correct param to interface's default_init()

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

9 years agodocs: fix a broken sentence
Michael Catanzaro [Fri, 20 Jun 2014 21:44:08 +0000 (16:44 -0500)]
docs: fix a broken sentence

9 years agoconfigure.ac: fix check for futex and eventfd
Ryan Lortie [Fri, 20 Jun 2014 18:43:26 +0000 (14:43 -0400)]
configure.ac: fix check for futex and eventfd

We were using AC_LANG_PROGRAM to build a program to test for our ability
to call syscall (__NR_futex, ...);.  This macro adds "main () { ... }"
around the provided code segment automatically.  The provided code
segment provided its own main() function, however.

The result looked something like:

int main (void) {
  int main (void) {
    ...
  }
}

which worked on GCC, but not on clang.

Let's fix that.  Let's fix the same mistake copied over for eventfd()
detection while we're at it.