platform/upstream/glib.git
13 years agoFix parameter documentation for many functions
Matthias Clasen [Sat, 4 Jun 2011 18:40:23 +0000 (14:40 -0400)]
Fix parameter documentation for many functions

Use the opt-out mechanism introduced in gtk-doc 1.16 to work
around problems with the _utf8 renaming games that the win32
port is playing in our headers.

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

13 years agoFix doc typos
Matthias Clasen [Sat, 4 Jun 2011 15:57:10 +0000 (11:57 -0400)]
Fix doc typos

Now with fewer broken links...

13 years agoconfigure.in: Use tar-ustar to avoid name length limitations
Matthias Clasen [Sat, 4 Jun 2011 15:46:10 +0000 (11:46 -0400)]
configure.in: Use tar-ustar to avoid name length limitations

Also use dist-bzip2.

13 years agoFix up gdbus invocation in example
David Zeuthen [Sat, 4 Jun 2011 16:43:00 +0000 (12:43 -0400)]
Fix up gdbus invocation in example

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agogdbus: Add a way to emit a signal
David Zeuthen [Sat, 4 Jun 2011 16:33:39 +0000 (12:33 -0400)]
gdbus: Add a way to emit a signal

See https://bugs.freedesktop.org/show_bug.cgi?id=37890#c6 where it was
discovered that dbus-send(1) actually doesn't work (either libdbus-1's
flush implementation or dbus-send(1)'s usage of it is broken) so it's
useful to have here.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoFix typos in "Migrating to GDBus" docs
David Zeuthen [Sat, 4 Jun 2011 15:52:08 +0000 (11:52 -0400)]
Fix typos in "Migrating to GDBus" docs

It's Skeleton now, not Stub.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoDistcheck fixes
Matthias Clasen [Sat, 4 Jun 2011 14:46:38 +0000 (10:46 -0400)]
Distcheck fixes

Fix VPATH builds.

13 years agoDistcheck fixes
Matthias Clasen [Sat, 4 Jun 2011 14:45:30 +0000 (10:45 -0400)]
Distcheck fixes

Accidentally committed debug leftover.

13 years agoUpdate NEWS
Matthias Clasen [Sat, 4 Jun 2011 12:13:48 +0000 (08:13 -0400)]
Update NEWS

13 years agoUpdated Hebrew translation.
Yaron Shahrabani [Sat, 4 Jun 2011 10:44:19 +0000 (13:44 +0300)]
Updated Hebrew translation.

13 years agoavoid quadratic behavior of GMainLoop when all fd's have the same priority
Paolo Bonzini [Tue, 25 Jan 2011 10:31:41 +0000 (11:31 +0100)]
avoid quadratic behavior of GMainLoop when all fd's have the same priority

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

13 years agoAdd a test for the previous fix
Matthias Clasen [Sat, 4 Jun 2011 03:38:46 +0000 (23:38 -0400)]
Add a test for the previous fix

13 years agoGRand: avoid overflow
Matthias Clasen [Sat, 4 Jun 2011 03:37:23 +0000 (23:37 -0400)]
GRand: avoid overflow

Otherwise, g_random_double_range (-G_MAXDOUBLE, G_MAXDOUBLE)
doesn't work as expected.

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

13 years agog_mkdir_with_parents: cope with dirs popping into existence
Matthias Clasen [Sat, 4 Jun 2011 02:45:51 +0000 (22:45 -0400)]
g_mkdir_with_parents: cope with dirs popping into existence

Don't bail out if a directory suddenly turns out to exist
after all. Proposed in bug 612729.

13 years agoMade g_utf8_to_ucs4_fast() even faster
Mikhail Zabaluev [Wed, 17 Mar 2010 00:34:51 +0000 (02:34 +0200)]
Made g_utf8_to_ucs4_fast() even faster

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

13 years agoAdded performance tests for UTF-8 decoding functions
Mikhail Zabaluev [Mon, 15 Mar 2010 01:37:11 +0000 (03:37 +0200)]
Added performance tests for UTF-8 decoding functions

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

13 years agoHave g_queue_remove() return a boolean
Matthew Barnes [Sat, 16 Oct 2010 11:40:44 +0000 (07:40 -0400)]
Have g_queue_remove() return a boolean

g_queue_remove() should return a boolean so callers can verify that an
element was found and removed, as in the following example:

    if (g_queue_remove (queue, referenced_object))
        g_object_unref (referenced_object);

