diff --git a/include/common.hpp b/include/common.hpp index 5aa5bfa3..08b3e776 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -19,7 +19,7 @@ namespace rack { -/** Deprecation notice for functions +/** Attribute for deprecated functions and symbols. E.g. DEPRECATED void foo(); @@ -30,6 +30,10 @@ E.g. #define DEPRECATED __declspec(deprecated) #endif +/** Attribute for private functions and symbols not intended to be used by plugins. +By default this does nothing, but when #including rack.hpp, it prints a compile-time warning. +*/ +#define PRIVATE /** Concatenates two literals or two macros diff --git a/include/rack.hpp b/include/rack.hpp index 506c42a8..3c9bbd58 100644 --- a/include/rack.hpp +++ b/include/rack.hpp @@ -99,6 +99,10 @@ #include +#undef PRIVATE +#define PRIVATE __attribute__ ((warning ("Using private function or symbol"))) + + namespace rack {