From 6066de480faaca760790531e692e453b2e58e24f Mon Sep 17 00:00:00 2001 From: Tanner Bennett Date: Thu, 18 Nov 2021 18:10:45 -0600 Subject: [PATCH] FLEXMacros should be public --- Classes/FLEX.h | 1 + Classes/Utility/FLEXMacros.h | 5 +++++ FLEX.podspec | 1 + 3 files changed, 7 insertions(+) diff --git a/Classes/FLEX.h b/Classes/FLEX.h index ac1888abea..b60645f4b3 100644 --- a/Classes/FLEX.h +++ b/Classes/FLEX.h @@ -20,5 +20,6 @@ #import #import +#import #import #import diff --git a/Classes/Utility/FLEXMacros.h b/Classes/Utility/FLEXMacros.h index f1c0fcf2af..373c9c56d4 100644 --- a/Classes/Utility/FLEXMacros.h +++ b/Classes/Utility/FLEXMacros.h @@ -9,10 +9,13 @@ #ifndef FLEXMacros_h #define FLEXMacros_h + #define flex_keywordify class NSObject; #define ctor flex_keywordify __attribute__((constructor)) void __flex_ctor_##__LINE__() #define dtor flex_keywordify __attribute__((destructor)) void __flex_dtor_##__LINE__() +#ifndef strongify + #define weakify(var) __weak __typeof(var) __weak__##var = var; #define strongify(var) \ @@ -21,6 +24,8 @@ _Pragma("clang diagnostic ignored \"-Wshadow\"") \ __strong typeof(var) var = __weak__##var; \ _Pragma("clang diagnostic pop") +#endif + // A macro to check if we are running in a test environment #define FLEX_IS_TESTING() (NSClassFromString(@"XCTest") != nil) diff --git a/FLEX.podspec b/FLEX.podspec index 6b8e76f390..fc75810bef 100644 --- a/FLEX.podspec +++ b/FLEX.podspec @@ -42,5 +42,6 @@ Pod::Spec.new do |spec| "Classes/Core/**/*.h", "Classes/Utility/Runtime/Objc/**/*.h", "Classes/ObjectExplorers/**/*.h", "Classes/Editing/**/*.h", "Classes/Utility/Categories/*.h", "Classes/Utility/FLEXAlert.h", + "Classes/Utility/FLEXMacros.h", "Classes/Utility/FLEXResources.h" ] end