Similarly, g_queue_remove_all() should return the number of elements
found and removed.

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

13 years agogthread: avoid locking in _get_mutex_impl
Wim Taymans [Wed, 16 Sep 2009 15:39:48 +0000 (17:39 +0200)]
gthread: avoid locking in _get_mutex_impl

When getting the mutex implementation of a static mutex, avoid taking the global
lock every time but only take the lock when there was no mutex and we need to
create one.

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

13 years agoUse g_atomic_pointer_or/and to set datalist flags
Alexander Larsson [Wed, 25 May 2011 09:56:51 +0000 (11:56 +0200)]
Use g_atomic_pointer_or/and to set datalist flags

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

13 years agoMake g_object_get_data use the new faster g_datalist_get_data
Alexander Larsson [Thu, 19 May 2011 19:55:16 +0000 (21:55 +0200)]
Make g_object_get_data use the new faster g_datalist_get_data

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

13 years agoMake g_datalist_get_data not look up the quark
Alexander Larsson [Thu, 19 May 2011 19:51:49 +0000 (21:51 +0200)]
Make g_datalist_get_data not look up the quark

Instead of converting the string to a quark and comparing quarks we
use the new lockless g_quark_to_string and just compare the quarks
in the datalist with the given string.

This means we avoid the global lock for string to quark. Additionally
most of the time the data list will be quite short, so the cost of
doing the sting comparisons is likely similar to that of the quark
hashtable lookup (which does at least one string comparison for a
successfull lookup).

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

13 years agoMake quark to string lockless
Alexander Larsson [Thu, 19 May 2011 19:30:38 +0000 (21:30 +0200)]
Make quark to string lockless

We do this by assigning to g_quarks atomically and leaking it when
replacing it atomically. Then its safe to consume the array
on the reader side (atomically).

Also, since we're leaking quarks on growing, bump the block size
so that we're not leaking as much. gtk3-demo allocates > 1500 quarks,
and gnome apps > 3000. I'm setting the block to 2048 which means no
leaks for small gtk3 apps and just one leak for gnome apps.

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

13 years agoMake g_datalist not use a global lock and perform better
Alexander Larsson [Thu, 19 May 2011 12:48:50 +0000 (14:48 +0200)]
Make g_datalist not use a global lock and perform better

This implementation uses a per-list bitlock for user data, and a
simple array rather than a linked list which uses less memory and less
allocations. It also gets better cache behaviour since related things
are stored close to each other.

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

13 years agoAdd pointer bitlocks to the docs
Matthias Clasen [Sat, 4 Jun 2011 00:54:32 +0000 (20:54 -0400)]
Add pointer bitlocks to the docs

13 years agoImplement pointer sized bitlocks
Ryan Lortie [Wed, 25 May 2011 09:08:20 +0000 (11:08 +0200)]
Implement pointer sized bitlocks

Based on a patch from Alexander Larsson.

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

13 years agobitlock: hand-code assembly version for x86
Ryan Lortie [Fri, 3 Jun 2011 18:29:41 +0000 (20:29 +0200)]
bitlock: hand-code assembly version for x86

The __sync_fetch_and_or() operation on x86 is a bit suboptimal when the
result isn't ignored.  Normally we could use the 'lock or' assembly
instruction to accomplish this, but this instruction discards the
previous value.

In order to work around this issue, GCC is forced to emit a
compare-and-exchange loop.

We can easily use the 'lock bts' instruction, though.  It can't be used
in the general case for __sync_fetch_and_or() but it works great for our
case (test and set a single bit).

I filed a bug against GCC[1] to get this exposed as a new intrinsic (or
have the optimiser detect the case) but until then we'll hand-code it on
x86 and amd64.

