Vmod constants

Carlos Abalde carlos.abalde at gmail.com
Fri Jun 12 08:52:52 CEST 2015


> On 12 Jun 2015, at 03:45, Federico Schwindt <fgsch at lodoss.net> wrote:
> 
> ...
> 
> $Const TYPE name value
> 
> e.g.:
> 
> $Const INT CASEFOLD 0x0400
> $Const INT LUMP 0x1000
> $Const INT STRIPMARK 0x2000
> 
> ...
> 
> This doesn't generate any C code in the current incarnation, it merely creates the symbol and replaces the value when referencing it so the resulting C will have e.g. 0x0001 but I could change it if required.
> 
> Personally I think this is quite useful but I might be biased so before I clean the patches and post them here is there any interest?
> 
> Comments welcome.

Hi,

I agree this would be very useful. I suppose that at the moment these constants defined in the VCC file won't be available in the implementation of the VMOD. I think it would be great to generate some C code including these values and make them readable in the code of the VMOD. 

My two cents :)

Thanks,

--
Carlos Abalde




More information about the varnish-dev mailing list