platform/upstream/glib.git
12 years agoCombine g_sytem_thread_{new,create}()
Ryan Lortie [Thu, 13 Oct 2011 02:29:13 +0000 (22:29 -0400)]
Combine g_sytem_thread_{new,create}()

12 years agog_system_thread_create: drop 'data' arg
Ryan Lortie [Thu, 13 Oct 2011 02:23:12 +0000 (22:23 -0400)]
g_system_thread_create: drop 'data' arg

Since it's now always the same as the 'thread' arg.

12 years agog_system_thread_create: SystemThread -> RealThread
Ryan Lortie [Thu, 13 Oct 2011 02:19:28 +0000 (22:19 -0400)]
g_system_thread_create: SystemThread -> RealThread

Just like g_system_thread_wait().

12 years agoMove more docs inline
Matthias Clasen [Thu, 13 Oct 2011 02:29:18 +0000 (22:29 -0400)]
Move more docs inline

12 years agog_system_thread_join: rename to _wait()
Ryan Lortie [Thu, 13 Oct 2011 02:15:46 +0000 (22:15 -0400)]
g_system_thread_join: rename to _wait()

12 years agog_system_thread_join: take GRealThread *
Ryan Lortie [Thu, 13 Oct 2011 02:14:38 +0000 (22:14 -0400)]
g_system_thread_join: take GRealThread *

Make g_system_thread_join take the GRealThread* instead of a
GSystemThread.

12 years agothread: delegate allocation of GThread to backends
Ryan Lortie [Thu, 13 Oct 2011 02:03:14 +0000 (22:03 -0400)]
thread: delegate allocation of GThread to backends

Add g_system_thread_new() and g_system_thread_free(), implemented with
GSlice.  Use those instead of g_new() and g_free().

Presently, the backends are both doing the same thing.  This will change
soon.

12 years agoMove GScanner docs inline
Matthias Clasen [Thu, 13 Oct 2011 01:48:34 +0000 (21:48 -0400)]
Move GScanner docs inline

12 years agothread: stop sharing g_once_mutex
Ryan Lortie [Thu, 13 Oct 2011 01:47:25 +0000 (21:47 -0400)]
thread: stop sharing g_once_mutex

Unrelated code shouldn't be sharing the same mutex for no good reason --
particularly not across a file boundary.

12 years agothread: drop thread setup function hackery
Ryan Lortie [Thu, 13 Oct 2011 01:44:07 +0000 (21:44 -0400)]
thread: drop thread setup function hackery

Use a custom proxy function for the deprecated case instead.

Now GRealThread has strictly zero members dedicated to deprecated
functionality.

12 years agoDeprecate GCache
Matthias Clasen [Wed, 12 Oct 2011 23:55:02 +0000 (19:55 -0400)]
Deprecate GCache

Ryan said it would be 'deprecated soon in GLib', when he removed
the use of this in GTK+. That was a year ago, so its about time
we act on it.

12 years agothread: Delete g_system_thread_self()
Ryan Lortie [Wed, 12 Oct 2011 22:35:45 +0000 (18:35 -0400)]
thread: Delete g_system_thread_self()

It's no longer used for anything at all.

12 years agothread: reduce use of system_thread
Ryan Lortie [Wed, 12 Oct 2011 22:33:07 +0000 (18:33 -0400)]
thread: reduce use of system_thread

The use of system_thread is now limited to joining.  We don't do that
for threads that we didn't create for ourselves, so we don't need to
call g_system_thread_self() to fill in system_thread for those.

12 years agothread: hide g_static_rec_mutex_get_rec_mutex_impl
Ryan Lortie [Wed, 12 Oct 2011 22:27:06 +0000 (18:27 -0400)]
thread: hide g_static_rec_mutex_get_rec_mutex_impl

Unlike with GStaticMutex, this function was never part of the pre-2.32
ABI, so we should keep it tucked in.

12 years agomissed from last commit
Ryan Lortie [Wed, 12 Oct 2011 22:25:40 +0000 (18:25 -0400)]
missed from last commit

12 years agothread: remove GSystemThread assign/equal
Ryan Lortie [Wed, 12 Oct 2011 22:24:48 +0000 (18:24 -0400)]
thread: remove GSystemThread assign/equal

