Commit 569f84ec authored by Nils Goroll's avatar Nils Goroll

retire support for BODY now that it actually is a BLOB

Ref: https://github.com/varnishcache/varnish-cache/pull/3123
parent fabaf7bd
......@@ -38,8 +38,6 @@ currently are:
* ``BLOB``
* ``BODY``
* ``BOOL``
* ``BYTES``
......
......@@ -16,10 +16,6 @@ VCC_TYPE(BACKEND, backend)
#define DEFDOC_BLOB
VCC_TYPE(BLOB, blob)
#define DEF_BODY
#define DEFDOC_BODY
VCC_TYPE(BODY, body)
#define DEF_BOOL
#define DEFDOC_BOOL
VCC_TYPE(BOOL, bool)
......
......@@ -15,11 +15,6 @@ VCC_TYPE(BACKEND, backend)
#define CMP_BLOB(a, b) blob.equal(a, b)
VCC_TYPE(BLOB, blob)
// body support is very rudimentary
//#define VTC1_BODY
//#define VTC2_BODY
//VCC_TYPE(BODY, body)
// #2809 VCC bug for xx = bool1 == bool2
//#define VTC1_BOOL true
//#define VTC2_BOOL false
......
......@@ -95,10 +95,6 @@ static const struct vrt_blob null_blob[1] = {{
} \
(void)0
#define KIND_BODY pointer
#define CP_BODY(dst, src) cp_string(dst, src)
#define FREE_BODY(ptr) free_string(ptr)
#define KIND_BOOL immediate
#define CP_BOOL(dst, src) (dst) = (src)
#define FREE_BOOL(ptr) (void)0
......
......@@ -2,7 +2,6 @@
#define OBJVAR_ACL_MAGIC 0xac1
#define OBJVAR_BACKEND_MAGIC 0xbec
#define OBJVAR_BLOB_MAGIC 0xb10
#define OBJVAR_BODY_MAGIC 0xb0d
#define OBJVAR_BOOL_MAGIC 0xb00
#define OBJVAR_BYTES_MAGIC 0xb47
#define OBJVAR_DURATION_MAGIC 0xd08
......
......@@ -38,12 +38,6 @@ SYNOPSIS
:ref:`xblob.defined()`
:ref:`constant.body()`
:ref:`xbody.get()`
:ref:`xbody.defined()`
:ref:`constant.bool()`
:ref:`xbool.get()`
......@@ -220,30 +214,6 @@ BOOL xblob.defined()
Return whether the constant is defined.
.. _constant.body():
new xbody = constant.body([BODY init])
--------------------------------------
Construct a(n) BODY constant with the value `init`,
if provided. If no `init` value is provided, the constant
will be undefined.
.. _xbody.get():
BODY xbody.get(BODY fallback)
-----------------------------
Return the value of the constant or the `fallback` argument
if it is undefined.
.. _xbody.defined():
BOOL xbody.defined()
--------------------
Return whether the constant is defined.
.. _constant.bool():
new xbool = constant.bool([BOOL init])
......
......@@ -50,16 +50,6 @@ SYNOPSIS
:ref:`xblob.defined()`
:ref:`globalvar.body()`
:ref:`xbody.get()`
:ref:`xbody.set()`
:ref:`xbody.undefine()`
:ref:`xbody.defined()`
:ref:`globalvar.bool()`
:ref:`xbool.get()`
......@@ -330,44 +320,6 @@ BOOL xblob.defined()
Return whether the globalvar is defined.
.. _globalvar.body():
new xbody = globalvar.body([BODY init])
---------------------------------------
Construct a(n) BODY globalvar with the default value `init`,
if provided. If no `init` value is provided, the variable
will be initially undefined.
.. _xbody.get():
BODY xbody.get(BODY fallback)
-----------------------------
Return the value of the globalvar or the `fallback` argument
if it is undefined.
.. _xbody.set():
VOID xbody.set(BODY)
--------------------
Set the value of the globalvar.
.. _xbody.undefine():
VOID xbody.undefine()
---------------------
Undefine the globalvar.
.. _xbody.defined():
BOOL xbody.defined()
--------------------
Return whether the globalvar is defined.
.. _globalvar.bool():
new xbool = globalvar.bool([BOOL init])
......
......@@ -62,20 +62,6 @@ SYNOPSIS
:ref:`xblob.protected()`
:ref:`taskvar.body()`
:ref:`xbody.get()`
:ref:`xbody.set()`
:ref:`xbody.undefine()`
:ref:`xbody.defined()`
:ref:`xbody.protect()`
:ref:`xbody.protected()`
:ref:`taskvar.bool()`
:ref:`xbool.get()`
......@@ -458,61 +444,6 @@ BOOL xblob.protected()
Return whether the taskvar is protected.
.. _taskvar.body():
new xbody = taskvar.body([BODY init])
-------------------------------------
Construct a(n) BODY taskvar with the default value `init`,
if provided. If no `init` value is provided, the variable
will be initially undefined.
.. _xbody.get():
BODY xbody.get(BODY fallback)
-----------------------------
Return the value of the taskvar or the `fallback` argument
if it is undefined.
.. _xbody.set():
VOID xbody.set(BODY)
--------------------
Set the value of the taskvar.
Triggers a vcl failure for protected variables.
.. _xbody.undefine():
VOID xbody.undefine()
---------------------
Undefine the taskvar.
.. _xbody.defined():
BOOL xbody.defined()
--------------------
Return whether the taskvar is defined.
.. _xbody.protect():
VOID xbody.protect()
--------------------
Protect the taskvar, so any future .set() calls on it
trigger a vcl failure.
.. _xbody.protected():
BOOL xbody.protected()
----------------------
Return whether the taskvar is protected.
.. _taskvar.bool():
new xbool = taskvar.bool([BOOL init])
......
......@@ -62,20 +62,6 @@ SYNOPSIS
:ref:`xblob.protected()`
:ref:`topvar.body()`
:ref:`xbody.get()`
:ref:`xbody.set()`
:ref:`xbody.undefine()`
:ref:`xbody.defined()`
:ref:`xbody.protect()`
:ref:`xbody.protected()`
:ref:`topvar.bool()`
:ref:`xbool.get()`
......@@ -441,61 +427,6 @@ BOOL xblob.protected()
Return whether the topvar is protected.
.. _topvar.body():
new xbody = topvar.body([BODY init])
------------------------------------
Construct a(n) BODY topvar with the default value `init`,
if provided. If no `init` value is provided, the variable
will be initially undefined.
.. _xbody.get():
BODY xbody.get(BODY fallback)
-----------------------------
Return the value of the topvar or the `fallback` argument
if it is undefined.
.. _xbody.set():
VOID xbody.set(BODY)
--------------------
Set the value of the topvar.
Triggers a vcl failure for protected variables.
.. _xbody.undefine():
VOID xbody.undefine()
---------------------
Undefine the topvar.
.. _xbody.defined():
BOOL xbody.defined()
--------------------
Return whether the topvar is defined.
.. _xbody.protect():
VOID xbody.protect()
--------------------
Protect the topvar, so any future .set() calls on it
trigger a vcl failure.
.. _xbody.protected():
BOOL xbody.protected()
----------------------
Return whether the topvar is protected.
.. _topvar.bool():
new xbool = topvar.bool([BOOL init])
......
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