VSM__iter0 and VSM__itern are local.  Move the prototypes to vsm_int.h.
  Tests are still happy.

  OK?

  f.-

diff --git a/include/vapi/vsm.h b/include/vapi/vsm.h
index 04679b5..5a14d2e 100644
--- a/include/vapi/vsm.h
+++ b/include/vapi/vsm.h
@@ -147,18 +147,6 @@ void VSM_Close(struct VSM_data *vd);
         * record references.
         */
 
-
-void VSM__iter0(const struct VSM_data *vd, struct VSM_fantom *vf);
-int VSM__itern(const struct VSM_data *vd, struct VSM_fantom *vf);
-
-#define VSM_FOREACH(vf, vd) \
-    for(VSM__iter0((vd), (vf)); VSM__itern((vd), (vf));)
-       /*
-        * Iterate over all chunks in shared memory
-        * vf = "struct VSM_fantom *"
-        * vd = "struct VSM_data *"
-        */
-
 enum VSM_valid_e {
        VSM_invalid,
        VSM_valid,
diff --git a/include/vapi/vsm_int.h b/include/vapi/vsm_int.h
index 9305547..a5cbd8c 100644
--- a/include/vapi/vsm_int.h
+++ b/include/vapi/vsm_int.h
@@ -100,6 +100,9 @@
 #define VSM_MARKER_LEN 8
 #define VSM_IDENT_LEN  128
 
+struct VSM_fantom;
+struct VSM_data;
+
 struct VSM_chunk {
 #define VSM_CHUNK_MARKER       "VSMCHUNK"
        char                    marker[VSM_MARKER_LEN];
@@ -120,4 +123,15 @@ struct VSM_head {
        uint64_t                age;
 };
 
+void VSM__iter0(const struct VSM_data *vd, struct VSM_fantom *vf);
+int VSM__itern(const struct VSM_data *vd, struct VSM_fantom *vf);
+
+#define VSM_FOREACH(vf, vd) \
+    for(VSM__iter0((vd), (vf)); VSM__itern((vd), (vf));)
+       /*
+        * Iterate over all chunks in shared memory
+        * vf = "struct VSM_fantom *"
+        * vd = "struct VSM_data *"
+        */
+
 #endif /* VSM_INT_H_INCLUDED */

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to