These are no longer in use.

12 years agothread: remove dead decl from gthreadprivate.h
Ryan Lortie [Wed, 12 Oct 2011 22:23:20 +0000 (18:23 -0400)]
thread: remove dead decl from gthreadprivate.h

This function hasn't existed for a while...

12 years agothread: Remove the zero_thread
Ryan Lortie [Wed, 12 Oct 2011 22:22:31 +0000 (18:22 -0400)]
thread: Remove the zero_thread

This was only used for redundant assertion checks.

12 years agoGStaticRecMutex: implement via GRecMutex
Ryan Lortie [Tue, 11 Oct 2011 15:08:48 +0000 (11:08 -0400)]
GStaticRecMutex: implement via GRecMutex

Instead of doing our own hacked-up version.

This also reduces use of GSystemThread.

12 years agothread: use GSList for g_thread_foreach list
Ryan Lortie [Wed, 12 Oct 2011 21:01:33 +0000 (17:01 -0400)]
thread: use GSList for g_thread_foreach list

...instead of having a 'next' pointer in the GThread struct.

Now GThread contains no fields used only by deprecated code (except for
the rather generic setup function field).

12 years agothread: call g_enumerable_thread_add via callback
Ryan Lortie [Wed, 12 Oct 2011 20:50:43 +0000 (16:50 -0400)]
thread: call g_enumerable_thread_add via callback

There are no longer any functions defined in gthread-deprecated.c called
from gthread.c.

12 years agothread: use GPrivate for enumerable threads
Ryan Lortie [Wed, 12 Oct 2011 20:26:39 +0000 (16:26 -0400)]
thread: use GPrivate for enumerable threads

Use a GPrivate to track the destruction of enumerable threads and remove
them from the list.

12 years agogvariant: Doc typo fix
Colin Walters [Wed, 12 Oct 2011 19:25:12 +0000 (15:25 -0400)]
gvariant: Doc typo fix

12 years agogvariant: Briefly mention limits
Colin Walters [Wed, 12 Oct 2011 19:22:09 +0000 (15:22 -0400)]
gvariant: Briefly mention limits

12 years agogthread-deprecated: add a mising "static" to a method
Dan Winship [Wed, 12 Oct 2011 17:59:33 +0000 (13:59 -0400)]
gthread-deprecated: add a mising "static" to a method

12 years agogiomodule: make the default_modules mutex recursive
Dan Winship [Wed, 12 Oct 2011 17:57:44 +0000 (13:57 -0400)]
giomodule: make the default_modules mutex recursive

It is possible for _g_io_module_get_default() to be called recursively
(eg, if a module of one type is loaded that tries to look up gsettings
from its init() method and ends up causing the gsettings module to be
loaded). So use a recursive mutex.

12 years agoSimplify checks for CLOCK_MONOTONIC
Dan Winship [Tue, 11 Oct 2011 19:38:37 +0000 (15:38 -0400)]
Simplify checks for CLOCK_MONOTONIC

Remove the complicated configure-time and runtime checks, and just use
CLOCK_MONOTONIC if it's defined.

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

12 years agoDisable deprecations where appropriate in tests
Matthias Clasen [Wed, 12 Oct 2011 04:37:02 +0000 (00:37 -0400)]
Disable deprecations where appropriate in tests

12 years agoDisable deprecations where appropriate in tests
Matthias Clasen [Wed, 12 Oct 2011 04:37:02 +0000 (00:37 -0400)]
Disable deprecations where appropriate in tests

12 years agoMake single includes mandatory
Matthias Clasen [Wed, 12 Oct 2011 04:24:46 +0000 (00:24 -0400)]
Make single includes mandatory

This has been the official line since 2.17, which seems plenty
long enough for a transition phase.

12 years agoGStaticPrivate: implement via GPrivate
Ryan Lortie [Wed, 12 Oct 2011 03:13:22 +0000 (23:13 -0400)]
GStaticPrivate: implement via GPrivate

Thanks to the modifications in 3d4846d92309d001697c2827660fa41b5c63dbc4,
GStaticPrivate is not so directly tied in with GThread anymore.  It is
now a simple matter to cut it out completely by using a GPrivate to
store the GArray instead of storing it in the GThread.

