Fix subscripting in 10.7
This commit is contained in:
1 parent
d1360727ec
commit
29e8fe453f
8 files changed
+25
-37
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
//
|
||||||
|
// SBLogger.m
|
||||||
|
// Subler
|
||||||
|
//
|
||||||
|
|
||||||
#include <Foundation/Foundation.h>
|
#include <Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface NSArray (Subscripting)
|
@interface NSArray (Subscripting)
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
//
|
||||||
|
// SBLogger.m
|
||||||
|
// Subler
|
||||||
|
//
|
||||||
|
|
||||||
#import "NSArray+Subscripting.h"
|
#import "NSArray+Subscripting.h"
|
||||||
#import <objc/runtime.h>
|
#import <objc/runtime.h>
|
||||||
|
|
||||||
@@ -7,7 +12,7 @@
|
|||||||
{
|
{
|
||||||
Class class = [self class];
|
Class class = [self class];
|
||||||
|
|
||||||
SEL swizzledSelector = @selector(bnr_objectAtIndexedSubscript:);
|
SEL swizzledSelector = @selector(dg_objectAtIndexedSubscript:);
|
||||||
|
|
||||||
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
|
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
|
||||||
|
|
||||||
@@ -18,7 +23,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)bnr_objectAtIndexedSubscript:(NSInteger)index
|
- (id)dg_objectAtIndexedSubscript:(NSInteger)index
|
||||||
{
|
{
|
||||||
return [self objectAtIndex:index];
|
return [self objectAtIndex:index];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
//
|
//
|
||||||
// NSDictionary+Subscript.h
|
// SBLogger.m
|
||||||
//
|
// Subler
|
||||||
//
|
|
||||||
// Created by Sernin van de Krol on 8/21/12.
|
|
||||||
// Copyright (c) 2012 Sernin van de Krol. All rights reserved.
|
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
//
|
//
|
||||||
// NSDictionary+Subscript.m
|
// SBLogger.m
|
||||||
|
// Subler
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// Created by Sernin van de Krol on 8/21/12.
|
|
||||||
// Copyright (c) 2012 Sernin van de Krol. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#import "NSDictionary+Subscript.h"
|
#import "NSDictionary+Subscript.h"
|
||||||
#import <objc/runtime.h>
|
#import <objc/runtime.h>
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
//
|
//
|
||||||
// NSMutableArray+Subscript.h
|
// SBLogger.m
|
||||||
//
|
// Subler
|
||||||
//
|
|
||||||
// Created by Sernin van de Krol on 8/21/12.
|
|
||||||
// Copyright (c) 2012 Sernin van de Krol. All rights reserved.
|
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
//
|
//
|
||||||
// NSMutableArray+Subscript.m
|
// SBLogger.m
|
||||||
|
// Subler
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// Created by Sernin van de Krol on 8/21/12.
|
|
||||||
// Copyright (c) 2012 Sernin van de Krol. All rights reserved.
|
|
||||||
//
|
|
||||||
#if __has_feature(objc_arc)
|
|
||||||
|
|
||||||
#import "NSMutableArray+Subscript.h"
|
#import "NSMutableArray+Subscript.h"
|
||||||
|
#import <objc/runtime.h>
|
||||||
|
|
||||||
@implementation NSMutableArray (Subscript)
|
@implementation NSMutableArray (Subscript)
|
||||||
|
|
||||||
@@ -46,5 +43,3 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
//
|
//
|
||||||
// NSMutableDictionary+Subscript.h
|
// SBLogger.m
|
||||||
//
|
// Subler
|
||||||
//
|
|
||||||
// Created by Sernin van de Krol on 8/21/12.
|
|
||||||
// Copyright (c) 2012 Sernin van de Krol. All rights reserved.
|
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
//
|
//
|
||||||
// NSMutableDictionary+Subscript.m
|
// SBLogger.m
|
||||||
|
// Subler
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// Created by Sernin van de Krol on 8/21/12.
|
|
||||||
// Copyright (c) 2012 Sernin van de Krol. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#import "NSMutableDictionary+Subscript.h"
|
#import "NSMutableDictionary+Subscript.h"
|
||||||
#import <objc/runtime.h>
|
#import <objc/runtime.h>
|
||||||
|
|||||||
Reference in new issue
Block a user