diff options
Diffstat (limited to 'src/XpathParser.c')
-rw-r--r-- | src/XpathParser.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/XpathParser.c b/src/XpathParser.c index 0dbe270..f3248eb 100644 --- a/src/XpathParser.c +++ b/src/XpathParser.c @@ -6,6 +6,14 @@ typedef struct { QuickMediaXpathTokenizer tokenizer; } QuickMediaXpathParser; +static int contains_glob_char(QuickMediaStringView str) { + for(size_t i = 0; i < str.size; ++i) { + if(str.data[i] == '*') + return 1; + } + return 0; +} + static void quickmedia_xpath_parser_init(QuickMediaXpathParser *self, const char *xpath) { quickmedia_xpath_tokenizer_init(&self->tokenizer, xpath); } @@ -36,6 +44,7 @@ static int xpath_parse_param(QuickMediaXpathParser *self, QuickMediaNodeSearchPa return -4; result->defined = 1; + result->value_is_glob = contains_glob_char(result->value); return 0; } |