12 years agoUpdate deprecation docs
Matthias Clasen [Wed, 12 Oct 2011 03:50:34 +0000 (23:50 -0400)]
Update deprecation docs

12 years agoSilence deprecations in deprecated/ (again)
Matthias Clasen [Wed, 12 Oct 2011 03:44:43 +0000 (23:44 -0400)]
Silence deprecations in deprecated/ (again)

12 years agoUpdate VS projects
Chun-wei Fan [Wed, 12 Oct 2011 03:23:49 +0000 (11:23 +0800)]
Update VS projects

Get rid of _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS
from the preprocessor definitions as those two macros are now defined
in msvc_recommended_pragmas.h, which is force-included in these projects
via the property sheets.  This will silence C4005 warnings on macro
redefinition.

12 years agoBug 661438: Update msvc_recommended_pragmas.h
Chun-wei Fan [Wed, 12 Oct 2011 02:53:30 +0000 (10:53 +0800)]
Bug 661438: Update msvc_recommended_pragmas.h

Don't disable warning C4996 as that is the Visual C++ warning triggered by
__declspec(deprecated) and __declspec(deprecated('..."))-disabling that
warning will defeat the purpose of G_DPRECATED/G_DEPRECATED_FOR.

For people who don't want to see the GLib deprecation warnings during GLib
compilation, define GLIB_DISABLE_DEPRECATION_WARNINGS in the projects or
property sheet.

12 years agoBug 661438: Fix up gmacros.h a bit
Chun-wei Fan [Wed, 12 Oct 2011 02:38:47 +0000 (10:38 +0800)]
Bug 661438: Fix up gmacros.h a bit

The macro here should be G_DEPRECATED, not G_GNUC_DEPRECATED.

12 years agoUpdate VS property sheets
Chun-wei Fan [Wed, 12 Oct 2011 02:37:24 +0000 (10:37 +0800)]
Update VS property sheets

Missed the new glib/gstringchunk.h header that needed to be installed as
well.

12 years agog_time_val_from_iso8601: clarify the docs a bit
Dan Winship [Tue, 11 Oct 2011 23:28:59 +0000 (19:28 -0400)]
g_time_val_from_iso8601: clarify the docs a bit

12 years agogmain: use GPrivate instead of GStaticPrivate
Ryan Lortie [Tue, 11 Oct 2011 22:39:57 +0000 (18:39 -0400)]
gmain: use GPrivate instead of GStaticPrivate

12 years agoFix two tests for G_DEBUG=gc-friendly
Dan Winship [Tue, 11 Oct 2011 19:36:42 +0000 (15:36 -0400)]
Fix two tests for G_DEBUG=gc-friendly

12 years agoUse GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headers
Chun-wei Fan [Tue, 11 Oct 2011 06:34:59 +0000 (14:34 +0800)]
Use GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headers

This will let others opt out of seeing GLib deprecation warnings
by defining GLIB_DISABLE_DEPRECATION_WARNINGS.

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

12 years agoAdd our own deprecation macros
Matthias Clasen [Tue, 11 Oct 2011 17:33:07 +0000 (13:33 -0400)]
Add our own deprecation macros

This will allow to suppress deprecation warnings on a per-module
basis, if needed. They are on by default now, though.

12 years agoAdd better deprecation macros
Matthias Clasen [Tue, 11 Oct 2011 17:06:58 +0000 (13:06 -0400)]
Add better deprecation macros

Unlike G_GNUC_... macros, the new G_DEPRECATED[_FOR] are
meant as abstractions that work with different compilers.
Using a new name also lets us restrict it to 'must be placed
before the declaration', which works with more compilers.

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

12 years agoUpdate VS property sheets
Chun-wei Fan [Tue, 11 Oct 2011 10:04:07 +0000 (18:04 +0800)]
Update VS property sheets

Copy the deprecated headers in their appropriate places.

12 years agoglibconfig.win32(.in): Cleanup cruft
Chun-wei Fan [Tue, 11 Oct 2011 06:19:02 +0000 (14:19 +0800)]
glibconfig.win32(.in): Cleanup cruft

The definitions of _GMutex* and G_STATIC_MUTEX_INIT is now found in
glib/deprecated/gthread.h, and should no longer be in the mainline
code, so remove them from here.

12 years agoGStaticMutex: ABI fixup
Ryan Lortie [Mon, 10 Oct 2011 17:13:31 +0000 (13:13 -0400)]
GStaticMutex: ABI fixup

Everything was OK as long as GMutex was backed by pthread_mutex_t on
POSIX.  Since this is no longer the case, the ABI of GStaticMutex was
broken.

Fix that up by using pthread_mutex_t directly in the structure.  Since
that's potentially incompatible with our GMutex implementation, set
g_thread_use_default_impl to FALSE to cause the fallback code (which
manually allocates a GMutex) to run, even in the case of
already-existing code (without the need for a recompile).  This will
cause the pthread_mutex_t part of the struct to be completely ignored.

12 years agoCompile private test with -pthread on UNIX
Matthias Clasen [Mon, 10 Oct 2011 15:10:20 +0000 (11:10 -0400)]
Compile private test with -pthread on UNIX

We are using explicit pthread calls here, so we should
use the right linker flags for that.

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

12 years agoDon't use deprecated GThread API in gio tests
Matthias Clasen [Mon, 10 Oct 2011 13:49:50 +0000 (09:49 -0400)]
Don't use deprecated GThread API in gio tests

12 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Mon, 10 Oct 2011 05:53:16 +0000 (07:53 +0200)]
Updated Norwegian bokmål translation

12 years agoUpdated Lithuanian translation
Algimantas Margevičius [Sun, 9 Oct 2011 19:00:49 +0000 (22:00 +0300)]
Updated Lithuanian translation

12 years agoSilence deprecation warnings in deprecated/
Matthias Clasen [Sun, 9 Oct 2011 13:57:13 +0000 (09:57 -0400)]
Silence deprecation warnings in deprecated/

We know we are all deprecated here...

12 years agoAdd G_GNUC_DEPRECATED to deprecated functions in gio
Matthias Clasen [Sun, 9 Oct 2011 03:49:04 +0000 (23:49 -0400)]
Add G_GNUC_DEPRECATED to deprecated functions in gio

12 years agoAdd G_GNUC_DEPRECATED to deprecated functions in gobject
Matthias Clasen [Sun, 9 Oct 2011 03:23:43 +0000 (23:23 -0400)]
Add G_GNUC_DEPRECATED to deprecated functions in gobject

12 years agoAdd G_GNUC_DEPRECATED to deprecated APIs in glib
Matthias Clasen [Sun, 9 Oct 2011 03:16:01 +0000 (23:16 -0400)]
Add G_GNUC_DEPRECATED to deprecated APIs in glib

12 years agoAdd some GHookList tests
Matthias Clasen [Sat, 8 Oct 2011 16:43:12 +0000 (12:43 -0400)]
Add some GHookList tests

12 years agoTest a few more GIOChannel functions
Matthias Clasen [Sat, 8 Oct 2011 16:42:41 +0000 (12:42 -0400)]
Test a few more GIOChannel functions

12 years agoRemove a bit of dead code
Matthias Clasen [Sat, 8 Oct 2011 16:42:06 +0000 (12:42 -0400)]
Remove a bit of dead code

12 years agoPass G_DEBUG=g-gc-friendly when running the tests
Matthias Clasen [Sat, 8 Oct 2011 16:41:38 +0000 (12:41 -0400)]
Pass G_DEBUG=g-gc-friendly when running the tests

12 years agoAdd some more GMarkup tests
Matthias Clasen [Thu, 6 Oct 2011 13:01:24 +0000 (09:01 -0400)]
Add some more GMarkup tests

12 years agoCall setlocale in markup-parse test
Matthias Clasen [Thu, 6 Oct 2011 12:59:51 +0000 (08:59 -0400)]
Call setlocale in markup-parse test

This is necessary to make utf-8 text come out properly.

12 years agoImprove GNode test coverage
Matthias Clasen [Thu, 6 Oct 2011 03:36:35 +0000 (23:36 -0400)]
Improve GNode test coverage

12 years agoImprove GCache test coverage
Matthias Clasen [Thu, 6 Oct 2011 03:31:14 +0000 (23:31 -0400)]
Improve GCache test coverage

12 years agoImprove coverage of string function tests
Matthias Clasen [Thu, 6 Oct 2011 03:24:27 +0000 (23:24 -0400)]
Improve coverage of string function tests

12 years agoImprove coverage of GHmac tests
Matthias Clasen [Thu, 6 Oct 2011 03:24:08 +0000 (23:24 -0400)]
Improve coverage of GHmac tests

12 years agoAdd a test for g_date_time_new_from_timeval_utc
Matthias Clasen [Thu, 6 Oct 2011 03:00:09 +0000 (23:00 -0400)]
Add a test for g_date_time_new_from_timeval_utc

12 years agogio: enable test_peer regression test for OpenBSD
Antoine Jacoutot [Sat, 8 Oct 2011 09:47:20 +0000 (11:47 +0200)]
gio: enable test_peer regression test for OpenBSD

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

12 years agoGDBusConnection: Make pending calls error when the connection is lost
David Zeuthen [Fri, 7 Oct 2011 18:20:03 +0000 (14:20 -0400)]
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>
12 years agoBug 661129: Duplicate symbols zero_thread and g_once_mutex on OSX
John Ralls [Fri, 7 Oct 2011 16:51:04 +0000 (09:51 -0700)]
Bug 661129: Duplicate symbols zero_thread and g_once_mutex on OSX

12 years agoAdd g_main_context_ref_thread_default()
Dan Winship [Wed, 5 Oct 2011 14:46:57 +0000 (10:46 -0400)]
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

12 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 7 Oct 2011 08:14:10 +0000 (10:14 +0200)]
Updated Spanish translation

