aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPArrayAdditions.h
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-08-25 00:49:11 +0000
committerrowanbeentje <rowan@beent.je>2009-08-25 00:49:11 +0000
commit94f177aa0e8350a9bba0790ee41b606c461a314f (patch)
treeff2f0bfe1d03a1b7bdb2b54c8015c69f7ee65ad0 /Source/SPArrayAdditions.h
parent4f94e0a0a120fba845b040a6247a3af93f753c20 (diff)
downloadsequelpro-94f177aa0e8350a9bba0790ee41b606c461a314f.tar.gz
sequelpro-94f177aa0e8350a9bba0790ee41b606c461a314f.tar.bz2
sequelpro-94f177aa0e8350a9bba0790ee41b606c461a314f.zip
- Fix NSLock console lines
- Speed up table content processing a bit - Make the table content download/processing determinate where an approximate row count is available - Clean up table content source, assuming MCPStreamingResult will remain in use
Diffstat (limited to 'Source/SPArrayAdditions.h')
-rw-r--r--Source/SPArrayAdditions.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/SPArrayAdditions.h b/Source/SPArrayAdditions.h
index 473740fc..31493f22 100644
--- a/Source/SPArrayAdditions.h
+++ b/Source/SPArrayAdditions.h
@@ -28,6 +28,13 @@ static inline id NSArrayObjectAtIndex(NSArray* self, NSUInteger i) {
return (id)CFArrayGetValueAtIndex((CFArrayRef)self, i);
}
+static inline void NSMutableArrayAddObject(NSArray* self, id anObject) {
+ typedef void (*SPMutableArrayAddObjectMethodPtr)(NSArray*, SEL, id);
+ static SPMutableArrayAddObjectMethodPtr SPNSMutableArrayAddObject;
+ if (!SPNSMutableArrayAddObject) SPNSMutableArrayAddObject = (SPMutableArrayAddObjectMethodPtr)[self methodForSelector:@selector(addObject:)];
+ SPNSMutableArrayAddObject(self, @selector(addObject:), anObject);
+}
+
@interface NSArray (SPArrayAdditions)
- (NSString *)componentsJoinedAndBacktickQuoted;