From eca28d7b04e8b9d2ff34528f3e925ca55e936246 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Mon, 16 Nov 2020 10:28:56 +0200
Subject: [PATCH] defs: add a new WP_PRIVATE_API function annotation

This is to mark private functions that are exposed in public headers.
These functions will not be exported from the library and will
generate a warning when client code is trying to use them.
---
 lib/wp/defs.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/wp/defs.h b/lib/wp/defs.h
index bb49b974..759e7176 100644
--- a/lib/wp/defs.h
+++ b/lib/wp/defs.h
@@ -27,4 +27,12 @@
 # endif
 #endif
 
+#ifndef WP_PRIVATE_API
+# ifdef BUILDING_WP
+#  define WP_PRIVATE_API
+# else
+#  define WP_PRIVATE_API __attribute__ ((deprecated ("Private API")))
+# endif
+#endif
+
 #endif
-- 
GitLab