12 years agoUSE __COUNTER__ instead of __LINE__ when available
Matthias Clasen [Fri, 7 Oct 2011 05:19:15 +0000 (01:19 -0400)]
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.

12 years agoDon't redundantly redeclare
Matthias Clasen [Fri, 7 Oct 2011 04:42:52 +0000 (00:42 -0400)]
Don't redundantly redeclare

It makes gcc throw an error:

redundant redeclaration of 'g_static_mutex_get_mutex_impl' [-Werror=redundant-decls]

12 years agoMove G_LOCK below GMutex in the docs
Ryan Lortie [Thu, 6 Oct 2011 16:24:21 +0000 (12:24 -0400)]
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.

12 years ago.gitignore
Ryan Lortie [Thu, 6 Oct 2011 16:21:33 +0000 (12:21 -0400)]
.gitignore

12 years agoSeveral docs cleanups
Ryan Lortie [Thu, 6 Oct 2011 16:19:58 +0000 (12:19 -0400)]
Several docs cleanups

12 years agoCleanup thread documentation
Ryan Lortie [Thu, 6 Oct 2011 16:01:53 +0000 (12:01 -0400)]
Cleanup thread documentation

12 years agogobjet/gclosure.c: Fix styling issues
Chun-wei Fan [Thu, 6 Oct 2011 08:02:18 +0000 (16:02 +0800)]
gobjet/gclosure.c: Fix styling issues

