Commit e5cbbedd authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use VCL typedefs for generated VRT prototypes, and also for implementations

which return VCL_IP
parent b8c2aa5c
......@@ -258,7 +258,7 @@ VRT_r_beresp_backend_name(const struct vrt_ctx *ctx)
return(ctx->bo->vbc->backend->vcl_name);
}
const void *
VCL_IP
VRT_r_beresp_backend_ip(const struct vrt_ctx *ctx)
{
......@@ -535,7 +535,7 @@ REQ_BOOL(hash_always_miss)
/*--------------------------------------------------------------------*/
const void *
VCL_IP
VRT_r_client_ip(const struct vrt_ctx *ctx)
{
......
......@@ -815,6 +815,7 @@ const struct var vcc_vars[] = {
sp_variables.sort()
for i in sp_variables:
fh.write("\n")
typ = i[1]
cnam = i[0].replace(".", "_")
ctyp = vcltypes[typ]
......@@ -829,7 +830,7 @@ for i in sp_variables:
fo.write('",\n')
else:
fo.write('\t "VRT_r_%s(ctx)",\n' % cnam)
fh.write(ctyp + " VRT_r_%s(const struct vrt_ctx *);\n" % cnam )
fh.write("VCL_" + typ + " VRT_r_%s(const struct vrt_ctx *);\n" % cnam )
restrict(fo, i[2])
if len(i[3]) == 0:
......@@ -842,7 +843,7 @@ for i in sp_variables:
fo.write('\t "VRT_l_%s(ctx, ",\n' % cnam)
fh.write("void VRT_l_%s(const struct vrt_ctx *, " % cnam)
if typ != "STRING":
fh.write(ctyp + ");\n")
fh.write("VCL_" + typ + ");\n")
else:
fh.write(ctyp + ", ...);\n")
restrict(fo, i[3])
......@@ -851,6 +852,7 @@ for i in sp_variables:
fo.write("\t{ NULL }\n};\n")
fh.write("\n")
for i in stv_variables:
fh.write(vcltypes[i[1]] + " VRT_Stv_" + i[0] + "(const char *);\n")
......
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