Commit 40460fe9 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Change the 'len' field in vmod_priv and vrt_blob to a 'long'

We have code which relies on it being able to contain negative
values as error indications, but 'ssize_t' from unistd.h is a bridge
too far for vrt.h which is meant to be _incredibly_ portable to
avoid problems at compile time.
parent 9b0b9fa3
...@@ -68,7 +68,7 @@ pan_privs(struct vsb *vsb, const struct vrt_privs *privs) ...@@ -68,7 +68,7 @@ pan_privs(struct vsb *vsb, const struct vrt_privs *privs)
VRBT_FOREACH(vp, vrt_priv_tree, &privs->privs) { VRBT_FOREACH(vp, vrt_priv_tree, &privs->privs) {
PAN_CheckMagic(vsb, vp, VRT_PRIV_MAGIC); PAN_CheckMagic(vsb, vp, VRT_PRIV_MAGIC);
VSB_printf(vsb, VSB_printf(vsb,
"priv {p %p l %d f %p} vmod %jx\n", "priv {p %p l %ld f %p} vmod %jx\n",
vp->priv->priv, vp->priv->priv,
vp->priv->len, vp->priv->len,
vp->priv->free, vp->priv->free,
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
* *
* *
* 9.0 (scheduled for 2019-03-15) * 9.0 (scheduled for 2019-03-15)
* Make 'len' in vmod_priv and vrt_blob a 'long'
* HTTP_Copy() removed * HTTP_Copy() removed
* HTTP_Dup() added * HTTP_Dup() added
* HTTP_Clone() added * HTTP_Clone() added
...@@ -177,7 +178,7 @@ struct strands { ...@@ -177,7 +178,7 @@ struct strands {
struct vrt_blob { struct vrt_blob {
unsigned type; unsigned type;
size_t len; long len;
const void *blob; const void *blob;
}; };
...@@ -531,7 +532,7 @@ typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e); ...@@ -531,7 +532,7 @@ typedef int vmod_event_f(VRT_CTX, struct vmod_priv *, enum vcl_event_e);
typedef void vmod_priv_free_f(void *); typedef void vmod_priv_free_f(void *);
struct vmod_priv { struct vmod_priv {
void *priv; void *priv;
int len; long len;
vmod_priv_free_f *free; vmod_priv_free_f *free;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment