[master] 95b5819d1 vsc: New VSC_IsRaw() function in the API

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jan 11 17:06:07 UTC 2021


commit 95b5819d1ee7054d165cc30dbdde38a2d47f17a4
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Dec 10 09:44:15 2020 +0100

    vsc: New VSC_IsRaw() function in the API

diff --git a/include/vapi/vsc.h b/include/vapi/vsc.h
index fc6448911..a2f6f186e 100644
--- a/include/vapi/vsc.h
+++ b/include/vapi/vsc.h
@@ -161,6 +161,11 @@ const struct VSC_level_desc *VSC_ChangeLevel(const struct VSC_level_desc*, int);
 	 * Change a level up or down.
 	 */
 
+unsigned VSC_IsRaw(const struct vsc *);
+	/*
+	 * Returns zero if gauges are adjusted by VSC_Value().
+	 */
+
 static inline uint64_t
 VSC_Value(const struct VSC_point * const pt)
 {
diff --git a/lib/libvarnishapi/libvarnishapi.map b/lib/libvarnishapi/libvarnishapi.map
index 4436a9205..2d8e29a97 100644
--- a/lib/libvarnishapi/libvarnishapi.map
+++ b/lib/libvarnishapi/libvarnishapi.map
@@ -195,3 +195,11 @@ LIBVARNISHAPI_2.5 {	/* 2020-09-15 release */
     local:
 	*;
 };
+
+LIBVARNISHAPI_2.6 {	/* 2020-03-15 release */
+    global:
+	# vsc.c
+	VSC_IsRaw;
+    local:
+	*;
+};
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index ae597b0ca..1a84d6aeb 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -191,6 +191,13 @@ VSC_Arg(struct vsc *vsc, char arg, const char *opt)
 	}
 }
 
+unsigned
+VSC_IsRaw(const struct vsc *vsc)
+{
+
+	CHECK_OBJ_NOTNULL(vsc, VSC_MAGIC);
+	return (vsc->raw);
+}
 
 /*--------------------------------------------------------------------
  */


More information about the varnish-commit mailing list