Commit Graph

11034 Commits

Author SHA1 Message Date
Ryan Lortie
c33cd00739 Stop using GStaticMutex in two testcases 2011-09-21 16:06:53 -04:00
Ryan Lortie
1da913a7a3 GParamSpecPool: port from GStaticMutex to GMutex 2011-09-21 16:06:53 -04:00
Ryan Lortie
806de91cd5 GSettings: port from GStaticMutex to GMutex 2011-09-21 16:06:53 -04:00
Ryan Lortie
646de11ae7 Remove "temporary until GLib is fixed" code
The original GMutex/GCond rework patch introduced some temporary code to
cope with GLib's old approach to thread initialisation.  These are no
longer required.
2011-09-21 16:06:53 -04:00
Ryan Lortie
e996a836e8 Port g_cond_new to use GSlice
Now that nothing inside of GLib is using g_cond_new(), we can implement
it using GSlice.  Since the implementations for POSIX and Windows are
now the same, move it to gthread.c.
2011-09-21 16:06:53 -04:00
Ryan Lortie
f1d34d0187 libglib: stop using g_cond_new in some places
Port a couple of low-level users of g_cond_new to use G_COND_INIT or
g_cond_init() as appropriate.
2011-09-21 16:06:52 -04:00
Ryan Lortie
22b3e26034 Port g_mutex_new to use GSlice
Now that nothing inside of GLib is using g_mutex_new, we can implement
it using GSlice.  Since the implementations for POSIX and Windows are
now the same, move it to gthread.c.
2011-09-21 16:06:49 -04:00
Ryan Lortie
cf26a6fc32 G_LOCK: port from GStaticMutex to GMutex
GCancellable made use of the undocumented G_LOCK_NAME macro in an
invalid way.  Fix that up while we're at it.
2011-09-21 15:55:36 -04:00
Ryan Lortie
2c7388c19a libglib: stop using g_mutex_new
Use G_MUTEX_INIT or g_mutex_init() as appropriate.
2011-09-21 15:55:36 -04:00
Ryan Lortie
f35362f3ae libglib: drop use of GStaticMutex
Use GMutex directly instead.
2011-09-21 15:55:36 -04:00
Ryan Lortie
80730bc75c Rework GMutex and GCond APIs
Do a substantial rework of the GMutex and GCond APIs.

 - remove all of the macro indirection hackery which is no longer needed
   since we dropped support for switchable thread implementations

 - expose the structure types and add G_MUTEX_INIT and G_COND_INIT
   static initialiser macros

 - add g_mutex_init() and g_mutex_clear() for use when embedding GMutex
   into another structure type and do the same for GCond as well

 - avoid infinite recursion hazards by ensuring that neither GCond or
   GMutex ever calls back into any other part of GLib

 - substantially rework the Windows implementation of GCond and GMutex
   to use the SRWLock and CONDITION_VARIABLE APIs present on Windows
   2008/Vista and later, emulating these APIs on XP
2011-09-21 15:55:36 -04:00
Matthias Clasen
c6f84faa17 Forgotten part of an earlier mismerge
This is making gmappedfile.c identical to the glib-2-30 branch again.
2011-09-21 15:47:26 -04:00
Ryan Lortie
43254e8c4c gmessage.c: mark a private function static 2011-09-21 15:27:47 -04:00
David Zeuthen
aabdb7e190 GDBusObject{Proxy,Skeleton}: Prefix properties with g- to avoid collisions
Otherwise we might collide with an interface called Connection.

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

This is for the same reason that GDBusProxy has its properties
prefixed with g-.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 12:35:40 -04:00
Ryan Lortie
1f5262d2c9 gunixmounts: exempt entries with "none" mountpoint
We ignore entries with mountpoint of "swap" and "ignore".  Add "none" to
that list, since Debian uses it.

Probably we should move to using our already-existing internal list of
things to ignore, but this patch is more minimally intrusive for now.

