Commit Graph

16688 Commits

Author SHA1 Message Date
Changwoo Ryu
cb3a03e1e2 Updated Korean translation 2015-09-08 01:59:08 +09:00
Matthias Clasen
23229bfd0c GString: Avoid some repeated parameter checking
Many of the append and prepend variants are just thin wrappers
around another one. Remove parameter checking in the wrapper
for these cases. The wrapped function is checking them anyway.
2015-09-07 10:35:13 -04:00
Matthias Clasen
03db1f455b Remove some unused code
The function unescape_gstring_inplace was maintaining a line count
without ever making use of it. Drop that.
2015-09-07 09:50:41 -04:00
Matthias Clasen
44af2b1c17 Simplify g_param_spec_get_redirect_target a bit more
It is enough to look for exact matches here, so no need to
dive into g_type_instance_is_a and take locks, etc.
2015-09-07 03:02:11 -04:00
Matthias Clasen
f1f80111c9 Simplify g_param_spec_get_redirect_target
There is no need to do a type check in a g_return_if_fail if the
type check is tne next thing the function does anyway.
2015-09-07 02:33:50 -04:00
Mikhail Zabaluev
401f78652c Reorganized utf8-performance tests
Now each function-string pair gets its own test path to track
a single performance result.

https://bugzilla.gnome.org/show_bug.cgi?id=738504
2015-09-05 13:14:11 -04:00
Mikhail Zabaluev
b963565125 Unrolled implementation of g_utf8_to_ucs4_fast()
Unrolling the branches and expressions for all expected cases
of UTF-8 sequences facilitates the work of both an optimizing compiler
and the branch prediction logic in the CPU. This speeds up decoding
noticeably on text composed primarily of longer sequences.

https://bugzilla.gnome.org/show_bug.cgi?id=738504
2015-09-05 13:12:48 -04:00
Mikhail Zabaluev
3188b8ee79 Optimized branching in g_utf8_validate()
The number of branches and logical operations can be reduced by
never producing a resulting wide character value to check its range.
Instead, individual bytes in the sequence are validated
depending on the branch taken on the basis of preceding bytes.
The syntax given in RFC 3629 is made use of.

https://bugzilla.gnome.org/show_bug.cgi?id=738504
2015-09-05 13:10:57 -04:00
Matthias Clasen
5644ee5083 markup: trivial refactor
Avoid an unnecessary branch.
2015-09-05 13:02:33 -04:00
Matthias Clasen
d28639507d list store: Fix a parameter check
Getting this wrong causes build failures.

https://bugzilla.gnome.org/show_bug.cgi?id=754582
2015-09-04 13:56:57 -04:00
Baurzhan Muftakhidinov
da4927b7fb Updated Kazakh translation 2015-09-04 16:23:43 +00:00
Milo Casagrande
6e16185600 Updated Italian translation 2015-09-04 07:49:58 +00:00
Chun-wei Fan
1387a16bf4 MSVC Builds: Remove Static Items
... which are now generated with the new autotools module, so we just
need to ensure the generated items are being dist'ed.

https://bugzilla.gnome.org/show_bug.cgi?id=735429
2015-09-03 19:10:26 +08:00
Chun-wei Fan
041e77249a Cleanup and Enhance the MSVC Project Generation
Make use of the common autotools module that is used to generate the MSVC
project files from their respective templates so that the main build files
beccome cleaner, and enhance them in a way that the headers that should be
installed can be written to the property sheets during 'make dist', so that
the chances of missing headers for MSVC builds can be greatly reduced.

Also use this autotools module to fill in the projects for
glib-compile-schemas and glib-compile-resources.

https://bugzilla.gnome.org/show_bug.cgi?id=735429
2015-09-03 19:10:06 +08:00
Chun-wei Fan
700983c8c9 build: Add Common Autotools Module for MSVC Projects
This adds a common autotools module that can be used by various
projects to generate the Visual Studio projects as needed, and
if necessary, generate the headers listings to "install" for that
project, based on items passed in to this.  This is modelled on the
Makefile.introspection autotools file that is used by many GNOME
projects to generate the introspection files.

https://bugzilla.gnome.org/show_bug.cgi?id=735429
2015-09-03 19:08:55 +08:00
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