Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #135 from ole/keypath-reverse-condition
Browse files Browse the repository at this point in the history
Make @keypath macro more resilient when combined with other expressions
  • Loading branch information
diederich authored Jun 29, 2018
2 parents 6c5b3c0 + 8d3d597 commit 3acbd6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extobjc/EXTKeyPathCoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ NSString *lowercaseStringPath = @keypath(NSString.new, lowercaseString);
#define keypath(...) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-repeated-use-of-weak\"") \
(YES).boolValue ? (NSString * _Nonnull)@(cStringKeypath(__VA_ARGS__)) : (NSString * _Nonnull)nil \
(NO).boolValue ? ((NSString * _Nonnull)nil) : ((NSString * _Nonnull)@(cStringKeypath(__VA_ARGS__))) \
_Pragma("clang diagnostic pop") \

#define cStringKeypath(...) \
Expand Down

0 comments on commit 3acbd6a

Please sign in to comment.