Commit Graph

10831 Commits

Author SHA1 Message Date
Edward Sheldrake
5b2c809dda Add another mimeapps test
This tests the interaction between mimeinfo.cache, defaults.list and
mimeapps.list to ensure g_app_info_set_as_last_used_for_type doesn't
incorrectly change the default.

https://bugzilla.gnome.org/show_bug.cgi?id=658188
2011-09-26 16:54:23 -04:00
Dan Winship
eba49a4f7f g_simple_async_result_complete_in_idle: add a minor doc clarification 2011-09-26 12:43:08 -04:00
Ryan Lortie
6bd959b727 glib tests: Compile new thread tests on win32
They accidentally got added inside of a 'if OS_UNIX'.  Move them out.
2011-09-26 09:05:53 -04:00
Ryan Lortie
fdc594e963 winxp threads: detect SRWLock emulation reentrancy
We lack SRWLock on Windows XP, so we use CRITICAL_SECTION to emulate it
there.  SRWLock is non-recursive, but CRITICAL_SECTION will happily
allow itself to be acquired multiple times by the same thread.

We need to detect if our second acquire succeeded because of the
recursive nature of CRITICAL_SECTION.  In the case of a _lock()
operation, we would normally have deadlocked, so abort.  In the case of
a _trylock() operation, we need to ensure that FALSE is properly
returned.

Problem caught by Matthias Clasen and Chun-wei Fan.

https://bugzilla.gnome.org/show_bug.cgi?id=660096
2011-09-26 08:54:51 -04:00
Carles Ferrando
5ef7b964e5 [l10n]Updated Catalan (Valencian) translation 2011-09-26 14:40:23 +02:00
Petr Kovar
f032536416 Update Czech translation 2011-09-25 23:36:13 +02:00
Gil Forcada
31ddbd688a [l10n]Updated Catalan translation 2011-09-25 23:12:53 +02:00
Stef Walter
5a95e19a46 gvariant: Add g_variant_get_fixed_array()
Using g_variant_new_from_data() for creating new byte arrays is non-obvious.
This patch adds a g_variant_new_fixed_array() function.

https://bugzilla.gnome.org/show_bug.cgi?id=659923
2011-09-25 07:57:26 +02:00
Matthias Clasen
81e395b00b More GThread docs tweaks 2011-09-25 01:32:41 -04:00
Matthias Clasen
900c467fd0 Move GThread docs around 2011-09-25 01:01:00 -04:00
Matthias Clasen
db04f59780 Move includes to the top of the file 2011-09-25 01:01:00 -04:00
Matthias Clasen
0ea89987e2 Move deprecated GThread functions to a separate file 2011-09-25 01:01:00 -04:00
Matthias Clasen
e34861da08 GThread: more doc updates 2011-09-25 01:01:00 -04:00
Matthias Clasen
4e44e23517 Drop G_THREADS_IMPL_NONE from the docs
GLib can no longer be built without thread support.
2011-09-25 01:00:59 -04:00
Chun-wei Fan
8f340e2d75 Fix warning/error C4013 (implicit declarations)
-Include gthread.h in gregex.c as g_once_init_enter and g_once_init_leave
 are used.
-Define prototype for g_thread_DllMain in gthreadprivate.h for Windows
2011-09-25 09:07:59 +08:00
Chun-wei Fan
2b391940c0 gthread.c: Declare variable at start of block
This is so that C89 compilers will not complain.
2011-09-25 09:07:37 +08:00
Matthias Clasen
a485a0e565 Document G_THREADS_IMPL_WIN32 2011-09-24 19:04:46 -04:00
Matthias Clasen
d6b0af99d7 GThread doc additions 2011-09-24 19:01:02 -04:00
Matthias Clasen
df9e5c2435 Fix an uninialized variable warning 2011-09-24 19:01:02 -04:00
Peter Mráz
ef883fd0dc Updated Slovak translation 2011-09-24 21:52:10 +02:00
Kenneth Nielsen
aeee16e4a3 Updated Danish translation 2011-09-24 14:42:07 +02:00
Matthias Clasen
cf9623767a Add a testcase for bug 659866
Mere inclusion of glib headers should not require you to define
any XYZ_SOURCE macros.
2011-09-24 00:39:59 -04:00
Matthias Clasen
e1f68c1292 Add a test for GCond 2011-09-23 23:38:26 -04:00
Matthias Clasen
a118313599 Add a nontrivial read-write lock test 2011-09-23 22:07:32 -04:00
Matthias Clasen
158a0366be Add GOnce tests 2011-09-23 21:19:53 -04:00
Matthias Clasen
dd002113f1 Make the rec mutex test a little more verbose 2011-09-23 21:11:10 -04:00
Dan Winship
bec571dc79 giostream: "closed" property should not be marked writable
https://bugzilla.gnome.org/show_bug.cgi?id=659920
2011-09-23 08:53:47 -04:00
Dan Winship
7aa824da6e gio-2.0.pc.in: drop stray reference to libasyncns
gio-2.0.pc's Libs.private was still using @LIBASYNCNS_LIBADD@, which
was no longer being substituted to anything and so broke "pkg-config
--static". Fix it to be @NETWORK_LIBS@ instead.

