Commit Graph

12624 Commits

Author SHA1 Message Date
Christian Persch
938c28b36b regex: Require PCRE 8.13
Bump the required version for external PCRE to 8.13, to fix the build
with external PCRE.
2012-07-02 18:02:15 +02:00
Daniel Mustieles
b5b1179d3f Updated Spanish translation 2012-07-02 17:34:59 +02:00
Daniel Mustieles
4b787aa31d Updated Spanish translation 2012-07-02 17:29:02 +02:00
Daniel Mustieles
1519d6b894 Fixed a a «big bug» in a string ;-) 2012-07-02 17:24:45 +02:00
Christian Persch
7483315f83 regex: Fix unicode othercasing
Reorder the toupper/tolower calls when othercaseing, so this
function is bug-for-bug compatible with the pcre internal tables.

https://bugzilla.gnome.org/show_bug.cgi?id=678273
2012-07-02 15:59:39 +02:00
Christian Persch
a2f54a3408 regex: Add FIRSTLINE compile flag
This option exists since PCRE 6.0.
2012-07-02 15:59:39 +02:00
Christian Persch
e99e34f65f regex: Add NOTEMPTY_ATSTART match option
Since PCRE 8.00 it supports a variant of PCRE_NOTEMPTY that works
similarly except that it only applies to the start of the matched string
but permits empty matches further in.
2012-07-02 15:59:39 +02:00
Christian Persch
1171215014 regex: Add PARTIAL_HARD match option
Since PCRE 8.00 it supports a new partial matching method PCRE_PARTIAL_HARD.
2012-07-02 15:59:39 +02:00
Christian Persch
0a2967030a regex: Add JavaScript compat mode
Since PCRE 7.7, there's a flag that changes the behaviour to be more
JavaScript compatible. Since it's no effort to expose it, just do so.
2012-07-02 15:59:39 +02:00
Christian Persch
e5550a24db regex: Don't leak internal PCRE options
g_regex_get_compile_get_compile_flags() and g_regex_get_match_flags()
were leaking PCRE flags that don't exist in the corresponding
public GRegexCompileFlags and GRegexMatchFlags; this change masks
these internal flags.
2012-07-02 15:59:39 +02:00
Christian Persch
26d91ddc08 regex: Add BSR_ANYCRLF and BSR_ANY match options
These flags override the compile option at match time. They use PCRE_BSR_ANYCRLF
and PCRE_BSR_UNICODE, resp., which make \R match only CR, LF and CRLF, or any
Unicode newline character or character sequences, resp.
2012-07-02 15:59:39 +02:00
Christian Persch
88ac3839f5 regex: Add BSR_ANYCRLF compile option
When this flag is set, \R only matches CR, LF and CRLF.
2012-07-02 15:59:39 +02:00
Christian Persch
86a04a05e6 regex: Fix newline definition for system PCRE
While we PCRE_BSR_UNICODE is the default in the internal PCRE, that may
not be true for the system one. Force the PCRE_BSR_UNICODE flag on it.
2012-07-02 15:59:39 +02:00
Christian Persch
91ba8ae156 regex: Don't return from inside a g_once_init_enter/leave block
When using the system PCRE, and it was compiled with incompatible options,
the code was returning from inside a g_once_init_enter/leave block without
calling g_once_init_leave().
2012-07-02 15:59:38 +02:00
Christian Persch
69a12e3275 regex: Add accessor for PCRE_INFO_HASCRORLF
This flag is new in PCRE 7.3, and checks whether there is an explicit
CR or LF reference in the pattern.
2012-07-02 15:59:34 +02:00
Christian Persch
7ada976516 regex: Remove message for unused error code
Since PCRE 7.3 the PCRE_ERROR_NULLWSLIMIT error is not returned anymore.
2012-07-02 14:17:34 +02:00
Christian Persch
592531019e regex: Add NEWLINE_ANYCRLF match option
This PCRE option is new in PCRE 7.1.
2012-07-02 14:17:34 +02:00
Christian Persch
c8c049b177 regex: Add NEWLINE_ANYCRLF compile option
The PCRE_NEWLINE_ANYCRLF option is new in PCRE 7.1. With it set, the only
only newline sequences recognised are CR, LF and CRLF.
2012-07-02 14:17:34 +02:00
Christian Persch
7e8b5ea442 regex: Assert that our flags values are the same as PCRE's
We rely on those flags having the same values as PCRE's (so we can pass
them right through), so assert this at compile time.
2012-07-02 14:17:34 +02:00
Simon Feltman
03611f7c06 Updated codegen to work with python3.
Most changes were just replacing usage of "has_key" with "in".
Also updated the sorting function which was simplified and
changed to a "key" function instead of "cmp" (which is no longer
supported in python3. Verified everything builds with
python 2.7 and 3.

https://bugzilla.gnome.org/show_bug.cgi?id=678066
2012-07-01 11:14:54 -04:00
Christian Persch
6d5484b296 regex: Handle PCRE_ERROR_RECURSIONLOOP
Was missing from the error conversion routine.
2012-07-01 14:00:11 +02:00
Christian Persch
7e5615138a regex: Update GRegexError with newer PCRE error codes
Update the GRegexError enum with new PCRE errors up to PCRE 8.30.

https://bugzilla.gnome.org/show_bug.cgi?id=677579
2012-07-01 14:00:11 +02:00
Christian Persch
3be1d864d8 regex: Simplify regex compile tests
Use a macro instead of repeating the same code over and over again.
2012-07-01 14:00:11 +02:00
Christian Persch
20ab7e2aea regex: Deprecate an obsolete error code
G_REGEX_ERROR_DEFINE_REPETION is dead and never raised by PCRE.
2012-07-01 14:00:11 +02:00
Christian Persch
d9e8d3e0f0 regex: Fix PCRE error code conversion
Use the shifted error codes for comparisions.

https://bugzilla.gnome.org/show_bug.cgi?id=677578
2012-07-01 14:00:11 +02:00
Nguyễn Thái Ngọc Duy
3173fca9cc Updated Vietnamese translation 2012-06-30 09:55:26 +07:00
Nguyễn Thái Ngọc Duy
7ddefe3f4b po/vi: import from Damned Lies 2012-06-30 09:42:53 +07:00
Matthias Clasen
64bfbc2cf0 GOptionContext: Don't show headings without options
If the only entry in the main group is for the rest args,
don't bother printing "Application Options".
2012-06-29 14:16:55 -04:00
Johan Dahlin
08cfcdc81a Use the same Python as we found in configure
Don't assume /usr/bin/python is python 2.x, on newer Ubuntu versions
it's actually python 3.x.
2012-06-29 11:59:33 -03:00
Tom Tryfonidis
df319ca49c Updated Greek translation 2012-06-28 17:44:14 +03:00
Martin Pitt
d023b81a7a Fix /contenttype/guess test
After fixing bug 674452 this test case now reliably fails, as "ABC abc" is text
and definitively not PowerPoint. It previously worked as g_content_type_guess()
was reading beyond the boundary of the data due to specifying -1 as data
length.

Update that test case to expect a PO template instead, and add two more with a
definitive PO template syntax and some binary data. We do not currently have a
MIME magic for PowerPoint, so we cannot actually detect it with certainty, but
at least make sure that the returned MIME type is correct.

https://bugzilla.gnome.org/show_bug.cgi?id=678941
2012-06-28 15:57:22 +02:00
Alexander Larsson
c35106fcc4 Fix the mimetype default fix
We need to ignore the defaults.list item only when there
was a mimetype handler found in a previous mimetype, not
if one was found for the same mimetype as the one that
is listed in defaults.list (same for the new-style defaults).
2012-06-28 15:38:06 +02:00
Alexander Larsson
f14c0112d0 Fix default app lookup wrt parent types and defaults.list
There was an issue when looking up the default handler
for a type where a supertype was listed in defaults.list.
We would pick the default for the parent type even if
there was a handler for the more specific type.

In the case of the new-style defaults marking (
"Default Applications" in mimeapps.list) we were already
checking for a more specific handler befor using a default,
but we also need to do a similar check for the defaults.list
case.

https://bugzilla.gnome.org/show_bug.cgi?id=678944
2012-06-28 15:05:03 +02:00
Stef Walter
1ae3080640 GTlsInteraction: Fix incorrect locking of mutex
* Fix incorrect locking of mutex in g_tls_interaction_invoke_ask_password()

https://bugzilla.gnome.org/show_bug.cgi?id=678758
2012-06-28 14:43:12 +02:00
Martin Pitt
139c1ce988 gio/tests/contenttype: Call g_content_type_guess() with valid data len
g_content_type_guess() requires specifying a valid data length. Fixes a
segfault when running the test.

Also add an explicit check for this and return XDG_MIME_TYPE_UNKNOWN when
data_size is specified as -1, to avoid crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=674452
2012-06-27 16:00:27 +02:00
Martin Pitt
95f29687e1 /mainloop/timeouts test: Reduce race condition
Due to load, particular traits of the architecture, or other circumstances, the
/mainloop/timeouts sometimes manages to call the "every
100 ms" timer loop only 9 times in 1050 ms.

This is an inherent race-condition in the test; allow it some slack and accept
9 times as well.

https://bugzilla.gnome.org/show_bug.cgi?id=678959
2012-06-27 15:32:38 +02:00
Philipp Kern
240ef2b9e8 valuetransform: Fix definition of ulong_bool
On big endian 64 bit machines such as s390x, an uint is too small to hold a
ulong_bool; it needs to be an actual ulong.

https://bugzilla.gnome.org/show_bug.cgi?id=678949
http://bugs.debian.org/662057
2012-06-27 10:59:29 +02:00
Alexander Shopov
c5e5e95a21 Updated Bulgarian translation 2012-06-27 07:17:40 +03:00
Martin Pitt
72af44cb12 Allow slightly too small poll duration in /socket/timed_wait test
Sometimes the poll duration in the /socket/timed_wait test is slightly lower
than the requested 100000, causing failures like

ERROR:/build/buildd/glib2.0-2.33.2/./gio/tests/socket.c:619:test_timed_wait:
  assertion failed (poll_duration > = 100000): (99240 >= 100000)
FAIL

Adjust the test to also allow some jitter in the "too small" direction, similar
to the already existing span for "slightly too large".

https://bugzilla.gnome.org/show_bug.cgi?id=678881
2012-06-26 18:34:08 +02:00
Colin Walters
d6aa3b3bdd GTestDBus: Don't call into gvfs
https://bugzilla.gnome.org/show_bug.cgi?id=678808
2012-06-26 12:26:05 -04:00
Dan Winship
55bac5da0a GMainContext: reorganize source list to avoid O(n) behavior
Rather than having a single priority-ordered list of GSources, store a
list of queues of each priority level. This means that adding a source
is now O(n) in the number of unique priority levels currently being
used, rather than O(n) in the total number of sources.

https://bugzilla.gnome.org/show_bug.cgi?id=619329
2012-06-26 08:40:32 -04:00
Dan Winship
aaaaab91de gmain: add GSourceIter
add an explicit iterator for GMainContext sources

https://bugzilla.gnome.org/show_bug.cgi?id=619329
2012-06-26 08:40:31 -04:00
Dan Winship
8e65c30431 gmain: rename some variables for clarity
https://bugzilla.gnome.org/show_bug.cgi?id=619329
2012-06-26 08:40:31 -04:00
Dan Winship
532f463eaf gmain: child sources must always have same priority as parent
A child source does not have a priority of its own; it must have the
same priority as its parent. Enforce this in
g_source_set_priority_unlocked().

https://bugzilla.gnome.org/show_bug.cgi?id=619329
2012-06-26 08:40:31 -04:00
Ryan Lortie
d981d79a42 GSource: initialise ->priv on construct
For efficiency, we waited until setting up child sources to allocate
->priv.  Simplify things a bit by allocating it from the start.

https://bugzilla.gnome.org/show_bug.cgi?id=619329
2012-06-26 08:40:31 -04:00
Dan Winship
56de38da7d tests: add a timing test for adding lots of GSources
https://bugzilla.gnome.org/show_bug.cgi?id=619329
2012-06-26 08:40:31 -04:00
Ryan Lortie
4780ee5d4a glib/: gtk-doc cleanup 2012-06-25 23:23:58 -04:00
Colin Walters
130c249eac Fix previous commit 2012-06-25 19:37:05 -04:00
Colin Walters
b837cdde69 gio/tests/actions: Plug a memory leak 2012-06-25 18:14:10 -04:00
Colin Walters
b65194e8df GIOScheduler: Disconnect from cancellable after job completes
This was causing crashes when a cancellable was canceled after the job
had completed.

https://bugzilla.gnome.org/show_bug.cgi?id=678576
2012-06-25 17:07:16 -04:00