[master] d982e81 Privatize VSC_level_desc_* VSC_type_desc_* and VSC_desc_* to vsc.c

Poul-Henning Kamp phk at FreeBSD.org
Fri May 26 23:23:05 CEST 2017


commit d982e81a9f3828dc1043b3ffa707a9f44c1f93ad
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri May 26 21:22:01 2017 +0000

    Privatize VSC_level_desc_* VSC_type_desc_* and VSC_desc_* to vsc.c

diff --git a/include/vapi/vsc.h b/include/vapi/vsc.h
index 5e36f3d..a3e1f42 100644
--- a/include/vapi/vsc.h
+++ b/include/vapi/vsc.h
@@ -147,23 +147,4 @@ int VSC_Iter(struct VSM_data *vd, struct VSM_fantom *fantom, VSC_iter_f *func,
 
 const struct VSC_level_desc *VSC_LevelDesc(unsigned level);
 
-/**********************************************************************
- * Precompiled VSC_type_desc's and VSC_desc's for all know VSCs.
- */
-
-#define VSC_LEVEL_F(v,l,e,d) \
-	extern const struct VSC_level_desc VSC_level_desc_##v;
-#include "tbl/vsc_levels.h"
-#undef VSC_LEVEL_F
-
-#define VSC_TYPE_F(n,t,l,e,d) \
-	extern const struct VSC_type_desc VSC_type_desc_##n;
-#include "tbl/vsc_types.h"
-#undef VSC_TYPE_F
-
-#define VSC_DO(U,l,t,h) extern const struct VSC_desc VSC_desc_##l[];
-#define VSC_F(n,t,l,s,f,v,d,e)
-#define VSC_DONE(U,l,t)
-#include "tbl/vsc_all.h"
-
 #endif /* VAPI_VSC_H_INCLUDED */
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index 748fb27..d9caf37 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -100,6 +100,25 @@ struct vsc {
 	struct VSM_fantom	iter_fantom;
 };
 
+/**********************************************************************
+ * Precompiled VSC_type_desc's and VSC_desc's for all know VSCs.
+ */
+
+#define VSC_LEVEL_F(v,l,e,d) \
+	extern const struct VSC_level_desc VSC_level_desc_##v;
+#include "tbl/vsc_levels.h"
+#undef VSC_LEVEL_F
+
+#define VSC_TYPE_F(n,t,l,e,d) \
+	extern const struct VSC_type_desc VSC_type_desc_##n;
+#include "tbl/vsc_types.h"
+#undef VSC_TYPE_F
+
+#define VSC_DO(U,l,t,h) extern const struct VSC_desc VSC_desc_##l[];
+#define VSC_F(n,t,l,s,f,v,d,e)
+#define VSC_DONE(U,l,t)
+#include "tbl/vsc_all.h"
+
 
 /*--------------------------------------------------------------------*/
 



More information about the varnish-commit mailing list