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

13 years agoUpdated Irish translation.
Seán de Búrca [Mon, 23 May 2011 06:35:46 +0000 (00:35 -0600)]
Updated Irish translation.

13 years agoCosmetic changes
Matthias Clasen [Mon, 23 May 2011 04:48:10 +0000 (00:48 -0400)]
Cosmetic changes

Use inc/dec for refcounting.

13 years agoCosmetics
Matthias Clasen [Mon, 23 May 2011 04:40:33 +0000 (00:40 -0400)]
Cosmetics

Use g_atomic_int_inc/dec instead of add(...,1/-1), since
this is the way refcounting is done elsewhere. Some other
cosmetic changes.

13 years agoSimply symbols files
Matthias Clasen [Mon, 23 May 2011 04:21:06 +0000 (00:21 -0400)]
Simply symbols files

The grouping in files/headers is not used anymore, and
the function attributes neither. Adapt abicheck scripts
and .def file generation rules accordingly.

13 years agoImprove atomic ops implementation
Matthias Clasen [Sun, 22 May 2011 20:31:43 +0000 (16:31 -0400)]
Improve atomic ops implementation

When using gcc builtins for atomic operations, provide them
as macros, so gcc can see the builtins and do optimizations.
This change gives considerable speedups in bitlocks, which
use atomic operations heavily, see bug 650458.

Also, don't define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED unconditionally
when using gcc builtins.

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

13 years agoAdd some atomic ops tests
Matthias Clasen [Sun, 22 May 2011 05:29:22 +0000 (01:29 -0400)]
Add some atomic ops tests

13 years agoFix HAVE_FUTEX definition
Matthias Clasen [Sun, 22 May 2011 04:33:05 +0000 (00:33 -0400)]
Fix HAVE_FUTEX definition

13 years agoTrivial: fix a typo
Matthias Clasen [Sun, 22 May 2011 00:56:04 +0000 (20:56 -0400)]
Trivial: fix a typo

13 years agoRevert "g_key_file_has_key_full: Clarify the docs"
Matthias Clasen [Sat, 21 May 2011 15:14:05 +0000 (11:14 -0400)]
Revert "g_key_file_has_key_full: Clarify the docs"

This reverts commit 4ddb84999d47816624f9ae7dcba181cbccd5c4d9.

13 years agog_key_file_has_key_full: Clarify the docs
Matthias Clasen [Sat, 21 May 2011 15:12:08 +0000 (11:12 -0400)]
g_key_file_has_key_full: Clarify the docs

13 years agoEnforce rules about modifying hash tables in callbacks
Matthias Clasen [Fri, 20 May 2011 19:07:08 +0000 (15:07 -0400)]
Enforce rules about modifying hash tables in callbacks

We have the infrastructure to do this, so lets do it.
Also add tests for find and foreach to the testsuite.
Bug 650688

13 years agoBe more careful when calling destroy notifies
Matthias Clasen [Fri, 20 May 2011 03:50:03 +0000 (23:50 -0400)]
Be more careful when calling destroy notifies

If we are, we can allow modification of the hash table
from destroy notifies.

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

13 years agoGObject: move GLib type definitions to a separate header
Giovanni Campagna [Sun, 3 Apr 2011 13:51:04 +0000 (15:51 +0200)]
GObject: move GLib type definitions to a separate header

This way it is possible to pull them into the GLib GIR file.

Some cleanups by Colin Walters <walters@verbum.org>

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

13 years agoWhitespace fixes
Ryan Lortie [Wed, 18 May 2011 21:56:50 +0000 (17:56 -0400)]
Whitespace fixes

13 years agoGApplication: fix remote action states
Ryan Lortie [Wed, 18 May 2011 21:53:07 +0000 (17:53 -0400)]
GApplication: fix remote action states

Fix up remote_action_info_new_from_iter() to do its job better and use
it from all places that it's appropriate.

Closes #650236.

13 years agoAdd debug output to GApplication actions example
Ryan Lortie [Wed, 18 May 2011 20:12:04 +0000 (16:12 -0400)]
Add debug output to GApplication actions example

Enough to clearly demonstrate bug #650236.

13 years agogatomic: #include gthread.h to fix compilation on nonoptimized architectures
Jasper Lievisse Adriaanse [Wed, 18 May 2011 16:01:44 +0000 (12:01 -0400)]
gatomic: #include gthread.h to fix compilation on nonoptimized architectures

The fallback case of implementing atomic integers with mutexes needs
gthread.h.

Commit message written by Colin Walters <walters@verbum.org>

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

13 years agogtype: Remove unused variable
Colin Walters [Wed, 18 May 2011 15:57:21 +0000 (11:57 -0400)]
gtype: Remove unused variable

13 years agog_key_file_has_key_full: New function to fix g_key_file_has_key()'s GError semantics
Colin Walters [Mon, 16 May 2011 19:30:31 +0000 (15:30 -0400)]
g_key_file_has_key_full: New function to fix g_key_file_has_key()'s GError semantics

See https://bugzilla.gnome.org/show_bug.cgi?id=649657 for discussion
of why it's bad for bindings for gerror return values to both signal
errors and carry meaning.

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

13 years agoFix short day names in Hungarian translation
Gabor Kelemen [Wed, 18 May 2011 10:39:31 +0000 (12:39 +0200)]
Fix short day names in Hungarian translation

13 years agoUpdate Visual C++ README.txt
Chun-wei Fan [Wed, 18 May 2011 03:14:00 +0000 (11:14 +0800)]
Update Visual C++ README.txt

Correct the unpacking path of GLib...

