make struct _GPatternSpec and GMatchType private. (g_pattern_equal): new

Fri Oct 12 18:24:02 2001  Tim Janik  <timj@gtk.org>

        * glib/gpattern.[hc]: make struct _GPatternSpec and GMatchType
        private.
        (g_pattern_equal): new function to return equality of two patterns
        (required because GPatternSpec is private now).
        (g_pattern_spec_new): fix bug wrg wildcard counting which produced
        incorrect pattern specs (discovered by Matthias Clasen).
        optimized code so we just keep one compiled pattern string now.
        correctly canonicalize patterns. reduce string walks, optimize
        decision about MATCH_ALL vs. MATCH_ALL_TAIL.
        (g_pattern_match_string): call just g_pattern_match() with NULL
        reversed string.
        (g_pattern_match): allow NULL reversed strings now, reverse_dup
        strings on demand.

        * tests/patterntest.c (test_compilation): added an extended testcase
        for pattern matching from Matthias Clasen <matthiasc@poet.de>.

Sat Oct 13 06:58:23 2001  Tim Janik  <timj@gtk.org>

        * glib/tmpl/patterns.sgml: amended documentation.
This commit is contained in:
Tim Janik
2001-10-13 05:54:10 +00:00
committed by Tim Janik
parent 96bc4f0c3b
commit 92dfa96114
19 changed files with 607 additions and 168 deletions

View File

@@ -213,6 +213,8 @@ The predefined identifiers of the reserved fundamental types.
@G_TYPE_PARAM_UINT: Identifier for the "#GParamSpecUInt" type.
@G_TYPE_PARAM_LONG: Identifier for the "#GParamSpecLong" type.
@G_TYPE_PARAM_ULONG: Identifier for the "#GParamSpecULong" type.
@G_TYPE_PARAM_INT64:
@G_TYPE_PARAM_UINT64:
@G_TYPE_PARAM_UNICHAR:
@G_TYPE_PARAM_ENUM: Identifier for the "#GParamSpecEnum" type.
@G_TYPE_PARAM_FLAGS: Identifier for the "#GParamSpecFlags" type.
@@ -225,8 +227,6 @@ The predefined identifiers of the reserved fundamental types.
@G_TYPE_PARAM_VALUE_ARRAY: Identifier for the "#GParamSpecValueArray" type.
@G_TYPE_PARAM_CLOSURE: Identifier for the "#GParamClosure" type.
@G_TYPE_PARAM_OBJECT: Identifier for the "#GParamSpecObject" type.
@G_TYPE_PARAM_INT64:
@G_TYPE_PARAM_UINT64:
<!-- ##### STRUCT GTypeInterface ##### -->
<para>