The uncontended case sees a 31% improvement on my test machine.

 [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49244

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

13 years agogvariant: fix introspection annotations
Giovanni Campagna [Wed, 1 Jun 2011 14:45:43 +0000 (16:45 +0200)]
gvariant: fix introspection annotations

g_variant_get_strv and g_variant_get_bytestring return arrays that
are null terminated and have an explicit length. Since gjs doesn't
support (out) arrays with length, mark them also null-terminated
(but leave the length annotation, so pygobject can remove the argument)

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

13 years agoFix include path for gdbus-codegen example XML
David Zeuthen [Fri, 3 Jun 2011 18:45:29 +0000 (14:45 -0400)]
Fix include path for gdbus-codegen example XML

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoFix docs for D-Bus introspection data structures
David Zeuthen [Fri, 3 Jun 2011 18:39:04 +0000 (14:39 -0400)]
Fix docs for D-Bus introspection data structures

Mark structs as boxed types and use /*< public >*/ so the struct
members are properly shown.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoMove gdbus-codegen example code and docs into separate directories
David Zeuthen [Fri, 3 Jun 2011 17:22:31 +0000 (13:22 -0400)]
Move gdbus-codegen example code and docs into separate directories

This avoids the generated types (e.g. ExampleAnimal, ExampleCat,
ExampleObject and ExampleObjectManagerClient) being referenced in the
core gio docs. This was requested by Matthias.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agogobject: Use _ prefixing in private headers over G_GNUC_INTERNAL in public headers
Colin Walters [Thu, 2 Jun 2011 21:14:58 +0000 (17:14 -0400)]
gobject: Use _ prefixing in private headers over G_GNUC_INTERNAL in public headers

This helps out gtk-doc and g-ir-scanner, and also makes much clearer
what's private versus public.

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

13 years agospawn-multithreaded: New test case
Colin Walters [Thu, 2 Jun 2011 15:53:25 +0000 (11:53 -0400)]
spawn-multithreaded: New test case

We didn't have any coverage of threads spawning processes, which we
should definitely support.

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

13 years agogmain: Consolidate UNIX signal init state handling
Colin Walters [Thu, 2 Jun 2011 13:10:36 +0000 (09:10 -0400)]
gmain: Consolidate UNIX signal init state handling

For a future signalfd() patch, it will be easier to handle if
we don't separate initialization from watching for a particular
signal.

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

13 years agogmain: Clean up SIGCHLD handling
Colin Walters [Thu, 2 Jun 2011 12:56:25 +0000 (08:56 -0400)]
gmain: Clean up SIGCHLD handling

Unify it more with the rest of the signal handling code.  There's
no reason not to specify SA_RESTART and SA_NOCLDSTOP for flags
always, so just do it.

Remove unnecessary initialization, and push the internal API
towards just ensure_unix_signal_handler_installed_unlocked().

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

13 years agogkeyfile: Only test file descriptors against -1
Hanro [Thu, 2 Jun 2011 19:44:19 +0000 (15:44 -0400)]
gkeyfile: Only test file descriptors against -1

Windows CE at least will return other (valid) negative values.

13 years agogdbus: Avoid blocking on worker thread in connection initialization
Colin Walters [Wed, 1 Jun 2011 19:11:02 +0000 (15:11 -0400)]
gdbus: Avoid blocking on worker thread in connection initialization

I can't see a reason to spin until the worker thread runs, so don't.
This avoids ugly sched_yield() calls that show up in strace and
annoy me; the code is cleaner now too.

We now grab the types needed for the WebKit workaround in the
thread creation area, but only release them when the thread itself
exits.

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

13 years agoExpand content type docs slighly
Matthias Clasen [Tue, 31 May 2011 23:23:14 +0000 (19:23 -0400)]
Expand content type docs slighly

13 years agoAdd a note about atomic changes
Matthias Clasen [Tue, 31 May 2011 18:53:30 +0000 (14:53 -0400)]
Add a note about atomic changes

13 years agoAdd a boxed type for GVariantBuilder, mark GVariantIter as (skip)
Colin Walters [Tue, 31 May 2011 17:36:16 +0000 (13:36 -0400)]
Add a boxed type for GVariantBuilder, mark GVariantIter as (skip)

Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org>

From discussion, GVariantIter is not useful for bindings, but
GVariantBuilder may be.

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

13 years agogutils.c: Annotation fixes
Colin Walters [Tue, 31 May 2011 17:25:09 +0000 (13:25 -0400)]
gutils.c: Annotation fixes

13 years agog_shell_parse_argv: Annotate
Colin Walters [Tue, 31 May 2011 17:10:12 +0000 (13:10 -0400)]
g_shell_parse_argv: Annotate

13 years agogfileutils: Annotations for g_file_{get,set}_contents
Colin Walters [Tue, 31 May 2011 16:00:41 +0000 (12:00 -0400)]
gfileutils: Annotations for g_file_{get,set}_contents

These are actually byte arrays.

13 years agoConsistently use G_GNUC_EXTENSION instead of __extension__
Colin Walters [Tue, 31 May 2011 14:35:38 +0000 (10:35 -0400)]
Consistently use G_GNUC_EXTENSION instead of __extension__

g-ir-scanner doesn't like __extension__, and while I can add it, since
we have this macro, we should be using it consistently.

13 years agogthreadedresolver: fix hang on g_thread_pool_push() failure
muralis [Wed, 25 May 2011 08:12:59 +0000 (13:42 +0530)]
gthreadedresolver: fix hang on g_thread_pool_push() failure

In resolve_sync function in gthreadedresolver.c, if g_thread_pool_push
fails due to thread creation failure, we are just simply appending the
data to the queue of work to do. After the failure, we might wait
indefinitely in g_cond_wait. In case of g_thread_pool_push failure,
propagate the error so that this function does not blocks forever in
case of failure.

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

13 years ago[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Sun, 29 May 2011 12:04:16 +0000 (14:04 +0200)]
[l10n]Updated Catalan (Valencian) translation

13 years agoUpdated Spanish translation
Jorge GonzĂ¡lez [Sun, 29 May 2011 07:47:30 +0000 (09:47 +0200)]
Updated Spanish translation

13 years agoDocumentation fixups
Matthias Clasen [Sun, 29 May 2011 04:05:07 +0000 (00:05 -0400)]
Documentation fixups

13 years agoClean up includes
Matthias Clasen [Sun, 29 May 2011 03:27:24 +0000 (23:27 -0400)]
Clean up includes

13 years agoReduce excessive whitespace
Matthias Clasen [Sun, 29 May 2011 03:15:07 +0000 (23:15 -0400)]
Reduce excessive whitespace

13 years agoRemove redundant comments
Matthias Clasen [Sun, 29 May 2011 02:49:59 +0000 (22:49 -0400)]
Remove redundant comments

The comments in gthreadpool.h were duplicating the
doc comments in the sources.

13 years agoVolatile not necessary after all
Matthias Clasen [Sun, 29 May 2011 02:33:37 +0000 (22:33 -0400)]
Volatile not necessary after all

I was temporarily confused.

13 years agoGTree: Declare ref_count as volatile
Matthias Clasen [Sun, 29 May 2011 02:03:05 +0000 (22:03 -0400)]
GTree: Declare ref_count as volatile

13 years agoGAsyncQueue: Make ref_count a volatile gint
Matthias Clasen [Sun, 29 May 2011 02:02:13 +0000 (22:02 -0400)]
GAsyncQueue: Make ref_count a volatile gint

13 years agoGAsyncQueue: Remove excessive atomic operations
Matthias Clasen [Sun, 29 May 2011 01:43:45 +0000 (21:43 -0400)]
GAsyncQueue: Remove excessive atomic operations

Almost every function was double-checking the ref count,
unnecessarily.

13 years agoGArray: Avoid unncessary atomic accesses to refcounts
Matthias Clasen [Sun, 29 May 2011 01:41:08 +0000 (21:41 -0400)]
GArray: Avoid unncessary atomic accesses to refcounts

Not really necessary to double-check the ref-count.

13 years agoGHash: Avoid nonatomic access to the reference count
Matthias Clasen [Sun, 29 May 2011 01:40:12 +0000 (21:40 -0400)]
GHash: Avoid nonatomic access to the reference count

Not really necessary to constantly double-check the ref
count, anyway.

13 years agoFix a typo
Matthias Clasen [Sun, 29 May 2011 01:14:36 +0000 (21:14 -0400)]
Fix a typo

13 years agoDocumentation tweaks
Matthias Clasen [Sun, 29 May 2011 01:12:52 +0000 (21:12 -0400)]
Documentation tweaks

Add Since tags, etc.

13 years agogsocket: Fix some cases of returning error without setting *error
Neil Roberts [Sat, 28 May 2011 14:13:11 +0000 (15:13 +0100)]
gsocket: Fix some cases of returning error without setting *error

g_socket_shutdown and g_socket_close were calling check_socket with a
NULL error parameter so any errors wouldn't get propagated up.

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

13 years agogsocket: Fix the error message for a failed g_socket_shutdown
Neil Roberts [Sat, 28 May 2011 14:06:45 +0000 (15:06 +0100)]
gsocket: Fix the error message for a failed g_socket_shutdown

The GError message for g_socket_shutdown was reporting that it was
"Unable to create socket" which is presumably a cut-and-paste bug.

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

13 years agoFix compile warnings on OpenBSD.
Antoine Jacoutot [Fri, 27 May 2011 09:08:13 +0000 (11:08 +0200)]
Fix compile warnings on OpenBSD.

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

13 years agoRemove unnecessary casts
Matthias Clasen [Sat, 28 May 2011 22:42:09 +0000 (18:42 -0400)]
Remove unnecessary casts

The new atomic implementations don't need these anymore to
avoid warnings.

13 years agooptimise bitlocks with new atomic operations
Ryan Lortie [Sat, 28 May 2011 20:41:59 +0000 (16:41 -0400)]
optimise bitlocks with new atomic operations

Add a performance test for bitlocks.

Make use of the new g_atomic_int_{and,or} to avoid having to do the
usual compare-and-exchange loop.

On a test machine, the change increases performance from approximately
20 million uncontended acquire/releases per second to 31 million.

13 years agoFix futex(2) detection and use
Ryan Lortie [Sat, 28 May 2011 21:27:12 +0000 (17:27 -0400)]
Fix futex(2) detection and use

Commit 22e7fc34c44c5ef95abf4fed429f2345410cc82c introduced a regression:
futexes were always disabled and the emulated codepath was always being
used.  That commit was in response to an originally buggy
implementationt hat wrote junk into config.h (but happened to be working
properly).

Fix up the mess and while we're at it, close bug #631231 by including
syscall.h from the correct location and using __NR_futex instead of
SYS_futex.

Closes #631231.

13 years agoglib: Rewrite gatomic.[ch]
Ryan Lortie [Sat, 28 May 2011 19:59:18 +0000 (15:59 -0400)]
glib: Rewrite gatomic.[ch]

 - remove all inline assembly versions

 - implement the atomic operations using either GCC intrinsics, the
   Windows interlocked API or a mutex-based fallback

 - drop gatomic-gcc.c since these are now defined in the header file.
   Adjust Makefile.am accordingly.

 - expand the set of operations: support 'get', 'set', 'compare and
   exchange', 'add', 'or', and 'xor' for both integers and pointers

 - deprecate g_atomic_int_exchange_and_add since g_atomic_int_add (as
   with all the new arithmetic operations) now returns the prior value

 - unify the use of macros: all functions are now wrapped in macros that
   perform the proper casts and checks

 - remove G_GNUC_MAY_ALIAS use; it was never required for the integer
   operations (since casting between pointers that only vary in
   signedness of the target is explicitly permitted) and we avoid the
   need for the pointer operations by using simple 'void *' instead of
   'gpointer *' (which caused the 'type-punned pointer' warning)

 - provide function implementations of g_atomic_int_inc and
   g_atomic_int_dec_and_test: these were strictly macros before

 - improve the documentation to make it very clear exactly which types
   of pointers these operations may be used with

 - remove a few uses of the now-deprecated g_atomic_int_exchange_and_add

 - drop initialisation of gatomic from gthread (by using a GStaticMutex
   instead of a GMutex)

 - update glib.symbols and documentation sections files

Closes #650823 and #650935

13 years agoQuiet down the build a bit
Matthias Clasen [Sat, 28 May 2011 18:29:08 +0000 (14:29 -0400)]
Quiet down the build a bit

13 years agoQuell warnings from g_once_init_enter_impl
Matthias Clasen [Sat, 28 May 2011 17:59:20 +0000 (13:59 -0400)]
Quell warnings from g_once_init_enter_impl

13 years agoTrivial: fix a variable name
Matthias Clasen [Sat, 28 May 2011 17:57:47 +0000 (13:57 -0400)]
Trivial: fix a variable name

It is indices, not indeces.

13 years agoAdd a regression test for GNOME#642026
Simon McVittie [Tue, 24 May 2011 10:04:42 +0000 (11:04 +0100)]
Add a regression test for GNOME#642026

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512

13 years agoGStaticPrivate: protect GRealThread.private_data with a bit-lock
Simon McVittie [Tue, 24 May 2011 15:23:38 +0000 (16:23 +0100)]
GStaticPrivate: protect GRealThread.private_data with a bit-lock

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512

13 years agoRefactor GStaticPrivate accessors to facilitate protecting them with locks
Simon McVittie [Tue, 24 May 2011 15:23:02 +0000 (16:23 +0100)]
Refactor GStaticPrivate accessors to facilitate protecting them with locks

* g_static_private_get: have a single entry and exit

* g_static_private_set: delay creation of GArray so the whole tail of
  the function can be under the private_data lock without risking
  deadlock with the g_thread lock; call the destructor last, after
  we could have unlocked

* g_static_private_free: choose next thread in list before accessing
  private_data, to keep all accesses together

* g_thread_cleanup: steal private_data first, then work exclusively with
  the stolen array (which doesn't need to be under a lock any more)

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512

13 years agog_static_private_free: defer non-trivial destruction til after we unlock
Simon McVittie [Tue, 24 May 2011 15:02:33 +0000 (16:02 +0100)]
g_static_private_free: defer non-trivial destruction til after we unlock

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512

13 years agoGRealThread: remove obsolete comment about gmain.c, which no longer has a copy
Simon McVittie [Tue, 24 May 2011 14:59:33 +0000 (15:59 +0100)]
GRealThread: remove obsolete comment about gmain.c, which no longer has a copy

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512

13 years agoUpdated Spanish translation
Daniel Mustieles [Sat, 28 May 2011 08:27:31 +0000 (10:27 +0200)]
Updated Spanish translation

13 years agoAdd macro version for all atomic operations
Matthias Clasen [Sat, 28 May 2011 04:16:39 +0000 (00:16 -0400)]
Add macro version for all atomic operations

Better to be consistent about this.

13 years agoUse G_STATIC_ASSERT_EXPR for size checks in atomic macros
Matthias Clasen [Sat, 28 May 2011 04:04:10 +0000 (00:04 -0400)]
Use G_STATIC_ASSERT_EXPR for size checks in atomic macros

Also add the same size checks to the macros wrapping
gcc builtins.

13 years agoAdd a test case for atomic ops
Ryan Lortie [Tue, 24 May 2011 06:07:55 +0000 (02:07 -0400)]
Add a test case for atomic ops

Make sure that the macros work properly with the range of types that
they are documented to work with and ensure that no strict aliasing
warnings are issued (even at the highest warning level).

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

13 years agoAdd G_STATIC_ASSERT_EXPR macro
Ryan Lortie [Sun, 22 May 2011 16:44:12 +0000 (12:44 -0400)]
Add G_STATIC_ASSERT_EXPR macro

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

13 years agoGThread: expand the docs
Matthias Clasen [Sat, 28 May 2011 00:22:20 +0000 (20:22 -0400)]
GThread: expand the docs

Mention newer addition to the thread support in the introduction:
bit locks and one-time initialization.

13 years agoglib-compile-schemas: write informational messages to stdout
Matthias Clasen [Fri, 27 May 2011 22:30:45 +0000 (18:30 -0400)]
glib-compile-schemas: write informational messages to stdout

The fact that we return 0 here makes it clear that this
is not considered an error, so it makes sense to not
write these messages to stderr.
Proposed by Antoine Jacoutot,
https://bugzilla.gnome.org/show_bug.cgi?id=650882

13 years agog_variant_new_dict_entry: Fix documentation and annotations
Colin Walters [Fri, 27 May 2011 20:10:21 +0000 (16:10 -0400)]
g_variant_new_dict_entry: Fix documentation and annotations

Move @key to not be at the start of a line, otherwise g-ir-scanner
gets confused.

Also two annotation fixes.

13 years agoforgotten test
Matthias Clasen [Fri, 27 May 2011 20:08:57 +0000 (16:08 -0400)]
forgotten test

13 years agog_variant_get_child_value: Add a precondition on length
Giovanni Campagna [Fri, 27 May 2011 20:03:04 +0000 (16:03 -0400)]
g_variant_get_child_value: Add a precondition on length

Ensure callers get a warning if they pass a bad length.

Split into a separate commit and changed to order index before
n_children by Colin Walters <walters@verbum.org>

13 years agoGVariant: fix introspection annotations
Giovanni Campagna [Sun, 3 Apr 2011 15:18:44 +0000 (17:18 +0200)]
GVariant: fix introspection annotations

Add transfer annotations for most functions, as well as some (array)
and (skip) for functions that use varargs.

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

13 years agoAdd glib credentials support to OpenBSD.
Antoine Jacoutot [Fri, 27 May 2011 13:51:08 +0000 (15:51 +0200)]
Add glib credentials support to OpenBSD.

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

13 years agoDon't hardcode path to true(1).
Antoine Jacoutot [Fri, 27 May 2011 15:39:38 +0000 (17:39 +0200)]
Don't hardcode path to true(1).

true(1) is not always installed under /bin so leave system() find
it in the PATH.

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

13 years agoPreserve consistency when removing all nodes from a hash table
Matthias Clasen [Fri, 27 May 2011 01:52:50 +0000 (21:52 -0400)]
Preserve consistency when removing all nodes from a hash table

During the recent refactorings of GHashTable a bug was introduced
where removing all nodes from a hash table would leave tombstones
behind, but make the counts appear like there are none.

Reported and tracked down by Carlos Garnacho,
https://bugzilla.gnome.org/show_bug.cgi?id=651141

This commit also adds a test that checks the internal consistency
of GHashTable over several insert/remove/remove-all operations.

13 years agomain: Use public function in documentation
David Schleef [Tue, 24 May 2011 21:35:20 +0000 (14:35 -0700)]
main: Use public function in documentation

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

13 years agoGDBusProxy: Mention gdbus-codegen in docs
David Zeuthen [Thu, 26 May 2011 14:18:44 +0000 (10:18 -0400)]
GDBusProxy: Mention gdbus-codegen in docs

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoGDBusProxy: Fix incorrect locking
David Zeuthen [Thu, 26 May 2011 14:07:38 +0000 (10:07 -0400)]
GDBusProxy: Fix incorrect locking

Pointed out by mclasen.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoGDBusProxy: Add locking and notes/guarantees about MT safety
David Zeuthen [Thu, 26 May 2011 13:54:47 +0000 (09:54 -0400)]
GDBusProxy: Add locking and notes/guarantees about MT safety

This was discussed in

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoGDBusProxy: Fix race condition when unsubscribing from signals
David Zeuthen [Thu, 26 May 2011 13:26:29 +0000 (09:26 -0400)]
GDBusProxy: Fix race condition when unsubscribing from signals

This was reported in bug 651133.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoCorrect the annotation for g_file_enumerator_get_container()
Richard Hughes [Thu, 26 May 2011 11:37:24 +0000 (12:37 +0100)]
Correct the annotation for g_file_enumerator_get_container()

We don't ref the returned object, and alex has verified the gvfs implementation.

13 years agogthread: build unix tests only on unix
Marc-André Lureau [Wed, 11 May 2011 14:42:14 +0000 (16:42 +0200)]
gthread: build unix tests only on unix

The build fails when compiling with mingw32. Correct the build of a
unix tests on unix only.

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

13 years agogdbus-codegen: Fix up example to not use non-existant method
David Zeuthen [Tue, 24 May 2011 11:34:30 +0000 (07:34 -0400)]
gdbus-codegen: Fix up example to not use non-existant method

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agogdbus-codegen: Properly render @param and %TRUE in generated Docbook
David Zeuthen [Tue, 24 May 2011 04:27:43 +0000 (00:27 -0400)]
gdbus-codegen: Properly render @param and %TRUE in generated Docbook

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agogdbus-codegen: Handle unexpected XML tags
David Zeuthen [Tue, 24 May 2011 03:22:04 +0000 (23:22 -0400)]
gdbus-codegen: Handle unexpected XML tags

This was reported in bug 650874. Add tests.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agogdbusintrospection: fix introspection of DBus Introspection structures
Giovanni Campagna [Thu, 21 Apr 2011 21:45:59 +0000 (23:45 +0200)]
gdbusintrospection: fix introspection of DBus Introspection structures

Correctly mark fields as arrays (requires changing gobject-introspection
to pick those).

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

13 years agoRevert "gsettings-tool: warn if setting a value fails"
Ray Strode [Mon, 23 May 2011 17:39:09 +0000 (13:39 -0400)]
Revert "gsettings-tool: warn if setting a value fails"

This reverts commit ea57feff96f13bbd4d03a76040a4ddfad2677310.

It makes the gsettings tool fail any time it tries to set a
key to a value, that the key already has.

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

13 years agoFix build with gcc-2.*.
Antoine Jacoutot [Mon, 23 May 2011 17:11:10 +0000 (19:11 +0200)]
Fix build with gcc-2.*.

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