Commit Graph

10952 Commits

Author SHA1 Message Date
Algimantas Margevičius
918954e089 Updated Lithuanian translation 2011-10-09 22:00:49 +03:00
Matthias Clasen
5e2764d70c Silence deprecation warnings in deprecated/
We know we are all deprecated here...
2011-10-09 09:57:13 -04:00
Matthias Clasen
ff2dafb209 Add G_GNUC_DEPRECATED to deprecated functions in gio 2011-10-08 23:49:04 -04:00
Matthias Clasen
93b3f6477e Add G_GNUC_DEPRECATED to deprecated functions in gobject 2011-10-08 23:23:43 -04:00
Matthias Clasen
f9b29ca034 Add G_GNUC_DEPRECATED to deprecated APIs in glib 2011-10-08 23:16:01 -04:00
Matthias Clasen
30b320b61c Add some GHookList tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
6109db27ae Test a few more GIOChannel functions 2011-10-08 19:02:06 -04:00
Matthias Clasen
d33f625444 Remove a bit of dead code 2011-10-08 19:02:06 -04:00
Matthias Clasen
b3ead3c998 Pass G_DEBUG=g-gc-friendly when running the tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
d5a1ca8fd7 Add some more GMarkup tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
08e17ae51b Call setlocale in markup-parse test
This is necessary to make utf-8 text come out properly.
2011-10-08 19:02:06 -04:00
Matthias Clasen
87cb246f46 Improve GNode test coverage 2011-10-08 19:02:05 -04:00
Matthias Clasen
dca6a601c1 Improve GCache test coverage 2011-10-08 19:02:05 -04:00
Matthias Clasen
eeedaac3e8 Improve coverage of string function tests 2011-10-08 19:02:05 -04:00
Matthias Clasen
944f66f38f Improve coverage of GHmac tests 2011-10-08 19:02:05 -04:00
Matthias Clasen
d9e9239a46 Add a test for g_date_time_new_from_timeval_utc 2011-10-08 19:02:05 -04:00
Antoine Jacoutot
c739a5df14 gio: enable test_peer regression test for OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=661255
2011-10-08 17:11:39 +02:00
David Zeuthen
3c4d3dec09 GDBusConnection: Make pending calls error when the connection is lost
If the connection to the bus is lost while a method call is ongoing,
the method call does not get cancelled. Instead it just sits around
until it times out.

This is visible here on XO laptops when stopping the display manager
during shutdown. imsettings starts sending a sync message to give up
its bus name (via g_bus_unown_name()), then systemd terminates the
session bus at approximately the same time. imsettings then hangs for
about 20 seconds before timing out the message.

 http://lists.freedesktop.org/archives/dbus/2011-September/014717.html

imsettings behaviour could be improved as described in that thread,
but I think this is a glib bug. I've also come up with the attached
patch which fixes it.

Credits for the bug-fix goes to Daniel Drake <dsd@laptop.org>. The test
case was written by David Zeuthen <zeuthen@gmail.com>.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-07 14:23:03 -04:00
John Ralls
edcac1ee41 Bug 661129: Duplicate symbols zero_thread and g_once_mutex on OSX 2011-10-07 09:51:12 -07:00
Dan Winship
59f1f54655 Add g_main_context_ref_thread_default()
Add g_main_context_ref_thread_default(), which always returns a
reffed GMainContext, rather than sometimes returning a (non-reffed)
GMainContext, and sometimes returning NULL. This simplifies the
bookkeeping in any code that needs to keep a reference to the
thread-default context for a while.

https://bugzilla.gnome.org/show_bug.cgi?id=660994
2011-10-07 10:14:34 -04:00
Daniel Mustieles
d91769b641 Updated Spanish translation 2011-10-07 10:14:10 +02:00
Matthias Clasen
97b0b36ae3 USE __COUNTER__ instead of __LINE__ when available
I've seen builds fail with

nm-connection.c:119:691: error: declaration of '_GStaticAssertCompileTimeAssertion_119' shadows a previous local [-Werror=shadow]

because several compile-time assertions ended up on the same
line. __COUNTER__ is meant specifically for the purpose of
constructing identifiers, so use it when available.
2011-10-07 01:19:15 -04:00
Matthias Clasen
c51fa1852d Don't redundantly redeclare
It makes gcc throw an error:

redundant redeclaration of 'g_static_mutex_get_mutex_impl' [-Werror=redundant-decls]
2011-10-07 00:42:52 -04:00
Ryan Lortie
e76927006a Move G_LOCK below GMutex in the docs
The flow is currently a bit wrong since G_LOCK makes reference to GMutex
which was not yet defined, so switch things around.
2011-10-06 12:24:21 -04:00
Ryan Lortie
761e75f849 .gitignore 2011-10-06 12:21:33 -04:00
Ryan Lortie
083812f854 Several docs cleanups 2011-10-06 12:19:58 -04:00
Ryan Lortie
94b7d2ee6c Cleanup thread documentation 2011-10-06 12:01:53 -04:00
Chun-wei Fan
49b93a0bba gobjet/gclosure.c: Fix styling issues
...so that it looks more consistent with the rest.
2011-10-06 16:02:18 +08:00
Chun-wei Fan
e80d8f0c23 gobject/gclosure.c: Add type cast for int_val = value
This will silence compiler warnings on Visual C++.

