Vmod constants

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jun 12 10:26:15 CEST 2015


--------
In message <CAJV_h0aYsidiaE006R2Z-3iEU0+8sgqwR2A3wGZ6Kq7HWvVscg at mail.gmail.com>
, Federico Schwindt writes:

>$Const INT CASEFOLD 0x0400
>$Const INT LUMP 0x1000
>$Const INT STRIPMARK 0x2000
>
>And access it in VCL via <vmod>.<name>.
>
>set req.url = utf8.transform(req.url, utf8.CASEFOLD + utf8.LUMP +
>utf8.STRIPMARK);

At the very least it would have to spit out some #defines in the
vcc_if.h file, so that you don't have to duplicate the magic
numbers in the C code ?

What types do you see us needing ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list