...so that it looks more consistent with the rest.

12 years agogobject/gclosure.c: Add type cast for int_val = value
Chun-wei Fan [Thu, 6 Oct 2011 07:37:52 +0000 (15:37 +0800)]
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.)

12 years agoRevert "gobject/gclosure.c: Made up for missed pointer deref"
Chun-wei Fan [Thu, 6 Oct 2011 07:33:34 +0000 (15:33 +0800)]
Revert "gobject/gclosure.c: Made up for missed pointer deref"

This reverts commit d792a1ebe445cfab942ee9e079daa3b87bd60304.

12 years agogobject/gclosure.c: Made up for missed pointer deref
Chun-wei Fan [Thu, 6 Oct 2011 07:24:08 +0000 (15:24 +0800)]
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.

12 years agogthread-deprecated.c: Include gutils.h
Chun-wei Fan [Thu, 6 Oct 2011 07:12:22 +0000 (15:12 +0800)]
gthread-deprecated.c: Include gutils.h

This is needed for declaration of inline.

12 years agoconfig.h.win32(.in): Update for strcasecmp
Chun-wei Fan [Thu, 6 Oct 2011 07:02:54 +0000 (15:02 +0800)]
config.h.win32(.in): Update for strcasecmp

Visual C++ uses _stricmp, which is identical to strcasecmp on gcc.

