Commit Graph

9946 Commits

Author SHA1 Message Date
Matthias Clasen
64d5a0404a GThread: expand the docs
Mention newer addition to the thread support in the introduction:
bit locks and one-time initialization.
2011-05-27 20:22:20 -04:00
Matthias Clasen
7d0eac03e9 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
2011-05-27 18:30:45 -04:00
Colin Walters
dfcac7b23e 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.
2011-05-27 16:12:58 -04:00
Matthias Clasen
5345d21150 forgotten test 2011-05-27 16:09:34 -04:00
Giovanni Campagna
39ba9c8e49 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>
2011-05-27 16:05:56 -04:00
Giovanni Campagna
e61fa51fd5 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
2011-05-27 15:56:50 -04:00
Antoine Jacoutot
77f4f5aa02 Add glib credentials support to OpenBSD.
https://bugzilla.gnome.org/show_bug.cgi?id=650885
2011-05-27 14:22:56 -04:00
Antoine Jacoutot
2ee470a71f 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
2011-05-27 12:00:41 -04:00
Matthias Clasen
5d7b67a6c3 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.
2011-05-26 21:52:50 -04:00
David Schleef
b92861b5a0 main: Use public function in documentation
https://bugzilla.gnome.org/show_bug.cgi?id=651009
2011-05-26 20:56:51 -04:00
David Zeuthen
25440ce014 GDBusProxy: Mention gdbus-codegen in docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-26 10:18:44 -04:00
David Zeuthen
06f5de77f0 GDBusProxy: Fix incorrect locking
Pointed out by mclasen.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-26 10:07:38 -04:00
David Zeuthen
c0f4a63c89 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>
2011-05-26 09:56:14 -04:00
David Zeuthen
7e0f890e38 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>
2011-05-26 09:26:29 -04:00
Richard Hughes
9936f961ba Correct the annotation for g_file_enumerator_get_container()
We don't ref the returned object, and alex has verified the gvfs implementation.
2011-05-26 12:37:36 +01:00
Marc-André Lureau
30672af7ff 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
2011-05-26 11:19:20 +02:00
David Zeuthen
3f569d2b5b gdbus-codegen: Fix up example to not use non-existant method
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-24 07:34:30 -04:00
David Zeuthen
ab18737ead gdbus-codegen: Properly render @param and %TRUE in generated Docbook
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-24 00:27:43 -04:00
David Zeuthen
263ce3042c 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>
2011-05-23 23:23:10 -04:00
Giovanni Campagna
0aae977ac1 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
2011-05-23 22:15:56 +02:00
Ray Strode
eabad1923e Revert "gsettings-tool: warn if setting a value fails"
This reverts commit ea57feff96.

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
2011-05-23 13:40:02 -04:00
Antoine Jacoutot
ce0f7cafa1 Fix build with gcc-2.*.
https://bugzilla.gnome.org/show_bug.cgi?id=650884
2011-05-23 13:05:49 -04:00
Seán de Búrca
c61fd66e77 Updated Irish translation. 2011-05-23 00:38:11 -06:00
Matthias Clasen
77110304cc Cosmetic changes
Use inc/dec for refcounting.
2011-05-23 00:48:10 -04:00
Matthias Clasen
88f23fb1d9 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.
2011-05-23 00:40:33 -04:00
Matthias Clasen
b5056fbaf9 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.
2011-05-23 00:21:06 -04:00
Matthias Clasen
dec7d41275 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
2011-05-22 16:31:43 -04:00
Matthias Clasen
9255350a70 Add some atomic ops tests 2011-05-22 01:29:22 -04:00
Matthias Clasen
22e7fc34c4 Fix HAVE_FUTEX definition 2011-05-22 00:33:05 -04:00
Matthias Clasen
f924384634 Trivial: fix a typo 2011-05-21 20:56:04 -04:00
Matthias Clasen
c38b7d769e Revert "g_key_file_has_key_full: Clarify the docs"
This reverts commit 4ddb84999d.
2011-05-21 11:14:05 -04:00
Matthias Clasen
4ddb84999d g_key_file_has_key_full: Clarify the docs 2011-05-21 11:12:08 -04:00
Matthias Clasen
120b85a31b 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
2011-05-20 15:07:08 -04:00
Matthias Clasen
afc5319a27 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
2011-05-19 23:51:43 -04:00
Giovanni Campagna
7c63370e3a 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
2011-05-19 17:39:33 -04:00
Ryan Lortie
9793919d7b Whitespace fixes 2011-05-18 17:56:50 -04:00
Ryan Lortie
0e63b57eea 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.
2011-05-18 17:53:07 -04:00
Ryan Lortie
0e10116b3b Add debug output to GApplication actions example
Enough to clearly demonstrate bug #650236.
2011-05-18 16:13:03 -04:00
Jasper Lievisse Adriaanse
3f3b2bd82b 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
2011-05-18 12:08:09 -04:00
Colin Walters
5645c7aa41 gtype: Remove unused variable 2011-05-18 11:57:21 -04:00
Colin Walters
9966fe4493 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
2011-05-18 11:53:21 -04:00
Gabor Kelemen
b539004d13 Fix short day names in Hungarian translation 2011-05-18 12:39:56 +02:00
Chun-wei Fan
f529dc0e08 Update Visual C++ README.txt
Correct the unpacking path of GLib...
2011-05-18 11:14:00 +08:00
Ryan Lortie
8148a3c396 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
2011-05-17 11:58:46 -04:00
Benjamin Otte
d9440687ff 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.
2011-05-17 15:01:36 +02:00
John Lindgren
aeac5de2f8 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
2011-05-16 23:41:55 -04:00
John Lindgren
9c1a44cf32 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
2011-05-16 23:36:39 -04:00
Matthias Clasen
f96dc555d5 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
2011-05-16 14:39:53 -04:00
Emmanuele Bassi
b5934de456 Add gdbus autogenerated xml files to the ignore file 2011-05-16 16:10:06 +01:00
Javier Jardón
014b4b5ae9 m4macros/gsettings.m4: Use AS_HELP_STRING instead the deprecated AC_HELP_STRING 2011-05-16 12:51:59 +01:00