https://bugzilla.gnome.org/show_bug.cgi?id=654563
2011-09-21 10:20:08 -04:00
Xavier Claessens
6b39085016 gdbus-codegen: prepend arg_ to method/signal arg names
This is to avoid shadow declaration warning in the case an arg name
is "time" for example.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:45:50 -04:00
David Zeuthen
933ad70c32 gdbus-codegen: Clarify how naming and Ugly_Case handling works
Basically, move some paragraphs around.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:14:28 -04:00
David Zeuthen
30537b84de gdbus-codegen: Update man page to reflect how --annotate actually works
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-21 07:14:28 -04:00
Xavier Claessens
70515ffe92 gdbus-codegen: Fix build errors in generated code
https://bugzilla.gnome.org/show_bug.cgi?id=659646
2011-09-21 10:22:24 +02:00
Sweta Kothari
447eb03956 Removed the glib.glib-2-30.gu.po file that was wrongly committed 2011-09-21 12:20:40 +05:30
Sweta Kothari
45dd6801cf Updated Gujarati Translations 2011-09-21 12:20:40 +05:30
Sweta Kothari
06560292c6 Updated Gujarati Translations 2011-09-21 12:20:40 +05:30
Sweta Kothari
a7057f5c6e Updated Gujarati Translations 2011-09-21 12:20:40 +05:30
Sweta Kothari
0c1dba0643 Updated Gujarati Translations 2011-09-21 12:20:40 +05:30
Dan Winship
855e13cc0a GThreadedResolver: don't overwrite errors
If a dns op was cancelled and then the abandoned op failed, it would
try to overwrite the original error. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=658769
2011-09-20 17:00:58 -04:00
Cosimo Cecchi
88b3f6b866 timeval: add introspection annotations to g_time_val_from_iso8601()
The GTimeVal argument is missing an (out) annotations.

https://bugzilla.gnome.org/show_bug.cgi?id=658692
2011-09-20 13:04:50 -04:00
Antoine Jacoutot
0db338bdb0 gunixmounts: Fix compilation on BSD
Commit afa82ae805 introduced a compilation
regression on BSD systems that use the sysctl(3) interface; we need to
declare the buffer len in _g_get_unix_mount_points()
BZ #659528
2011-09-20 16:58:00 +02:00
Matej Urbančič
11217edaaf Updated Slovenian translation 2011-09-20 15:40:29 +02:00
Matej Urbančič
9365bc5761 Updated Slovenian translation 2011-09-20 15:35:31 +02:00
Sweta Kothari
f8dda0955e Updated Gujarati Translations 2011-09-20 13:31:07 +05:30
David Zeuthen
88f2b32eb0 GDBusObjectManagerServer: Add test for export_uniquely() method
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-19 17:31:21 -04:00
Matthew Barnes
b1c08ca419 GDBusObjectManagerServer: Use correct object path in export_uniquely() method
In registration_data_export_interface(), the object_path is obtained using:

object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (data->object));

But when exporting an object uniquely, the object_path is not assigned
to the GDBusObject until after all the interfaces are exported.
Therefore, registration_data_export_interface() is trying to export
the interface on the non-unique object path, which can lead to
run-time errors if an object already exists on that path.

Instead, registration_data_export_interface() should be passed the
object_path explicitly, as is done in
g_dbus_object_manager_server_export_unlocked().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-19 16:45:05 -04:00
Philip Withnall
fe27bf0037 Don't close stream twice when splicing
Ensure that the output/target stream in a g_output_stream_splice_async()
operation is marked as closed if G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET is
passed to g_output_stream_splice_async(). This removes the possibility of
local FDs being closed twice because the stream's not marked as closed.

This is implemented by calling g_output_stream_close() from within
g_output_stream_splice_async() instead of calling the stream's close_fn()
directly.

