summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2012-08-29 07:35:47 (GMT)
committer John-Mark Bell <jmb@netsurf-browser.org>2012-08-29 07:35:47 (GMT)
commit797d66f3dc9bee99903ccad15c0064a4c1afc292 (patch)
treeb451885f890da23933c4142e7162e4d4bbe251c9
parente3e74235de5a800fe421b4c74059d926a298361d (diff)
downloadlibhubbub-797d66f3dc9bee99903ccad15c0064a4c1afc292.tar.gz
libhubbub-797d66f3dc9bee99903ccad15c0064a4c1afc292.tar.bz2
Sprinkle some const correctness around
-rw-r--r--test/tokeniser2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/tokeniser2.c b/test/tokeniser2.c
index 59c9cb9..cf0311d 100644
--- a/test/tokeniser2.c
+++ b/test/tokeniser2.c
@@ -171,7 +171,7 @@ void run_test(context *ctx)
params.content_model.model =
HUBBUB_CONTENT_MODEL_PCDATA;
} else {
- char *cm = json_object_get_string(
+ const char *cm = json_object_get_string(
(struct json_object *)
array_list_get_idx(ctx->content_model, i));
@@ -269,11 +269,11 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
switch (token->type) {
case HUBBUB_TOKEN_DOCTYPE:
{
- char *expname = json_object_get_string(
+ const char *expname = json_object_get_string(
array_list_get_idx(items, 1));
- char *exppub = json_object_get_string(
+ const char *exppub = json_object_get_string(
array_list_get_idx(items, 2));
- char *expsys = json_object_get_string(
+ const char *expsys = json_object_get_string(
array_list_get_idx(items, 3));
bool expquirks = !json_object_get_boolean(
array_list_get_idx(items, 4));
@@ -330,7 +330,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
break;
case HUBBUB_TOKEN_START_TAG:
{
- char *expname = json_object_get_string(
+ const char *expname = json_object_get_string(
array_list_get_idx(items, 1));
struct lh_entry *expattrs = json_object_get_object(
array_list_get_idx(items, 2))->head;
@@ -364,7 +364,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
for (i = 0; i < token->data.tag.n_attributes; i++) {
char *expname = (char *) expattrs->k;
- char *expval = json_object_get_string(
+ const char *expval = json_object_get_string(
(struct json_object *) expattrs->v);
const char *gotname = (const char *)
token->data.tag.attributes[i].name.ptr;
@@ -393,7 +393,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
break;
case HUBBUB_TOKEN_END_TAG:
{
- char *expname = json_object_get_string(
+ const char *expname = json_object_get_string(
array_list_get_idx(items, 1));
const char *tagname = (const char *)
token->data.tag.name.ptr;
@@ -410,7 +410,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
break;
case HUBBUB_TOKEN_COMMENT:
{
- char *expstr = json_object_get_string(
+ const char *expstr = json_object_get_string(
array_list_get_idx(items, 1));
const char *gotstr = (const char *)
token->data.comment.ptr;
@@ -427,7 +427,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
{
int expstrlen = json_object_get_string_len(
array_list_get_idx(items, 1));
- char *expstr =json_object_get_string(
+ const char *expstr =json_object_get_string(
array_list_get_idx(items, 1));
const char *gotstr = (const char *)
token->data.character.ptr;