Commit Graph

15973 Commits

Author SHA1 Message Date
Aurimas Černius
63a5556aa2 Updated Lithuanian translation 2015-09-02 21:17:11 +03:00
Philip Withnall
7a65d1d3fb gmem: Fix a typo in the g_try_new0() documentation 2015-09-02 14:52:52 +01:00
Philip Withnall
b77fe970db gstring: Mark g_string_free() as taking (transfer full) input
This is unusual, but the correct annotation for a free() function.

https://bugzilla.gnome.org/show_bug.cgi?id=742903
2015-09-02 14:51:51 +01:00
Chun-wei Fan
4cad3f5e1b glib/strfuncs.c: Fix Build on Windows
Windows does not have strerror_r(), but does have strerror_s(), which is
threadsafe, and does more or less the same thing, so use it on Windows to
fix the build.

https://bugzilla.gnome.org/show_bug.cgi?id=754431
2015-09-02 17:03:44 +08:00
Ting-Wei Lan
4a09d0cf7a Fix return value error in g_list_store_sort 2015-09-02 01:19:40 +08:00
Matthias Clasen
f14e2e5c53 2.45.7 2015-09-01 10:58:32 -04:00
Emmanuele Bassi
b04c565f33 gio: Link against gmodule when building tools
Otherwise cross-compilation will fail with linker errors.

https://bugzilla.gnome.org/show_bug.cgi?id=753745
2015-09-01 10:40:24 -04:00
Emmanuele Bassi
5ce70917df Drop binary checks when cross-compiling
We don't need to run binaries we just built in order to successfully
build GLib and friends any more.

Since commit b74e2a7, we don't need to run glib-genmarshal when building
GIO; since commit f9eb9eed, all our tests (including the ones that do
need to run binaries we just built) are only built when running "make
check", instead of unconditionally at every build.

This means that we don't need to check for existing, native binaries
when cross-compiling, and fail the configuration step if they are not
found — which also means that you don't need to natively build GLib for
your toolchain, in order to cross-compile GLib.

We can also use the cross-compilation conditional, and skip those tests
that require a binary we just built in order to build.

https://bugzilla.gnome.org/show_bug.cgi?id=753745
2015-09-01 10:40:24 -04:00
Matthias Clasen
1dec512a66 Revert "GSettings: delay backend subscription"
This reverts commit 8ff5668a45.

This change has had considerable fallout, and there was no
follow-up to address it.

https://bugzilla.gnome.org/show_bug.cgi?id=733791
2015-09-01 10:21:26 -04:00
Matthias Clasen
7fff264777 Revert "GSettings: fix check for delaying backend subscription"
This reverts commit d511d6b37f.
2015-09-01 10:18:23 -04:00
Iain Lane
16721468e5 gsignal: Don't crash when operating on signals on the wrong object 2015-09-01 14:30:43 +01:00
Iain Lane
261250c46e Test that disconnecting from the wrong thing warns and doesn't crash
This broke in 916297be79 (≥ 2.45.3)
2015-09-01 14:30:37 +01:00
Alexandre Franke
976da775cb Updated French translation 2015-09-01 07:57:48 +00:00
Dan Winship
9f2e3f6b72 gtestutils: add g_assert_cmpmem()
Add a test macro to compare two buffers (which are not already known
to be the same length) for equality.

https://bugzilla.gnome.org/show_bug.cgi?id=754283
2015-08-31 13:59:48 -04:00
Dan Winship
367f36d630 gtestutils: forbid having two tests with the same full path
In the same way that gtestutils used to let you create multiple suites
with the same name, it also let you create multiple tests with the
same name. Make that an error instead (and fix glib/tests/base64.c,
which was registering three separate tests named
"/base64/incremental/nobreak/4", and glib/tests/autoptr.c, which was
running test_g_variant_builder() twice).

https://bugzilla.gnome.org/show_bug.cgi?id=754286
2015-08-31 13:58:56 -04:00
Dan Winship
123ea70d74 gtestutils: improve non-TAP output, fix handling of incomplete tests
In non-TAP mode, tests that used g_test_skip() were labelled "OK", and
tests that used g_test_incomplete() were labelled "FAIL". Explicitly
show them as "SKIP" and "TODO" instead, like in the TAP case.

Also, incomplete/TODO tests are not supposed to be treated as
failures, so fix that too.

