[master] 60db0bd69 add back WS_Front() as deprecated for now

Nils Goroll nils.goroll at uplex.de
Tue Sep 1 10:42:07 UTC 2020


commit 60db0bd69d7e932a82d3f31bcde9da4b9907bc7d
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Sep 1 12:40:30 2020 +0200

    add back WS_Front() as deprecated for now

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index b3ae30c99..bd849d621 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -800,6 +800,15 @@ void WS_Id(const struct ws *ws, char *id);
 void WS_VSB_new(struct vsb *, struct ws *);
 char *WS_VSB_finish(struct vsb *, struct ws *, size_t *);
 
+/* REL_20210315 remove */
+static inline char* WS_Front(const struct ws *) v_deprecated_;
+static inline char*
+WS_Front(const struct ws *ws)
+{
+	AN(ws->r);
+	return ws->f;
+}
+
 static inline void *
 WS_Reservation(const struct ws *ws)
 {
diff --git a/doc/changes.rst b/doc/changes.rst
index 5a00c1fde..1ede0021e 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -195,12 +195,14 @@ NEXT (scheduled 2020-09-15)
   and ``varnishstat`` for inclusion, exclusion and required glob
   patterns on the statistic field names. (3394_)
 
-* [API] overhaul of the workspace API
+* Overhaul of the workspace API
 
   * The previously deprecated ``WS_Reserve()`` has been removed
-  * The signature of ``WS_Printf()`` has been changed
+  * The signature of ``WS_Printf()`` has been changed to return
+    ``const char *`` instead of ``void *`` (we do not consider this a
+    breaking change).
   * Add ``WS_ReservationSize()``
-  * ``WS_Front()`` replaced by ``WS_Reservation()``
+  * ``WS_Front()`` is now deprecated and replaced by ``WS_Reservation()``
   * Add ``WS_Id()``
 
 * Handle a workspace overflow in ``VRY_Validate()`` (3319_)
diff --git a/include/vrt.h b/include/vrt.h
index 1095d6ab0..2e5cc2d7d 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -58,7 +58,8 @@
  *	[cache.h] WS_Reserve() removed
  *	[cache.h] WS_Printf() changed
  *	[cache.h] WS_ReservationSize() added
- *	[cache.h] WS_Front() replaced by WS_Reservation()
+ *	[cache.h] WS_Front() deprecated
+ *	[cache.h] WS_Reservation() added
  *	[cache.h] WS_Id() added
  * 11.0 (2020-03-16)
  *	Changed type of vsa_suckaddr_len from int to size_t


More information about the varnish-commit mailing list