Commit Graph

10669 Commits

Author SHA1 Message Date
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
Aron Xu
928ce3e5ef Update Simplified Chinese translation. 2011-09-17 16:18:03 +00:00
Мирослав Николић
a0eefd65bc Updated Serbian translation 2011-09-17 00:03:56 +02:00
Ryan Lortie
e2ae75ad4b gatomic: use pthread mutexes instead of GMutex
GStaticMutex makes use of atomic operations to initialise itself.  We
were using GStaticMutex from the emulated case of gatomic.  Use pthreads
directly to avoid unbounded recursion in this case.
2011-09-16 17:51:27 -04:00
David Zeuthen
48494dd552 gdbus-codegen: Support Ugly_Case for given C namespace
https://bugzilla.gnome.org/show_bug.cgi?id=658976

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 16:01:13 -04:00
David Zeuthen
c6c2c10946 gdbus-codegen: Single letter namespaces get dropped from symbol names
https://bugzilla.gnome.org/show_bug.cgi?id=659082

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 15:20:00 -04:00
Simon McVittie
e34e8a25a0 _g_dbus_worker_new: hold a ref until we have done the initial read
Otherwise, we could use-after-free the GDBusWorker, if its last-unref
is immediately after _g_dbus_worker_new returns (before the worker thread
does its initial read).

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=651268
Bug-NB: NB#271520
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 12:00:22 -04:00
Simon McVittie
698eeb3ef6 GDBusWorker: as a precaution, access 'stopped' boolean atomically
This member is written in _g_dbus_worker_stop from arbitrary threads, and
read by the worker thread, so it should be accessed atomically.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=651268
Bug-NB: NB#271520
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 12:00:22 -04:00
Simon McVittie
20497f7af9 Regression test for closing a stream, slowly, while a message is queued
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=651268
Bug-NB: NB#271520
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 12:00:22 -04:00
Simon McVittie
c180ea13ae GDBusWorker: annotate more functions with lock/pending state
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=651268
Bug-NB: NB#271520
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 12:00:22 -04:00
Simon McVittie
8097e2de85 GDBusConnection: delegate to the worker to close the stream
We can't safely close the output part of the I/O stream until any
pending write or flush has been completed. In the worst case, this could
lead to an assertion failure in the worker (when the close wins the
race) or not closing the stream at all (when the write wins the race).

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=651268
Bug-NB: NB#271520
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 12:00:22 -04:00
Simon McVittie
a8f75f21b4 GDBusWorker: combine num_writes_pending with flush_pending
num_writes_pending was a counter, but it only took values 0 or 1, so make
it a boolean: it would never make sense to be trying to write out two
messages at the same time (they'd get interleaved).

Similarly, we can never be writing and flushing at the same time (that'd
mean we were flushing halfway through a message, which would be pointless)
so combine it with flush_pending too, calling the result output_pending.

Also assert that it takes the expected value whenever we change it,
and document the locking discipline used for it, including a subtle
case in write_message_in_idle_cb where it's not obvious at first glance
why we don't need the lock.

(Having the combined boolean at the top of the block of write-related
struct members improves struct packing on 64-bit platforms, by packing
read_num_ancillary_messages and output_pending into one word.)

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=651268
Bug-NB: NB#271520
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-09-16 12:00:22 -04:00
Ryan Lortie
05ef173466 Disable two GDBus tests
These tests try to use GMainContext across fork() which now fails a lot
more violently than it used to.

See https://bugzilla.gnome.org/show_bug.cgi?id=658999 for information.
2011-09-16 11:18:26 -04:00
Murray Cumming
0bb01a150f Revert "Add g_memory_input_stream_new_from_data_full/add_data_full() apis"
I'm not sure that this API is right now that I try to use it.

This reverts commit 42738469d1.
2011-09-16 16:09:56 +02:00
Tristan Van Berkom
42738469d1 Add g_memory_input_stream_new_from_data_full/add_data_full() apis
Add an extra state pointer and an extra GDestroyNotify function
to the 'Chunk' definition... allowing bindings to attach some extra
state to memory chunks (to get memory management correctly from
language bindings).
Bug #589887
2011-09-16 15:37:06 +02:00
Behdad Esfahbod
b7051e8da8 Fix docs 2011-09-15 16:51:51 -04:00