12 years agoUpdate threads docs for the demise of g_thread_init()
Matthias Clasen [Thu, 6 Oct 2011 02:43:22 +0000 (22:43 -0400)]
Update threads docs for the demise of g_thread_init()

12 years agoRemove mention of gthread-2.0.pc from 'Compiling' section
Matthias Clasen [Thu, 6 Oct 2011 02:31:17 +0000 (22:31 -0400)]
Remove mention of gthread-2.0.pc from 'Compiling' section

At the same time, add one or two other corrections.

12 years agoAdd a warning to g_thread_init_with_errorcheck_mutexes
Matthias Clasen [Thu, 6 Oct 2011 02:23:25 +0000 (22:23 -0400)]
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.

12 years agoclosure: fix handling of ENUMs and integral return types on 64-bit BE platforms
Dan Williams [Fri, 23 Sep 2011 17:32:23 +0000 (12:32 -0500)]
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

12 years agogmacros: Hide G_STATIC_ASSERT from g-ir-scanner
Colin Walters [Wed, 5 Oct 2011 15:27:45 +0000 (11:27 -0400)]
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

12 years agoBe sure to #include "gutils.h" in gbacktrace.c
Ryan Lortie [Wed, 5 Oct 2011 17:16:05 +0000 (13:16 -0400)]
Be sure to #include "gutils.h" in gbacktrace.c

0e3f530185d494dbb9db1b47f72f10f3ae598564 introduced a compiler warning
about implicit declaration of g_get_prgname().  Fix that.

Problem caught and fix suggested by Rico Tzschichholz.

12 years agoGDBus: Regenerate code when the codegen or options passed to it changes
David Zeuthen [Wed, 5 Oct 2011 16:33:55 +0000 (12:33 -0400)]
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>
12 years agoFix up some doc comments that referred to threads not being enabled
Dan Winship [Wed, 5 Oct 2011 15:45:51 +0000 (11:45 -0400)]
Fix up some doc comments that referred to threads not being enabled

(and a few other unrelated comment fixes)

12 years agoGDBus: disable two more GDBus tests using fork()
David Zeuthen [Wed, 5 Oct 2011 14:56:11 +0000 (10:56 -0400)]
GDBus: disable two more GDBus tests using fork()

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoGDBusProxy: Correctly handle unknown members when having an expected interface
David Zeuthen [Tue, 4 Oct 2011 15:37:16 +0000 (11:37 -0400)]
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>
12 years agogthreadedresolver: remove a bit of cruft
Dan Winship [Wed, 5 Oct 2011 12:36:03 +0000 (08:36 -0400)]
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.

12 years agoRemove cruft from g_strerror and g_strsignal
Matthias Clasen [Tue, 4 Oct 2011 05:25:26 +0000 (01:25 -0400)]
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

12 years agoMisc test coverage improvements
Matthias Clasen [Wed, 5 Oct 2011 05:04:42 +0000 (01:04 -0400)]
Misc test coverage improvements

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

12 years agoNeed to check for prlimit
Matthias Clasen [Wed, 5 Oct 2011 05:04:02 +0000 (01:04 -0400)]
Need to check for prlimit

12 years agoAdd a test for thread creation failure
Matthias Clasen [Wed, 5 Oct 2011 04:28:53 +0000 (00:28 -0400)]
Add a test for thread creation failure

12 years agogthread.h: a bunch of pointless whitespace changes
Ryan Lortie [Wed, 5 Oct 2011 00:31:33 +0000 (20:31 -0400)]
gthread.h: a bunch of pointless whitespace changes

Make it look pretty.

12 years agoMove typedef GStaticPrivate to deprecated/
Ryan Lortie [Wed, 5 Oct 2011 00:23:20 +0000 (20:23 -0400)]
Move typedef GStaticPrivate to deprecated/

This was missed in the earlier move.

12 years agoDeprecate g_{mutex,cond}_{new,free}()
Ryan Lortie [Tue, 4 Oct 2011 23:09:43 +0000 (19:09 -0400)]
Deprecate g_{mutex,cond}_{new,free}()

Now that we have _init() and _clear(), these old calls are no longer
useful.

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