[sgen] Remove skip_size in sgen-scan-object.h.
[mono.git] / eglib / src / gpattern.c
index baabf78fc8f32769dd53094c510a15cebbef157d..84861412e8ae05ac67fd6e84b39bd4ee68ab26a6 100644 (file)
@@ -37,7 +37,8 @@ typedef enum {
        MATCH_LITERAL,
        MATCH_ANYCHAR,
        MATCH_ANYTHING,
-       MATCH_ANYTHING_END
+       MATCH_ANYTHING_END,
+       MATCH_INVALID = -1
 } MatchType;
 
 typedef struct {
@@ -53,10 +54,10 @@ static GSList *
 compile_pattern (const gchar *pattern)
 {
        GSList *list;
-       gint i, len;
+       size_t i, len;
        PData *data;
        gchar c;
-       MatchType last = -1;
+       MatchType last = MATCH_INVALID;
        GString *str;
        gboolean free_str;
 
@@ -157,9 +158,9 @@ g_pattern_spec_free (GPatternSpec *pspec)
 }
 
 static gboolean
-match_string (GSList *list, const gchar *str, gint idx, gint max)
+match_string (GSList *list, const gchar *str, size_t idx, size_t max)
 {
-       gint len;
+       size_t len;
 
        while (list && idx < max) {
                PData *data = (PData *) list->data;
@@ -209,3 +210,4 @@ g_pattern_match_string (GPatternSpec *pspec, const gchar *string)
        return match_string (pspec->pattern, string, 0, strlen (string));
 }
 
+