This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL PSPDFSystemFunctionOverriddenInCategory(Class theClass, SEL selector, NSString *__autoreleasing* categoryName) { | |
NSCParameterAssert(theClass); | |
NSCParameterAssert(selector); | |
Dl_info info; | |
if (dladdr(class_getMethodImplementation(theClass, selector), &info)) { | |
// /System/Library/Frameworks is a common denominator, some methods are in /usr/lib/libobjc.A.dylib | |
// Custom app is in /private/var/mobile/Containers/Bundle/Application/<UID>/PSPDFCatalog.app/PSPDFCatalog | |
if (!strstr(info.dli_fname, "/System/Library") && !strstr(info.dli_fname, "/usr/lib")) { | |
if (categoryName) *categoryName = @(info.dli_sname); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
typedef NS_ENUM(int, GJLRangeDirection) { | |
GJLRangeDirectionPositive, | |
GJLRangeDirectionNegative, | |
}; | |
@interface GJLRange : NSEnumerator | |
+ (instancetype)rangeWithStart: (NSNumber *)start end: (NSNumber *)end step: (NSNumber *)step; |