Remaining conversions to std

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Jun 23 11:35:42 CEST 2014


In message <CAJV_h0avZU7M7ZsLmJhy9O0CGU95iE81ymNRsM2uR=GZ-6geSA at mail.gmail.com>
, Federico Schwindt writes:

>Hi,
>
>As discussed on the latest VDD I added .real (was .strtod) to the std vmod.
>There are 3 remaining conversions from our list:
>
>$Function REAL time2real(TIME)
>$Function INT time2integer(TIME)
>$Function TIME real2time(REAL)
>
>They are nothing more than returning their input:
>
>VCL_TIME __match_proto__(td_std_real2time)
>vmod_real2time(const struct vrt_ctx *ctx, VCL_REAL r)
>{
>        (void)ctx;
>        return (r);
>}
>
>Before I go ahead and add them are we happy with this or should we consider
>a different route like automagic promotion for certain types?

I'm not sure I can see how that would work ?

We don't have a way to force the conversion in VCL (ie: no casts) so
I think it will have to be explicit

-- 
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