https://bugzilla.gnome.org/show_bug.cgi?id=754286
2015-08-31 13:58:56 -04:00
Dan Winship
6e382208f7 gtestutils: print the TAP test plan first, not last
TAP allows you to print the "test plan" (ie, the expected number of
tests" either at the start or the end of the test program, but if you
put it at the end, and the program crashes, automake will complain
"missing test plan", which is confusing to users (particularly since
it prints that *before* it prints that the test program crashed,
suggesting that somehow the lack of test plan was responsible for the
crash or something, rather than vice versa).

Anyway, change it to count the tests ahead of time, and print the test
plan first. Keeping this simple requires disallowing the '-p', '-s',
and '--GTestSkipCount' options when using '--tap' (although we were
already printing the wrong number in the --GTestSkipCount case
anyway).

https://bugzilla.gnome.org/show_bug.cgi?id=754284
2015-08-31 13:58:25 -04:00
Dan Winship
51c91ed53d gtestutils: move "/subprocess" path special-casing
https://bugzilla.gnome.org/show_bug.cgi?id=754284
2015-08-31 13:58:25 -04:00
Dan Winship
91ff2ba844 gtestutils: make g_test_suite_run{,internal} less confusing
Rewrite g_test_suite_run() and g_test_suite_run_internal() to make it
clearer what they do (while still preserving exact backward
compatibility, meaning we need to handle the "-p" case differently
from the non-"-p" case).

https://bugzilla.gnome.org/show_bug.cgi?id=754284
2015-08-31 13:58:25 -04:00
Dan Winship
510331bacf gtestutils: reorganize g_test_name manipulation
https://bugzilla.gnome.org/show_bug.cgi?id=754284
2015-08-31 13:58:25 -04:00
Matthias Clasen
34ec21fab5 win32: Fix a g_once_init_enter call
g_once_init_enter must be given a gsize-sized location.
A gboolean doesn't qualify. This broke the build on win64.

http://bugzilla.gnome.org/show_bug.cgi?id=754307
2015-08-31 13:48:22 -04:00
Matthias Clasen
591eabcbbc Remove an unused variable 2015-08-31 13:43:47 -04:00
Balázs Úr
b8a2e08aba Updated Hungarian translation 2015-08-31 16:16:49 +00:00
Matthias Clasen
e5734c37a6 Add g_list_store_sort
GListStore already has a g_list_store_insert_sorted function,
which can be used to keep the list sorted according to a fixed
sort function. But if the sort function changes (as e.g. with
sort columns in a list UI), the entire list needs to be
resorted. In that case, you want g_list_store_sort().

https://bugzilla.gnome.org/show_bug.cgi?id=754152
2015-08-31 10:40:45 -04:00
Michael Catanzaro
516adb99c0 Add certificate chain construction test
Enhance GTestTlsBackend to allow setting the issuer property of
GTlsCertificates, and add a test to ensure certificate chain
construction with g_tls_certificate_new_from_pem() works as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=754264
2015-08-29 08:43:29 -05:00
Michael Catanzaro
587068c969 GTlsCertificate: fix loading of chain with private key
If a private key (or anything, in fact) follows the final certificate in
the file, certificate parsing will be aborted and only the first
certificate in the chain will be returned, with the private key not set.
Be tolerant of this, rather than expecting the final character in the
file to be the newline following the last certificate.

https://bugzilla.gnome.org/show_bug.cgi?id=754264
2015-08-29 08:43:29 -05:00
Dan Winship
1ab3e3ed3e gsocket: add a wrapper around g_set_error() to avoid extra work
If @error is NULL then we don't even need to evaluate the remaining
arguments. And if errno is EWOULDBLOCK, then no one should see the
error message anyway, so don't bother g_strdup_printf'ing up a pretty
one.

https://bugzilla.gnome.org/show_bug.cgi?id=752769
2015-08-29 08:46:25 -04:00
Tom Tryfonidis
a702657794 Updated Greek translation 2015-08-28 20:49:53 +00:00
Matthias Clasen
30d95388e7 Test g_strerror some more
Set a locale here, so we actually do conversion, and also
run the loop far enough that we hit the 'unknown error' case.
2015-08-28 16:05:05 -04:00
Matthias Clasen
36fac0849c Make g_strerror threadsafe
We need to use strerror_r here, in order to be threadsafe.
2015-08-28 15:54:46 -04:00
Matthias Clasen
eb7ffccf44 test repeated g_hash_table_remove_all calls
I just came across a situation where code ended up stuck in
an infinite loop in GHashTable code, so lets verify that this
is a safe thing.
2015-08-28 14:15:54 -04:00
Andika Triwidada
323b1d9c5f Updated Indonesian translation 2015-08-28 13:00:20 +00:00
K. Adam Christensen
f8341badb8 gfileenumerator: Don't leak memory if out_info is NULL
In the unusual case where one just wants the filenames, avoid
a leak.

https://bugzilla.gnome.org/show_bug.cgi?id=754211
2015-08-28 08:17:24 -04:00
Yosef Or Boczko
4cbd0d6a60 Updated Hebrew translation 2015-08-27 23:21:08 +03:00
Fran Dieguez
42331aa154 Updated Galician translations 2015-08-27 16:47:04 +02:00
Piotr Drąg
c061d6995c Updated Polish translation 2015-08-26 18:21:34 +02:00
Chao-Hsiung Liao
a3f567ad56 Updated Chinese (Taiwan) translation 2015-08-25 22:54:03 +00:00
Philip Withnall
91a6ec8d07 gutils: Clarify return values of g_bit_nth_[lsf|msf]()
Clarify in the documentation that both functions return -1 if no high
bits could be found.
2015-08-25 10:49:06 +01:00
Pedro Albuquerque
b233d7e324 Updated Portuguese translation 2015-08-25 06:22:23 +00:00
Dan Winship
7da3922d05 gdbus: fix race condition in connection filter freeing
If you called g_dbus_connection_remove_filter() on a filter while it
was running (or about to be run) in another thread, its GDestroyNotify
would be run immediately, potentially causing the filter thread to
crash.

Fix this by refcounting the filters, and using the existing mechanism
for running a GDestroyNotify in another thread in the case where the
the gdbus thread is the one that frees it.

Also, add a bit of documentation explaining this (and add a related
clarification to g_dbus_connection_signal_subscribe()).

https://bugzilla.gnome.org/show_bug.cgi?id=704568
2015-08-24 16:30:05 -04:00
Philip Withnall
76c1f78cb9 gfile: Clarify g_file_get_parent() documentation
Clarify that a parent in this case has to be an immediate parent, not an
arbitrary ancestor several levels up in the tree.
2015-08-24 10:38:27 +01:00
Philip Withnall
50a65cc38a gfile: Clarify g_file_get_path() documentation
Clarify that the returned path (if non-NULL) is guaranteed to be
absolute and canonical, but might still contain symlinks.
2015-08-24 10:37:51 +01:00
Kalev Lember
02f9e84709 gdbus: Add a missing include
This fixes the build on non-unix platforms, such as win32 where
gunixfdlist.h is not included.
2015-08-22 23:13:33 +02:00
Michael Catanzaro
a6ae52fa13 docs: Fix a typo finalised -> finalized
db8455f07d added use of both "finalised"
and "finalized". We generally use American spelling, so prefer that.
2015-08-21 16:46:33 -05:00
Philip Withnall
d33eae97c9 Revert "TODO ban maman"
I can’t work git-bz.

This reverts commit a228f0ac80.
2015-08-21 15:17:24 +01:00
Philip Withnall
a228f0ac80 TODO ban maman 2015-08-21 15:15:53 +01:00
Philip Withnall
57d0ec57e4 docs: Clarify costs of using the generic GObject C closure marshaller
The libffi one is slower than type-specific generated ones, but is
generally better to use.

https://bugzilla.gnome.org/show_bug.cgi?id=744060
2015-08-21 15:15:53 +01:00
Philip Withnall
e57741791e docs: Port GObject concepts to use G_DECLARE_FINAL_TYPE
And G_DECLARE_INTERFACE.

https://bugzilla.gnome.org/show_bug.cgi?id=744060
2015-08-21 15:15:53 +01:00
Philip Withnall
ab9b52e69c docs: General cleanups and rewording in the GObject concepts docs
• Remove copies of function declarations from the explanation — if
   people want those, they can follow links to the reference manual.
 • Add markup to make C code more defined.
 • Remove use of first person and irrelevant name dropping.

https://bugzilla.gnome.org/show_bug.cgi?id=744060
2015-08-21 15:15:53 +01:00
Philip Withnall
a86ef242e4 docs: Link to the GObject how-to from the GType tutorial
So that first-time users don’t fall into the trap of reading about the
gory memory layout details of GType and GObject when all they wanted to
do was derive a class.

https://bugzilla.gnome.org/show_bug.cgi?id=744060
2015-08-21 15:15:53 +01:00