summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-10-29 11:35:33 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2011-10-29 11:35:33 (GMT)
commit44f3ee93ecd38dda1c8e1f7797ecc0ec9dc4650f (patch)
tree2df0a518f1fb9405d7ab43b68c1bb5725ffe4688
parentc0cafe02bcf66fdf099f0572ea790b6556cec236 (diff)
downloadlibwapcaplet-44f3ee93ecd38dda1c8e1f7797ecc0ec9dc4650f.tar.gz
libwapcaplet-44f3ee93ecd38dda1c8e1f7797ecc0ec9dc4650f.tar.bz2
Constify lwc_string * param to lwc_string_length and lwc_string_data.
svn path=/trunk/libwapcaplet/; revision=13092
-rw-r--r--include/libwapcaplet/libwapcaplet.h4
-rw-r--r--src/libwapcaplet.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/libwapcaplet/libwapcaplet.h b/include/libwapcaplet/libwapcaplet.h
index eab1898..212b928 100644
--- a/include/libwapcaplet/libwapcaplet.h
+++ b/include/libwapcaplet/libwapcaplet.h
@@ -156,7 +156,7 @@ extern lwc_error lwc_string_caseless_isequal(lwc_string *str1,
* in future. Any code relying on it currently should be
* modified to use ::lwc_string_length if possible.
*/
-extern const char *lwc_string_data(lwc_string *str);
+extern const char *lwc_string_data(const lwc_string *str);
/**
* Retrieve the data length for an interned string.
@@ -164,7 +164,7 @@ extern const char *lwc_string_data(lwc_string *str);
* @param str The string to retrieve the length of.
* @return The length of \a str.
*/
-extern size_t lwc_string_length(lwc_string *str);
+extern size_t lwc_string_length(const lwc_string *str);
/**
* Retrieve (or compute if unavailable) a hash value for the content of the string.
diff --git a/src/libwapcaplet.c b/src/libwapcaplet.c
index 3cac722..6d6d45d 100644
--- a/src/libwapcaplet.c
+++ b/src/libwapcaplet.c
@@ -294,7 +294,7 @@ lwc_string_caseless_isequal(lwc_string *str1,
/**** Simple accessors ****/
const char *
-lwc_string_data(lwc_string *str)
+lwc_string_data(const lwc_string *str)
{
assert(str);
@@ -302,7 +302,7 @@ lwc_string_data(lwc_string *str)
}
size_t
-lwc_string_length(lwc_string *str)
+lwc_string_length(const lwc_string *str)
{
assert(str);