[master] 1cc4f78 Fix prototype for user defined subroutines.
Poul-Henning Kamp
phk at varnish-cache.org
Thu Oct 17 12:14:49 CEST 2013
commit 1cc4f78ba39735b763669dd1022ca6fb05fbd1fc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Oct 17 10:14:30 2013 +0000
Fix prototype for user defined subroutines.
Fixes #1357
diff --git a/lib/libvcc/vcc_parse.c b/lib/libvcc/vcc_parse.c
index 63204a7..e161b89 100644
--- a/lib/libvcc/vcc_parse.c
+++ b/lib/libvcc/vcc_parse.c
@@ -251,9 +251,9 @@ vcc_ParseFunction(struct vcc *tl)
}
tl->curproc = vcc_AddProc(tl, tl->t);
Fh(tl, 0, "static int VGC_function_%.*s "
- "(struct vrt_ctx *ctx);\n", PF(tl->t));
+ "(const struct vrt_ctx *ctx);\n", PF(tl->t));
Fc(tl, 1, "\nstatic int __match_proto__(vcl_func_t)\n");
- Fc(tl, 1, "VGC_function_%.*s(struct vrt_ctx *ctx)\n",
+ Fc(tl, 1, "VGC_function_%.*s(const struct vrt_ctx *ctx)\n",
PF(tl->t));
}
vcc_NextToken(tl);
More information about the varnish-commit
mailing list