From 8458ac018678fe295ef226e14fa910b826f5ee93 Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 18 Nov 2021 14:31:26 +0000 Subject: [PATCH] MessageManager: Correct visibility of repostCurrentNSEvent This commit reverts c34f13a02db7ba716649d473baa48769dcded814 In stripped plugin builds, the repostCurrentNSEvent function was still public. There doesn't seem to be a good reason for this, as no host should need to call the function. It looks like the shared code component of a Projucer-generated plugin project was briefly built as a framework that was shared by the different plugin wrappers. In this scenario, the framework would need to make repostCurrentNSEvent public so that the wrappers could locate the function. However, now that the shared code target is built as a static library, standard external linkage should be sufficient for the symbol to be located from the wrapper's TUs. --- modules/juce_events/native/juce_mac_MessageManager.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_events/native/juce_mac_MessageManager.mm b/modules/juce_events/native/juce_mac_MessageManager.mm index a3806649fa..7ccdf8177f 100644 --- a/modules/juce_events/native/juce_mac_MessageManager.mm +++ b/modules/juce_events/native/juce_mac_MessageManager.mm @@ -460,8 +460,8 @@ void MessageManager::broadcastMessage (const String& message) } // Special function used by some plugin classes to re-post carbon events -void __attribute__ ((visibility("default"))) repostCurrentNSEvent(); -void __attribute__ ((visibility("default"))) repostCurrentNSEvent() +void repostCurrentNSEvent(); +void repostCurrentNSEvent() { struct EventReposter : public CallbackMessage {