summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-01-24 19:25:07 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-01-24 19:25:07 +0000
commitc4e2fff5a4670fd555c56a2b2ed232f210aaa2d5 (patch)
tree69624be504ddfe8c9dc6de244fad8c137611a013 /content
parent72510f550bf42cf660faf1a1929cb6df59bf86fd (diff)
downloadnetsurf-c4e2fff5a4670fd555c56a2b2ed232f210aaa2d5.tar.gz
netsurf-c4e2fff5a4670fd555c56a2b2ed232f210aaa2d5.tar.bz2
Use corestrings for fetch module's lwc strings.
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 2d53b3149..4736670ff 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -45,6 +45,7 @@
#include "content/fetchers/file.h"
#include "content/urldb.h"
#include "desktop/netsurf.h"
+#include "utils/corestrings.h"
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
@@ -97,10 +98,6 @@ static struct fetch *queue_ring = 0; /**< Ring of queued fetches */
#define fetch_ref_fetcher(F) F->refcount++
-/* Static lwc_strings */
-static lwc_string *fetch_http_lwc;
-static lwc_string *fetch_https_lwc;
-
/******************************************************************************
* fetch internals *
******************************************************************************/
@@ -241,20 +238,6 @@ static void fetch_dispatch_jobs(void)
/* exported interface documented in content/fetch.h */
nserror fetch_init(void)
{
- if (lwc_intern_string("http", SLEN("http"), &fetch_http_lwc) !=
- lwc_error_ok) {
- LOG(("Failed to initialise the fetch module "
- "(couldn't intern \"http\")."));
- return NSERROR_INIT_FAILED;
- }
-
- if (lwc_intern_string("https", SLEN("https"), &fetch_https_lwc) !=
- lwc_error_ok) {
- LOG(("Failed to initialise the fetch module "
- "(couldn't intern \"https\")."));
- return NSERROR_INIT_FAILED;
- }
-
fetch_curl_register();
fetch_data_register();
fetch_file_register();
@@ -278,9 +261,6 @@ void fetch_quit(void)
}
fetch_unref_fetcher(fetchers);
}
-
- lwc_string_unref(fetch_http_lwc);
- lwc_string_unref(fetch_https_lwc);
}
/* exported interface documented in content/fetch.h */
@@ -383,11 +363,11 @@ struct fetch * fetch_start(nsurl *url, nsurl *referer,
&match) != lwc_error_ok) {
match = false;
}
- if (lwc_string_isequal(scheme, fetch_https_lwc,
+ if (lwc_string_isequal(scheme, corestring_lwc_https,
&match1) != lwc_error_ok) {
match1 = false;
}
- if (lwc_string_isequal(ref_scheme, fetch_http_lwc,
+ if (lwc_string_isequal(ref_scheme, corestring_lwc_http,
&match2) != lwc_error_ok) {
match2= false;
}