(Sorry for the bad fix just now.)
2011-10-06 15:37:52 +08:00
Chun-wei Fan
d77f65d24d Revert "gobject/gclosure.c: Made up for missed pointer deref"
This reverts commit d792a1ebe4.
2011-10-06 15:33:34 +08:00
Chun-wei Fan
d792a1ebe4 gobject/gclosure.c: Made up for missed pointer deref
The value parameter is a gpointer * (void **), but ffi_arg itself is not a
pointer type, so make up for dereference here.
2011-10-06 15:24:08 +08:00
Chun-wei Fan
ed03047a5b gthread-deprecated.c: Include gutils.h
This is needed for declaration of inline.
2011-10-06 15:12:22 +08:00
Chun-wei Fan
eb17516a67 config.h.win32(.in): Update for strcasecmp
Visual C++ uses _stricmp, which is identical to strcasecmp on gcc.
2011-10-06 15:03:30 +08:00
Matthias Clasen
3636cf2c64 Update threads docs for the demise of g_thread_init() 2011-10-05 22:43:22 -04:00
Matthias Clasen
47c7fa2ccd Remove mention of gthread-2.0.pc from 'Compiling' section
At the same time, add one or two other corrections.
2011-10-05 22:31:17 -04:00
Matthias Clasen
749758ec78 Add a warning to g_thread_init_with_errorcheck_mutexes
Should anybody try to use this, we should at least tell them that
its gone.
2011-10-05 22:23:25 -04:00
Dan Williams
8e82225aed closure: fix handling of ENUMs and integral return types on 64-bit BE platforms
enums are stored in v_long but need to be marshalled as signed
integers.  On platforms where int is 32 bits, taking the
address of v_long resulted in the wrong 32 bits being marshalled.
So we need to stuff the enum's int-sized value to a temporary
int-sized variable and marshall that instead.

Second, on return, libffi actually returns a pointer to a value
that's sized according to platform conventions, not according to
what the caller requested.  ie if ffi_type_sint was requested, the
value can still be a 64-bit sign-extended long on a 64-bit
architecture like PPC64, thus the caller cannot simply cast
the return value as a pointer to the desired type, but must cast
as a pointer to an integral type and then cast to the desired
type to remove any sign extension complications.

For more information on how to correctly handle libffi return
values, see the following bug, specifically comment 35:

https://bugzilla.redhat.com/show_bug.cgi?id=736489

"For 64-bit ABIs that extend integral returns types to 64-bits, libffi always
returns full 64-bit values that you can truncate in the calling code.   It's
just the way it is has always been.  Please don't change libffi.  I'll document
this clearly for the next version (perhaps there is a mention of this, I
haven't looked yet).

The same is true for returning 8-bit values, for instance, on 32-bit systems.
All ABIs extend those results to the full 32-bits so you need to provide a
properly aligned buffer that's big enough to hold the result."

https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-10-05 14:08:22 -05:00
Colin Walters
c3133affcd gmacros: Hide G_STATIC_ASSERT from g-ir-scanner
The C syntax here is twisted and confuses the scanner.  We don't
need to see it, so let's just skip it.

https://bugzilla.gnome.org/show_bug.cgi?id=660413
2011-10-05 13:39:30 -04:00
Ryan Lortie
9560423a6e Be sure to #include "gutils.h" in gbacktrace.c
0e3f530185 introduced a compiler warning
about implicit declaration of g_get_prgname().  Fix that.

Problem caught and fix suggested by Rico Tzschichholz.
2011-10-05 13:17:07 -04:00
David Zeuthen
f34908ef15 GDBus: Regenerate code when the codegen or options passed to it changes
https://bugzilla.gnome.org/show_bug.cgi?id=660498

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-05 12:42:06 -04:00
Dan Winship
7ca83c6c9f Fix up some doc comments that referred to threads not being enabled
(and a few other unrelated comment fixes)
2011-10-05 11:54:36 -04:00
David Zeuthen
af55ff5a2b GDBus: disable two more GDBus tests using fork()
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-05 10:56:11 -04:00
David Zeuthen
2b963266b6 GDBusProxy: Correctly handle unknown members when having an expected interface
Since it is valid for a D-Bus interface / service to add new methods,
signals or properties we must NEVER warn about unknown properties or
drop unknown signals or disallow unknown method invocations when we
have an expected interface.

So this means that the expected_interface machinery is only useful for
checking that the service didn't break ABI.

Also update the docs so it is clear exactly what it means to have an
expected interface.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-05 10:45:22 -04:00
Dan Winship
2f48b4b7fb gthreadedresolver: remove a bit of cruft
Remove a test that only made sense when GThreadedResolver was the base
class for the two non-threaded resolver classes that no longer exist.
2011-10-05 08:36:03 -04:00
Matthias Clasen
0e3f530185 Remove cruft from g_strerror and g_strsignal
We can just assume that strerror/strsignal are available
nowadays. At the same time, drop use of thread-private storage.
Instead, always return interned strings.

https://bugzilla.gnome.org/show_bug.cgi?id=660849
2011-10-05 01:12:53 -04:00
Matthias Clasen
5fef796126 Misc test coverage improvements
https://bugzilla.gnome.org/show_bug.cgi?id=660849
2011-10-05 01:12:52 -04:00
Matthias Clasen
ddbd4acdfb Need to check for prlimit 2011-10-05 01:04:02 -04:00
Matthias Clasen
ea4bc6008f Add a test for thread creation failure 2011-10-05 00:28:53 -04:00
Ryan Lortie
08a6d81231 gthread.h: a bunch of pointless whitespace changes
Make it look pretty.
2011-10-04 20:33:58 -04:00
Ryan Lortie
674543d091 Move typedef GStaticPrivate to deprecated/
This was missed in the earlier move.
2011-10-04 20:33:58 -04:00