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)
VRBT_FOREACH(vp, vrt_priv_tree, &privs->privs) {
PAN_CheckMagic(vsb, vp, VRT_PRIV_MAGIC);
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->len,
vp->priv->free,
......
......@@ -53,6 +53,7 @@
*
*
* 9.0 (scheduled for 2019-03-15)
* Make 'len' in vmod_priv and vrt_blob a 'long'
* HTTP_Copy() removed
* HTTP_Dup() added
* HTTP_Clone() added
......@@ -177,7 +178,7 @@ struct strands {
struct vrt_blob {
unsigned type;
size_t len;
long len;
const void *blob;
};
......@@ -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 *);
struct vmod_priv {
void *priv;
int len;
long len;
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