aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-06-29 12:21:09 -0400
committerDavid Robillard <d@drobilla.net>2017-06-29 12:21:09 -0400
commit195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8 (patch)
tree952b067c7ace8afb1f78cb51ac032d18565c94a8 /src/serd_internal.h
parent21211d73053d0a66a1da601472c68598cfc53595 (diff)
downloadserd-195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8.tar.gz
serd-195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8.tar.bz2
serd-195e4bcff3c4dfd3fe8bbf0df57d53ce89ca99e8.zip
Fix strict parsing of abolute URI schemes
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r--src/serd_internal.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h
index affdd31f..297b4507 100644
--- a/src/serd_internal.h
+++ b/src/serd_internal.h
@@ -368,6 +368,17 @@ uri_is_under(const SerdURI* uri, const SerdURI* root)
return true;
}
+static inline bool
+is_uri_scheme_char(const uint8_t c)
+{
+ switch (c) {
+ case ':': case '+': case '-': case '.':
+ return true;
+ default:
+ return is_alpha(c) || is_digit(c);
+ }
+}
+
/* Error reporting */
static inline void