Index: HTML-Parser-3.56/hparser.c
===================================================================
--- HTML-Parser-3.56.orig/hparser.c
+++ HTML-Parser-3.56/hparser.c
@@ -16,9 +16,9 @@
static
-struct literal_tag {
+const struct literal_tag {
int len;
- char* str;
+ char str[16];
int is_cdata;
}
literal_mode_elem[] =
@@ -59,7 +59,7 @@ enum argcode {
ARG_FLAG_FLAT_ARRAY
};
-char *argname[] = {
+static const char argname[][16] = {
/* Must be in the same order as enum argcode */
"self", /* ARG_SELF */
"tokens", /* ARG_TOKENS */
@@ -701,16 +701,16 @@ argspec_compile(SV* src, PSTATE* p_state
if (isHNAME_FIRST(*s) || *s == '@') {
char *name = s;
int a = ARG_SELF;
- char **arg_name;
+ int i;
s++;
while (isHNAME_CHAR(*s))
s++;
/* check identifier */
- for ( arg_name = argname; a < ARG_LITERAL ; ++a, ++arg_name ) {
- if (strnEQ(*arg_name, name, s - name) &&
- (*arg_name)[s - name] == '\0')
+ for ( i = 0; a < ARG_LITERAL ; ++a, ++i ) {
+ if (strnEQ(argname[i], name, s - name) &&
+ argname[i][s - name] == '\0')
break;
}
if (a < ARG_LITERAL) {
Index: HTML-Parser-3.56/hparser.h
===================================================================
--- HTML-Parser-3.56.orig/hparser.h
+++ HTML-Parser-3.56/hparser.h
@@ -45,7 +45,7 @@ enum event_id {
typedef enum event_id event_id_t;
/* must match event_id_t above */
-static char* event_id_str[] = {
+static const char event_id_str[][16] = {
"declaration",
"comment",
"start",