Commit 6f6242be authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Rework VCC implementation of strings.

Add a new type "STRINGS" which is internal to vcc_expr.c only,
and convert to "STRING" and "STRING_LIST" at the edge of vcc_expr.c
and as necessary inside.  (More to come.)

Various and sundry cleanups along the way.
parent 0fb21d3c
......@@ -834,7 +834,8 @@ stv_variables = (
# VCL to C type conversion
vcltypes = {
'STRING_LIST': "void*",
'STRINGS': "void",
'STRING_LIST': "void*",
'SUB': "void*",
}
......
......@@ -39,7 +39,6 @@
#include "vqueue.h"
#include "vsb.h"
#include "vcc_token_defs.h"
#ifndef NULL
......
This diff is collapsed.
......@@ -134,10 +134,15 @@ const struct type STRING[1] = {{
.tostring = "",
}};
const struct type STRINGS[1] = {{
.magic = TYPE_MAGIC,
.name = "STRINGS",
.tostring = "",
}};
const struct type STRING_LIST[1] = {{
.magic = TYPE_MAGIC,
.name = "STRING_LIST",
.tostring = "VRT_CollectString(ctx,\n\v1,\nvrt_magic_string_end)",
}};
const struct type SUB[1] = {{
......
......@@ -73,6 +73,7 @@ vcc_regexp(struct vcc *tl)
EncToken(ifp->ini, tl->t);
VSB_printf(ifp->ini, ");");
VSB_printf(ifp->fin, "\t\tVRT_re_fini(%s);", buf);
vcc_NextToken(tl);
return (p);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment