diff options
author | Christian Dywan <christian.dywan@canonical.com> | 2013-10-29 00:19:40 +0100 |
---|---|---|
committer | Christian Dywan <christian.dywan@canonical.com> | 2013-10-29 00:19:40 +0100 |
commit | a294397c4dc6992c19f81682b5f1b7b79ac6421e (patch) | |
tree | 4fbf8569e4fb984db53338a0bf6ed3ced81ada8c /midori/sokoke.c | |
parent | 12bbbf8c39f73e5997ab6c6d4866668095268751 (diff) | |
download | midori-a294397c4dc6992c19f81682b5f1b7b79ac6421e.tar.gz |
Tweak WebKit2 guards in C also
Diffstat (limited to 'midori/sokoke.c')
-rw-r--r-- | midori/sokoke.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/midori/sokoke.c b/midori/sokoke.c index dc0f2815..cb9ff5dc 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -859,12 +859,7 @@ sokoke_prefetch_uri (MidoriWebSettings* settings, GCallback callback, gpointer user_data) { - #define MAXHOSTS 50 - static gchar* hosts = NULL; - static gint host_count = G_MAXINT; gchar* hostname; - - #ifndef HAVE_WEBKIT2 SoupURI* soup_uri; SoupSession* session = webkit_get_default_session (); @@ -891,6 +886,10 @@ sokoke_prefetch_uri (MidoriWebSettings* settings, g_free (hostname); return FALSE; #else + #define MAXHOSTS 50 + static gchar* hosts = NULL; + static gint host_count = G_MAXINT; + if (!hosts || !g_regex_match_simple (hostname, hosts, G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY)) |