diff options
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h b/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h index 50d40eac..37409b36 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h @@ -95,21 +95,28 @@ - (NSString *)_stringWithBytes:(const void *)bytes length:(NSUInteger)length; - (void)_setQueryExecutionTime:(double)theExecutionTime; -- (id)_getObjectFromBytes:(char *)bytes ofLength:(NSUInteger)length fieldType:(unsigned int)fieldType fieldDefinitionIndex:(NSUInteger)fieldIndex; + +@end + +// SPMySQLResult Data Conversion Private API +@interface SPMySQLResult (Data_Conversion_Private_API) + ++ (void)_initializeDataConversion; +- (id)_getObjectFromBytes:(char *)bytes ofLength:(NSUInteger)length fieldDefinitionIndex:(NSUInteger)fieldIndex previewLength:(NSUInteger)previewLength; @end /** * Set up a static function to allow fast calling of SPMySQLResult data conversion with cached selectors */ -static inline id SPMySQLResultGetObject(SPMySQLResult* self, char* bytes, NSUInteger length, unsigned int fieldType, NSUInteger fieldIndex) +static inline id SPMySQLResultGetObject(SPMySQLResult* self, char* bytes, NSUInteger length, NSUInteger fieldIndex, NSUInteger previewLength) { - typedef id (*SPMySQLResultGetObjectMethodPtr)(SPMySQLResult*, SEL, char*, NSUInteger, unsigned int, NSUInteger); + typedef id (*SPMySQLResultGetObjectMethodPtr)(SPMySQLResult*, SEL, char*, NSUInteger, NSUInteger, NSUInteger); static SPMySQLResultGetObjectMethodPtr cachedMethodPointer; static SEL cachedSelector; - if (!cachedSelector) cachedSelector = @selector(_getObjectFromBytes:ofLength:fieldType:fieldDefinitionIndex:); + if (!cachedSelector) cachedSelector = @selector(_getObjectFromBytes:ofLength:fieldDefinitionIndex:previewLength:); if (!cachedMethodPointer) cachedMethodPointer = (SPMySQLResultGetObjectMethodPtr)[self methodForSelector:cachedSelector]; - return cachedMethodPointer(self, cachedSelector, bytes, length, fieldType, fieldIndex); + return cachedMethodPointer(self, cachedSelector, bytes, length, fieldIndex, previewLength); } |