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.
This commit is contained in:
George Kiagiadakis 2020-11-16 10:28:56 +02:00
parent 37134df7c8
commit eca28d7b04

View file

@ -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