Commit Graph

9971 Commits

Author SHA1 Message Date
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
Javier Jardón
d2d3449a8e autogen.sh: Use autoreconf instead custom script 2011-05-16 12:03:24 +01:00
David Zeuthen
11e01802ab 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>
2011-05-15 12:38:24 -04:00
Philip Withnall
2122191595 docs: Improve punctuation in some of the GArray method documentation 2011-05-15 15:31:16 +01:00
Benjamin Otte
cb7a5a8e94 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 80928ea403
2011-05-15 16:16:30 +02:00
Benjamin Otte
80928ea403 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
2011-05-15 16:13:55 +02:00
Kristjan SCHMIDT
125b896a4e Updated Esperanto translation 2011-05-15 10:16:59 +02:00
David Zeuthen
ae10eca116 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>
2011-05-13 14:24:22 -04:00
Yaron Shahrabani
4a7a1bc437 Updated Hebrew translation. 2011-05-13 08:38:35 +03:00
David Zeuthen
b9e3e03767 GDBusConnection: Document that sockets are frobbed into non-blocking mode
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-12 15:36:34 -04:00
David Zeuthen
ce77614142 gdbus-codegen: Mark members in generated class instance structs as private
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-11 21:16:41 -04:00
David Zeuthen
5a811135f7 Add g_dbus_method_invocation_take_error() convenience method
Similar in spirit to g_simple_async_result_take_error().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-11 20:57:54 -04:00
Colin Walters
d39731724a gdbus-codegen: Fix annotation parsing
It takes 3 options.
2011-05-11 17:13:57 -04:00
Maarten Bosmans
97cd6fa2e3 gdbus-codegen: Quote substitution variables
Avoids failure if they contain spaces.

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

https://bugzilla.gnome.org/show_bug.cgi?id=649775
2011-05-11 15:47:00 -04:00
Colin Walters
61295f87c9 gdbus-codegen: Drop dependency on argparse
This is only in Python 2.7 or as a separate module.  Use optparse
which exists since 2.3.

https://bugzilla.gnome.org/show_bug.cgi?id=649988
2011-05-11 15:39:34 -04:00
Giovanni Campagna
eebb3647a1 gbase64: fix introspection annotations
Makes the g_base64_* functions usable from introspection GLib bindings
(gjs, currently, as both vala and pygobject use manual bindings for
GLib)

https://bugzilla.gnome.org/show_bug.cgi?id=646635
2011-05-11 20:10:25 +02:00
Colin Walters
c026cf56a1 gdatetime: Quiet GCC warning about possibly-uninitialized 2011-05-11 13:19:05 -04:00
Ryan Lortie
c2a2350cc1 GSettings: fix example in the docs 2011-05-10 15:25:54 +02:00
Giovanni Campagna
53dc341b0d GDBusMethodInvocation: fix introspection annotations
In particular (transfer full), to avoid a refcounting bug and a
segmentation fault.

https://bugzilla.gnome.org/show_bug.cgi?id=646635
2011-05-09 19:04:25 +02:00
Martin Pitt
21c2291496 [gi] Add missing allow-none annotations to GDBusConnection 2011-05-08 23:07:40 +02:00
Yuri Kozlov
3495f57d6b Updated Russian translation 2011-05-08 12:05:09 +04:00
Daniel Mustieles
13211c5b60 Updated Spanish translation 2011-05-07 12:38:56 +02:00
Ryan Lortie
1361ec78cd GSettings: keep resets on loss of writability
Don't drop resets from a GDelayedSettingsBackend when the writability
changes.  Resets will always succeed, even against non-writable keys and
some people (gnome-screensaver) are using them in a way that they would
want them not to be forgotten.
2011-05-07 11:45:44 +02:00
Ryan Lortie
a38c97af51 Allow NULL to be stored into GSettings trees
This is used for resets (in theory) and currently it crashes when
freeing the tree.
2011-05-07 11:45:44 +02:00
David Zeuthen
720d6ec8e4 gdbus: Add a --timeout option
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-05-06 15:27:52 -04:00
Ray Strode
7bcede9301 gdbus-codegen: fix typo in man page
s/on_handle_hello-world/on_handle_hello_world/
2011-05-06 13:00:38 -04:00