[master] 7acaae6 straighten the vmod PRIV_* doc

Nils Goroll nils.goroll at uplex.de
Mon Mar 9 14:37:18 CET 2015


commit 7acaae626e959330ecedb21bf1bf1a1d4aff49a9
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Mar 9 14:36:50 2015 +0100

    straighten the vmod PRIV_* doc

diff --git a/doc/sphinx/reference/vmod.rst b/doc/sphinx/reference/vmod.rst
index 9209c4c..e0a1d9a 100644
--- a/doc/sphinx/reference/vmod.rst
+++ b/doc/sphinx/reference/vmod.rst
@@ -234,28 +234,29 @@ It is often useful for library functions to maintain local state,
 this can be anything from a precompiled regexp to open file descriptors
 and vast data structures.
 
-The VCL compiler supports three levels of private pointers, "per
-call", "per VCL" and "per task".
-
-"per call" private pointers are useful to cache/store state relative
-to the specific call or its arguments, for instance a compiled regular
-expression specific to a regsub() statement or a simply caching the
-last output of some expensive lookup.
-
-"per vcl" private pointers are useful for such global state that
-applies to all calls in this VCL, for instance flags that determine
-if regular expressions are case-sensitive in this vmod or similar.
-
-"per task" private pointers are useful for state that applies to calls
-for either a specific request or a backend request. For instance this
-can be the result of a parsed cookie specific to a client. Note that
-"per task" contexts are separate for the client side and the backend
-side, so use in ``vcl_backend_*`` will yield a different private pointer
-from the one used on the client side.
+The VCL compiler supports the following private pointers:
+
+* ``PRIV_CALL`` "per call" private pointers are useful to cache/store
+  state relative to the specific call or its arguments, for instance a
+  compiled regular expression specific to a regsub() statement or a
+  simply caching the last output of some expensive lookup.
+
+* ``PRIV_VCL`` "per vcl" private pointers are useful for such global
+  state that applies to all calls in this VCL, for instance flags that
+  determine if regular expressions are case-sensitive in this vmod or
+  similar.
+
+* ``PRIV_TASK`` "per task" private pointers are useful for state that
+  applies to calls for either a specific request or a backend
+  request. For instance this can be the result of a parsed cookie
+  specific to a client. Note that ``PRIV_TASK`` contexts are separate
+  for the client side and the backend side, so use in
+  ``vcl_backend_*`` will yield a different private pointer from the
+  one used on the client side.
 
 The way it works in the vmod code, is that a ``struct vmod_priv *`` is
-passed to the functions where argument type PRIV_VCL, PRIV_CALL or
-PRIV_TASK is specified.
+passed to the functions where one of the ``PRIV_*`` argument types is
+specified.
 
 This structure contains two members::
 



More information about the varnish-commit mailing list