9632 Commits

Author SHA1 Message Date
Matthias Clasen
8bf68cc661 GHash: Avoid nonatomic access to the reference count
Not really necessary to constantly double-check the ref
count, anyway.
2011-06-05 13:18:57 -04:00
Neil Roberts
a94f498e27 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
2011-06-05 13:18:33 -04:00
Neil Roberts
26bf8c67ba 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
2011-06-05 13:18:24 -04:00
Matthias Clasen
61252762cb Trivial: fix a variable name
It is indices, not indeces.
2011-06-05 13:15:10 -04:00
Simon McVittie
9a36b75823 Add a regression test for GNOME#642026
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512
2011-06-05 13:15:01 -04:00
Simon McVittie
2b358b082a GStaticPrivate: protect GRealThread.private_data with a bit-lock
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=642026
Bug-NB: NB#257512
2011-06-05 13:14:47 -04:00
Simon McVittie
815e18f541 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
2011-06-05 13:14:38 -04:00
Simon McVittie
89fb443ba7 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
2011-06-05 13:14:25 -04:00
Simon McVittie
24aa91b825 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
2011-06-05 13:14:17 -04:00
Matthias Clasen
6274eb1c98 GThread: expand the docs
Mention newer addition to the thread support in the introduction:
bit locks and one-time initialization.
2011-06-05 13:13:55 -04:00
Matthias Clasen
a83581a4f0 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-06-05 13:13:46 -04:00
Colin Walters
a06603e7e6 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-06-05 13:13:31 -04:00
Giovanni Campagna
a62eb4237e 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-06-05 13:13:01 -04:00
Giovanni Campagna
56c4e19f35 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-06-05 13:12:47 -04:00
Antoine Jacoutot
9653d9c92a 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-06-05 13:12:23 -04:00
David Schleef
6f64843d5e main: Use public function in documentation
https://bugzilla.gnome.org/show_bug.cgi?id=651009
2011-06-05 13:11:58 -04:00
Richard Hughes
b8d26cc4cb Correct the annotation for g_file_enumerator_get_container()
We don't ref the returned object, and alex has verified the gvfs implementation.
2011-06-05 13:11:27 -04:00
Matthias Clasen
46e31d1b7a Fix HAVE_FUTEX definition
The previous implementation was buggy and wrote junk into config.h.
While we're at it, close bug #631231 by including syscall.h from the
correct location and using __NR_futex instead of SYS_futex.
2011-06-05 13:05:33 -04:00
Chun-wei Fan
be4f4563c7 Fix unconditional unistd.h inclusion
Cherry-pick from commit 3c94299b0ff1c8e1b0b06bedd73b1b725e631d8a
in master.

This will close Bug 644905.
2011-06-01 08:12:45 +08:00
Carles Ferrando
6add04d0c6 [l10n]Updated Catalan (Valencian) translation 2011-05-29 14:04:02 +02:00
Carles Ferrando
f8202d1f38 [l10n]Updated Catalan (Valencian) translation 2011-05-29 14:03:42 +02:00
Chun-wei Fan
33922ffbf5 Update Visual C++ projects for glib-compile-schemas
Update include path so that gmodule.h can be found.
2011-05-25 12:50:20 +08:00
Seán de Búrca
e09abba419 Updated Irish translation. 2011-05-23 00:37:08 -06:00
Matthias Clasen
09df90df29 bump version 2011-05-21 01:16:24 -04:00
Matthias Clasen
46b83a838c Updates 2.28.7 2011-05-21 00:14:42 -04:00
Ryan Lortie
89908908d5 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-20 23:50:55 -04:00
Jasper Lievisse Adriaanse
bb488d4c4f 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-20 23:42:58 -04:00
Colin Walters
dee6ef109e gtype: Remove unused variable 2011-05-20 23:42:44 -04:00
Ryan Lortie
2ab5d96fa6 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-20 23:42:22 -04:00
Benjamin Otte
e46332dc49 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-20 23:41:46 -04:00
John Lindgren
317a249d82 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-20 23:41:02 -04:00
John Lindgren
7cb768f890 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-20 23:39:37 -04:00
Matthias Clasen
8e5f5d40b7 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-20 23:39:05 -04:00
Ryan Lortie
5367f90c67 GVariant: Better handling of invalid UTF-8
g_variant_new_string() hits a g_return_if_fail() when given invalid
UTF-8.  That's certainly the right thing to do, but
g_variant_builder_add() uses this function internally and crashes when
it returns NULL due to the user passing a non-utf8 string.

We can protect the internal code by returning "[Invalid UTF-8]" in this
case while also making the problem easier to debug (and less fatal).

Closes #632631.
2011-05-20 23:37:25 -04:00
Behdad Esfahbod
76c8e94637 Bug 648966 - Update g_unichar_iswide and g_unichar_iswide_cjk
Add tests.
2011-05-20 23:36:09 -04:00
Behdad Esfahbod
029b1fc036 Bug 648966 - Update g_unichar_iswide and g_unichar_iswide_cjk
Update to Unicode 6.0.  Also attach Python script that generates
the tables.
2011-05-20 23:35:00 -04:00
Alexander Larsson
c7271d2184 GFilterInputStream: close-base-stream should not be construct-only
This is a runtime changable property (by the methods for it), must
be a cut and paste error.
2011-05-20 23:34:13 -04:00
David Schleef
ca5d9d7a22 Fix %z in g_date_time_format()
https://bugzilla.gnome.org/show_bug.cgi?id=642935
2011-05-20 23:33:36 -04:00
Matthias Clasen
a50f18cdf0 Fix mailing list link in README
Patch by Thomas Andersen, bug 647594
2011-05-20 23:32:38 -04:00
Matthias Clasen
486e6d3eb4 Fix up some harmless FALSE <> NULL confusions
Reported in bug 643134.
2011-05-20 23:31:12 -04:00
Matthias Clasen
0278acbc69 GSequence: Make g_sequence_iter_move behave as documented
As pointed out in bug 658313, moving before the begin iter is
supposed to return the begin iter, not the end iter. Also add
a test for this behaviour.
2011-05-20 23:31:01 -04:00
Michael Terry
859c8f7ed7 Don't ignore SUPPORTS_STARTUP_NOTIFICATION for commandline GAppInfos
https://bugzilla.gnome.org/show_bug.cgi?id=648416
2011-05-20 23:30:15 -04:00
Gabor Kelemen
1209c92336 Fix short day names in Hungarian translation 2011-05-18 12:39:31 +02:00
Chun-wei Fan
3500474619 Update Visual C++ README.txt
Correct the unpacking path of GLib sources...
2011-05-18 11:15:56 +08:00
Martin Pitt
5deeb94970 [gi] Add missing allow-none annotations to GDBusConnection
Cherrypicked from master commit 21c2291.
2011-05-08 23:10:37 +02:00
Chun-wei Fan
09f7c3307e Update VS 2010 "install" project
The dependencies on gsettings and glib-compile-schemas were missed.
Made up for them here.
2011-05-05 15:11:18 +08:00
Abduxukur Abdurixit
5d406412e9 Added UG translation 2011-05-01 20:08:04 +02:00
Chun-wei Fan
cb8143163d Update VS2008/2010 README.txt
Tell people about the usage of ZLib to avoid the problem
such as the one mentioned in Bug 633977
2011-05-01 09:50:29 +08:00
Şenol Korkmaz
4c09b4783e Updated Turkish translation 2011-04-26 02:50:30 +03:00
Abduxukur Abdurixit
9b2cfd5f59 Added UG translation 2011-04-25 10:37:58 +02:00