Closes: bgo#659324
2011-09-19 10:13:52 +02:00
Ryan Lortie
808035666a gbitlock: #include "gslice.h"
This is needed if we're doing emulated futexes.
2011-09-18 22:21:19 -04:00
Matthias Clasen
bb1ada7791 Fix a merge accident 2011-09-18 22:14:44 -04:00
Ryan Lortie
8b03fed0cf Remove unused header gdebug.h
This was only included from gmessages.c.  Nuke the unused parts and
merge the rest into gmessages.c.
2011-09-18 22:08:05 -04:00
Ryan Lortie
37c740d509 Don't #include <glib/gslice.h> from gmem.h
It looks like this was done just to help people port from gmem to
gslice, but nothing in this header actually requires gslice.h to be
included.
2011-09-18 22:07:18 -04:00
Ryan Lortie
e88a12caa0 Move deprecated GCompletion to deprecated/
Keep the docs for now, though.  We'll remove them after a few more
cycles.

https://bugzilla.gnome.org/show_bug.cgi?id=659427
2011-09-18 22:01:45 -04:00
Ryan Lortie
c3fc0c285f Move deprecated GRel to deprecated/
Keep the docs for now, though.  We'll remove them after a few more
cycles.

https://bugzilla.gnome.org/show_bug.cgi?id=659427
2011-09-18 22:01:37 -04:00
Ryan Lortie
a2ea02d01e Move GAllocator/GMemChunk to separate file
Create a deprecated/ directory that we can start moving ancient chunks
of code to.  Start with GAllocator, GMemChunk and related APIs.

Also drop all mention of them from the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=659427
2011-09-18 22:00:58 -04:00
Мирослав Николић
45d2ba8683 Updated Serbian translation 2011-09-19 03:07:41 +02:00
Matthias Clasen
1e82f73f8b Fix g_ascii_formatd tests
The test was not changing to the locales it was looping over.
2011-09-18 14:51:30 -04:00
Dan Winship
eb45a590fa gsocks5proxy, gsocks4aproxy: simplify some error messages
There's no need to include the exact max length in the error messages,
and it makes it look like the strings need to use ngettext() if you do.

https://bugzilla.gnome.org/show_bug.cgi?id=658206
2011-09-18 10:49:58 -04:00
Alexander Shopov
feafdad228 Updated Bulgarian translation 2011-09-18 08:38:01 +03:00
Matthias Clasen
e02b062635 Use xlocale functions where available
Implement g_ascii_strto{d,ll,ull} and g_ascii_formatd using
xlocale functions where available. This is slightly faster
and a lot less icky than our homegrown code.

https://bugzilla.gnome.org/show_bug.cgi?id=640293
2011-09-17 22:48:39 -04:00
Matthias Clasen
7b9571e4dd Remove redundant checks
g_set_error() handles error == NULL, so no need to check.
Patch by Ignacio Casal Quinteiro.

https://bugzilla.gnome.org/show_bug.cgi?id=640975
2011-09-17 20:28:17 -04:00
Matthias Clasen
f18eab2ac7 GMappedFile: return an error when trying to map a device
Previously, we were returning an empty buffer for all filenames
where fstat() gives a size of 0. But this is only appropriate
for regular files.

Also improve the documentation around this issue. Based on a
patch by Ryan Lortie.

Conflicts:

	glib/tests/mappedfile.c

https://bugzilla.gnome.org/show_bug.cgi?id=659212
2011-09-17 20:03:00 -04:00
Ryan Lortie
b83e0a39fb glib-compile-schemas: remove --uninstall option
This option does nothing as has been documented as "will be removed
soon" for the vast majority of its life.
2011-09-17 19:11:10 -04:00
Ryan Lortie
2c9c72dc8c GVariant: avoid 'ARRAY_INFO' as function name
Turns out that ARRAY_INFO isn't such a great name for a function since
Windows appears to declare this symbol these days.  Use a different
name.
2011-09-17 17:33:48 -04:00
Ryan Lortie
f202946146 gmain: fix some win32 build errors 2011-09-17 17:33:48 -04:00