[master] 8d9597e Remember to mark VMOD object methods which return VOID as SYM_PROC
Poul-Henning Kamp
phk at varnish-cache.org
Wed Mar 6 20:58:56 CET 2013
commit 8d9597e1e7dc2237a02f552ddb2feb63f417780b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Mar 6 19:55:34 2013 +0000
Remember to mark VMOD object methods which return VOID as SYM_PROC
diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c
index 40b56f8..50e912d 100644
--- a/lib/libvcl/vcc_action.c
+++ b/lib/libvcl/vcc_action.c
@@ -231,10 +231,16 @@ parse_new(struct vcc *tl)
p += strlen(s_obj);
bprintf(buf2, "%s%s", sy1->name, p);
sy3 = VCC_AddSymbolStr(tl, buf2, SYM_FUNC);
+ AN(sy3);
sy3->eval = vcc_Eval_SymFunc;
p += strlen(p) + 1;
sy3->cfunc = p;
p += strlen(p) + 1;
+
+ /* Functions which return VOID are procedures */
+ if (!memcmp(p, "VOID\0", 5))
+ sy3->kind = SYM_PROC;
+
sy3->args = p;
sy3->extra = TlDup(tl, buf1);
while (p[0] != '\0' || p[1] != '\0')
More information about the varnish-commit
mailing list