Skip to content

Commit

Permalink
FLEXMacros should be public
Browse files Browse the repository at this point in the history
  • Loading branch information
NSExceptional committed Nov 19, 2021
1 parent 0fd7dfa commit 6066de4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Classes/FLEX.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
#import <FLEX-Categories.h>
#import <FLEX-ObjectExploring.h>

#import <FLEXMacros.h>
#import <FLEXAlert.h>
#import <FLEXResources.h>
5 changes: 5 additions & 0 deletions Classes/Utility/FLEXMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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)

Expand Down
1 change: 1 addition & 0 deletions FLEX.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6066de4

Please sign in to comment.