Commit Graph

15976 Commits

Author SHA1 Message Date
Matthias Clasen
3bd1618ea9 Disable deprecation warnings for the stable release again
Keeping these enabled causes too many people to file
bugs against gobject, and not enough people to send
patches to port away from deprecated properties.
2015-09-14 18:42:12 -04:00
Matthias Clasen
5475be0c10 2.45.8 2015-09-14 11:17:20 -04:00
Fran Dieguez
4c938c246c Updated Galician translations 2015-09-14 16:49:57 +02:00
Alexander Larsson
69002f726d signal: return TRUE from g_signal_has_handler_pending for custom class closure
This is almost always what you want, because if you're using this you
want to know if any "custom code" (i.e. not the default class closure)
is going to be run if you emit this signal.

I looked at all the existing uses of this and they were all broken in the
presence of g_signal_override_class_closure().

https://bugzilla.gnome.org/show_bug.cgi?id=754986
2015-09-14 13:19:51 +02:00
Matthias Clasen
2e96668f24 Updates 2015-09-13 22:44:29 -04:00
Matthias Clasen
a7b2b5686a Fix make check
I forgot to add the include to make I_() known in gdbusdaemon.c
2015-09-13 13:37:10 -04:00
Mikhail Zabaluev
67c5bbaf03 glib/tests/utf8-validate: test known-length case along with null-terminated
For all test cases where the text length is given as -1, also
call g_utf8_validate() with the actual string length to exercise
the known-length case. Unknown-length and known-length validation
use different code paths, but most of the tests only exercised with
unknown-length parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=754924
2015-09-13 13:12:25 -04:00
Mikhail Zabaluev
8ab28b448b glib/tests/utf8-validate: add another test for invalid continuation bytes
This would have caught the regression committed in the course of
bug #738504.
2015-09-13 13:04:59 -04:00
Mikhail Zabaluev
d1f4d4a91a g_utf8_validate: fix a regression
A recent change permitted some characters from range 0x80-0xbf as
would-be valid sequence starters for length 2, as long as
continuation characters were OK.

https://bugzilla.gnome.org/show_bug.cgi?id=738504
2015-09-13 13:04:59 -04:00
Nicola Fontana
a51a877d27 GParamSpec: do not use static GParamSpecTypeInfo
g_param_type_register_static() has read-only access the pspec_info
argument: no need to keep the original struct around.

https://bugzilla.gnome.org/show_bug.cgi?id=696426
2015-09-13 02:15:04 -04:00
Anders Jonsson
6f752b52e9 Updated Swedish translation 2015-09-12 21:13:22 +00:00
Piotr Drąg
d8a7e093b9 Updated POTFILES.in 2015-09-12 19:55:24 +02:00
Matthias Clasen
b9a27679ec Revert "Cleanups after we dropped mem vtables"
This reverts commit 627854fee1.

It has been argued that not aborting on malloc() failure is
an incompatible change.
2015-09-12 12:05:31 -04:00
Matthias Clasen
9acd0ddbf3 gio: Intern all signal names beforehand
This avoids pointless copying of static strings.
2015-09-12 11:13:45 -04:00
Matthias Clasen
c90f283be3 Speed up g_dataset_id_dup_data
This code is used in the property notification path, so it
better be fast. This commit removes a g_return_if_fail check and
treats the common case of just a single data element better.
2015-09-12 11:13:45 -04:00
Matthias Clasen
59df5440f3 Drop g_slice_set_config tests
With g_quark_init, we are now calling GSlice from a constructor
(this was already the case when linking against gobject).
2015-09-12 11:13:45 -04:00
Matthias Clasen
2fe992b099 Move quark initialization to a constructor
This removes a branch from the very frequently called
quark functions.
2015-09-12 11:13:45 -04:00
Matthias Clasen
627854fee1 Cleanups after we dropped mem vtables
Since g_malloc is now always malloc, we can just use
strdup and strndup directly.
2015-09-12 11:13:45 -04:00
Matthias Clasen
97a25d1203 Optimize g_unichar_iswide
Apply the same optimization that was done for g_unichar_get_script
long ago: Use a quick check for the low end, and then remember the
midpoint of the last bsearch, since we're likely to be called for
characters that are close to each other.

This change made g_unichar_iswide disappear from profiles of the
gtk3-demo listbox example.
2015-09-12 11:13:44 -04:00
Dan Winship
96675446c5 Make g_strerror() do less work
Store the (translated, UTF-8-encoded) error strings in a hash table to
avoid doing translation and (possibly) g_locale_to_utf8() in every
g_strerror() call.