https://bugzilla.gnome.org/show_bug.cgi?id=659889
2011-09-23 07:50:11 -04:00
Matthias Clasen
cf020d8250 Add a non-trivial GRWLock test
This one tests that the writer lock behaves like a mutex.
Adapted from the corresponding test in GMutex.
2011-09-23 07:25:07 -04:00
Matthias Clasen
0a9885ebd8 Add a non-trivial GRecMutex test
Adapted from the corresponding GMutex test.
2011-09-23 07:25:07 -04:00
Matthias Clasen
de39df9dc1 Remove an unused variable 2011-09-23 07:25:06 -04:00
Manoj Kumar Giri
16086900af Updated Oriya Translation 2011-09-23 16:23:44 +05:30
Matthias Clasen
798a7d5abe Add some more rw lock tests
These test some simple mixed reader/writer api usage.
2011-09-23 06:31:59 -04:00
Matthias Clasen
81b3708184 Add a mutex test
This tests that mutexes do what they are supposed to do.
Copied from a similar test for bitlocks in gthread/tests/bitlock.c.
2011-09-23 06:31:59 -04:00
Yaron Shahrabani
bcd02d7a75 Updated Hebrew translation 2011-09-23 08:23:25 +03:00
Matthias Clasen
4f3026ea23 Add headers 2011-09-22 22:45:47 -04:00
Matthias Clasen
d4d203e3cb Fix g_rwlock_{writer,reader}_trylock 2011-09-22 22:45:47 -04:00
Matthias Clasen
ff13913537 Add basic tests for GRWLock
Just basic api usage, no functional test cases yet.
2011-09-22 22:45:47 -04:00
Chun-wei Fan
b2717740a2 VS support updates
-Fix GLib project/filter files generation as some source items are under
 the "deprecated" subfolder, and filter out the gthread-*.c
-Explicitly specify gthread-win32.c in the GLib project/filter file
 templates, since tarballs are done on Linux.
-Don't define g_static_mutex_get_mutex in the pregenerated
 glibconfig.h.win32(.in) as it is defined in deprecated/gthread.h for Windows
2011-09-23 10:48:25 +08:00
Matthias Clasen
9de564bf1f Fix g_rec_mutex_trylock 2011-09-22 21:58:55 -04:00
Matthias Clasen
295af777e4 Add trivial tests for GMutex and GRecMutex
Not testing any mutual exclusion with threads yet, just
basic api use. This is already enough to reveal g_rec_mutex_trylock
as broken...
2011-09-22 21:58:54 -04:00
Chun-wei Fan
9958909fb2 gmappedfile.c: Define S_IFREG on Win32 when it's not available
Make a workaround for S_IFREG in gmappedfile.c on Windows as it may not be
available for a given compiler on that platform
2011-09-23 09:36:37 +08:00
Colin Walters
f42fe6cdc0 gvalue: Add explicitly signed g_value_get_schar() and g_value_set_schar()
The documentation for G_TYPE_CHAR says:

"The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed
 integer."

However the return value for g_value_get_char() was just "char" which
in C has an unspecified signedness; on e.g. x86 it's signed (which
matches the GType), but on e.g. PowerPC or ARM, it's not.

We can't break the old API, so we need to suck it up and add new API.
Port most internal users, but keep some tests of the old API too.

https://bugzilla.gnome.org/show_bug.cgi?id=659870
2011-09-22 20:05:38 -04:00
Colin Walters
1df8160fa6 tests: Add a some torture test cases for the generic marshaller
In particular this has a test case for a G_TYPE_ENUM which we were
running into a failure on ppc64.

https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-09-22 18:51:43 -04:00
Ryan Lortie
c59846086b Add gthread.h to deprecated headers
...not deprecated sources
2011-09-22 13:48:00 -04:00
Emmanuele Bassi
8e716cbb49 Fix annotations for source/target in g_object_bind_property_*
We use gpointer for convience of the C API users, but introspection
users will not like it.

https://bugzilla.gnome.org/show_bug.cgi?id=659838
2011-09-22 17:17:54 +01:00
Manoj Kumar Giri
35829d28b9 Updated Oriya Translation 2011-09-22 19:46:01 +05:30
Matthias Clasen
558955dd85 Some gthread doc updates
Marking things as deprecated, mostly.
2011-09-22 01:16:41 -04:00
Matthias Clasen
cedc82290f Use adaptive mutexes when available
These are supposedly better on multi-cpu systems - and who doesn't
have multiple cpus nowadays. One single-processor systems, they
are identical to normal mutexes.
See e.g. http://bugzilla.mozilla.org/show_bug.cgi?id=132089

https://bugzilla.gnome.org/show_bug.cgi?id=659423
2011-09-22 00:54:34 -04:00
Ryan Lortie
19e7026fe7 GDateTime test: fix a race
We have a GDateTime test that compares the time now (as per the libc) to
the time now (as per GDateTime).  The problem is that the time could
change between those two "now"s.
2011-09-21 20:23:03 -04:00