13 years agoFix gsettings tool string handling
Ryan Lortie [Tue, 17 May 2011 15:58:46 +0000 (11:58 -0400)]
Fix gsettings tool string handling

There are some bugs caused by the way that gsettings-tool currently
attempts to help the user when they leave the quotes off of a string
value that they are setting.

Simplify the code to make it more robust and add some comments about why
it should be done this way.

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

13 years agogobject: Speed up g_type_from_name()
Benjamin Otte [Tue, 17 May 2011 12:58:39 +0000 (14:58 +0200)]
gobject: Speed up g_type_from_name()

The hash table used exclusively for looking up types by name used to map
quarks => types. But we can easily make it map strings => types, which
avoids the quark lookup. And that in trun avoids taking a lock and
consulting another hash table. So this change should make
g_type_from_name() roughly twice as fast.

13 years agokeyfile: fill parse buffer in line sized chunks
John Lindgren [Tue, 17 May 2011 03:03:30 +0000 (23:03 -0400)]
keyfile: fill parse buffer in line sized chunks

When loading a keyfile the incoming bytes are fed
to a line buffer to get parsed each time a new line
is encountered.

The code that fills the line buffer does it inefficiently,
one byte at a time.

This commit changes that code to look ahead at the incoming
bytes for the next '\n' character and then fill the line buffer
all at once.

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

13 years agokeyfile: avoid needless allocations on file load
John Lindgren [Tue, 17 May 2011 02:27:11 +0000 (22:27 -0400)]
keyfile: avoid needless allocations on file load

When loading a key file, the keys and values of individual lines
are allocated once when copied and trimmed from the parse buffer
and allocated/copied again when added to the lookup map.

This commit avoids the second pair of allocations by introducing
a new function g_key_file_add_key_value_pair that gives the
lookup map direct ownership of the key and value copied from the
parse buffer.

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

13 years agoRename a problematic test binary
Matthias Clasen [Mon, 16 May 2011 18:38:45 +0000 (14:38 -0400)]
Rename a problematic test binary

Having a binary called printf is apparently asking for trouble,
so lets not do that.

http://bugzilla.gnome.org/show_bug.cgi?id=650078

13 years agoAdd gdbus autogenerated xml files to the ignore file
Emmanuele Bassi [Mon, 16 May 2011 15:10:06 +0000 (16:10 +0100)]
Add gdbus autogenerated xml files to the ignore file

13 years agom4macros/gsettings.m4: Use AS_HELP_STRING instead the deprecated AC_HELP_STRING
Javier Jardón [Mon, 16 May 2011 11:51:59 +0000 (12:51 +0100)]
m4macros/gsettings.m4: Use AS_HELP_STRING instead the deprecated AC_HELP_STRING

13 years agoautogen.sh: Use autoreconf instead custom script
Javier Jardón [Mon, 16 May 2011 10:51:29 +0000 (11:51 +0100)]
autogen.sh: Use autoreconf instead custom script

13 years agogdbus-codegen: Ensure that generated skeletons are MT-safe
David Zeuthen [Sun, 15 May 2011 15:45:37 +0000 (11:45 -0400)]
gdbus-codegen: Ensure that generated skeletons are MT-safe

For example, if setting a property on a skeleton from another thread
than where it was constructed, the idle handler responsible for
emitting the PropertiesChanged() signal could run immediately and
clear skeleton->priv->changed_properties_idle_source causing
g_source_unref() to be called with a NULL pointer. This race was
easily be fixed by adding a lock to the skeleton object.

In addition to fixing this race, also move the code for setting up the
idle handler to a class handler for the GObject::notify signal. This
change allows use of g_object_freeze_notify() and g_object_thaw_notify()
to perform atomic property changes from another thread than the one
that the skeleton was created in.

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agodocs: Improve punctuation in some of the GArray method documentation
Philip Withnall [Sun, 15 May 2011 14:31:16 +0000 (15:31 +0100)]
docs: Improve punctuation in some of the GArray method documentation

13 years agodocs: Add the cute trick comment to all sort functions
Benjamin Otte [Sun, 15 May 2011 14:16:30 +0000 (16:16 +0200)]
docs: Add the cute trick comment to all sort functions

Thanks to Sebastian Dröge for pointing out there's more than
g_array_sort() and I hadn't in fact added the comment to g_array_sort()
in 80928ea403cfff5ffaa4bc73e84e3d4ebcb09123

13 years agodocs: Add a cute trick for achieving a stable sort
Benjamin Otte [Sun, 15 May 2011 14:11:51 +0000 (16:11 +0200)]
docs: Add a cute trick for achieving a stable sort

This trick is inspired by
http://www.gnu.org/s/hello/manual/libc/Array-Sort-Function.html
http://jeffreystedfast.blogspot.com/2011/04/optimizing-merge-sort.html

13 years agoUpdated Esperanto translation
Kristjan SCHMIDT [Sun, 15 May 2011 08:16:59 +0000 (10:16 +0200)]
Updated Esperanto translation

13 years agogdbus-codegen: Use (skip) annotation on return values
David Zeuthen [Fri, 13 May 2011 18:23:14 +0000 (14:23 -0400)]
gdbus-codegen: Use (skip) annotation on return values

This was discussed in bug 649657.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoUpdated Hebrew translation.
Yaron Shahrabani [Fri, 13 May 2011 05:38:35 +0000 (08:38 +0300)]
Updated Hebrew translation.

13 years agoGDBusConnection: Document that sockets are frobbed into non-blocking mode
David Zeuthen [Thu, 12 May 2011 19:36:34 +0000 (15:36 -0400)]
GDBusConnection: Document that sockets are frobbed into non-blocking mode

Signed-off-by: David Zeuthen <davidz@redhat.com>