https://bugzilla.gnome.org/show_bug.cgi?id=754788
2015-09-11 12:39:44 -04:00
Dan Winship
19eb511ba4 More g_strerror() fixes
Add a check to configure.ac for strerror_r, since we don't currently
require POSIX.1-2001 conformance in general. Add back a
plain-strerror() case as a fallback, and rearrange the glibc-vs-POSIX
strerror_r() branches.

Update the docs to not claim that "not all platforms support the
strerror() function" (we require C90), but still mention the UTF-8 and
always-valid-string benefits. (And make test_strerror() check that
last part.)

https://bugzilla.gnome.org/show_bug.cgi?id=754788
2015-09-11 12:38:18 -04:00
Michael Catanzaro
ee6740aa78 Fix a typo 2015-09-10 20:46:37 -05:00
Kalev Lember
b8a5e22b6b Bump version
So that early adopters of new api have a version to target.
2015-09-10 15:06:56 +02:00
Kalev Lember
d19411a76f autocleanups: Add GString type
https://bugzilla.gnome.org/show_bug.cgi?id=754831
2015-09-10 14:36:43 +02:00
Chun-wei Fan
4025b5a54f MSVC Builds: "Add" MSVC 2015 Projects
This "adds" the Visual Studio 2015 Project files by doing what we did
before: copying the Visual Studio 2010 projects and replacing items
in them, as the formats of the Visual Studio 201x projects are largely
the same.
2015-09-09 15:21:26 +08:00
Chun-wei Fan
9c7df09c3b MSVC Builds: Simplify Script to Generate glib-mkenums
Use a simple all-purpose utility script to generate the glib-mkenums
PERL script with the version info, and stop using the script that
tries to parse the autotools files.  Move the things that
were taken out from build/win32/setup.py back there.
2015-09-09 15:21:12 +08:00
Matej Urbančič
0570adff80 Updated Slovenian translation 2015-09-08 23:19:40 +02:00
Sebastian Dröge
20e8b63477 gioerror: Add more mappings for WinSock error codes
https://bugzilla.gnome.org/show_bug.cgi?id=754560
2015-09-08 17:39:07 +03:00
Rico Tzschichholz
5a84f84325 gparam: Fix Since tag of g_param_spec_get_name_quark 2015-09-08 14:15:44 +02:00
Rico Tzschichholz
925dca1746 docs: Add index for 2.46 api 2015-09-08 14:14:13 +02:00
Chun-wei Fan
0be6766d9b MSVC Builds: Prepare For Visual Studio 2015
Update the autotools module so that we can use it to upgrade the
Visual Studio 2010 projects to become Visual Studio 2015-compatible.

Note that this will make the MSVC 2015 builds use the the the latest
VC140 CRT.
2015-09-08 15:51:58 +08:00
Matthias Clasen
00933dfc9c Speed up property change notification a bit
Avoid the quark lock and hash table lookup for every
emission of ::notify.
2015-09-07 20:56:10 -04:00
Matthias Clasen
41c0d15a6d Add a method to get the pspec name quark
This lets us avoid the quark lookup in the hot
property change notification path.
2015-09-07 20:54:01 -04:00
Matthias Clasen
a62ad79f5c Clean up locking in g_object_notify_queue_add
Instaed of returning with the lock held, simply assert
that this cannot happen:

https://bugzilla.gnome.org/show_bug.cgi?id=749678#c4
2015-09-07 19:57:53 -04:00
Matthias Clasen
087d75e3c3 Make g_set_object more symmetric
As argued in bug 748633, and order of ref, assign, unref is
preferable.
2015-09-07 19:43:19 -04:00
Ting-Wei Lan
ebf961a58d Make g_strerror work with non-glibc POSIX systems
We should only use GNU-specific strerror_r on glibc. On other systems,
we should use the XSI-compliant version.

https://bugzilla.gnome.org/show_bug.cgi?id=754601
2015-09-07 15:18:01 -04:00
Matthias Clasen
e773acfe9a tests: Don't test g_utf8_to_ucs4_fast too rigorously
The function is documented to assume valid input, and doesn't
guarantee behavior with invalid input. So don't test that.

https://bugzilla.gnome.org/show_bug.cgi?id=754636
2015-09-07 15:01:16 -04:00
Matthias Clasen
db3ffe5bf1 unicode-encoding test: Differentiate error messages
Spitting out the same error for different cases in not helpful.
2015-09-07 15:01:16 -04:00
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