mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-09 11:52:17 +08:00
Merge Request Queue (See issue #75):
* Introduces RKRequestCache for cacheing responses (supports ETag conditional GET, use cache if available, use cache on error, etc.) closes #75 * Updates to Three20 layer to eliminate need for intermediary TTTableItem classes closes #76 * Fixes to ensure iOS 3.x compatability: * Switched compiler to Clang * Updated conditional checks for UIBackgroundTask symbols to ensure runtime safety on iOS 3.x * Removed unnecessary linkage against UIKit and CoreFoundation from library targets * Fix for issue where RKRequest objects could become stuck in infinite loop within RKRequestQueue loadNextInQueue if you start a request and then cancel immediately. On cancel only decrement loadCount if the request has start loading. refs #122
This commit is contained in:
3
Vendor/JSONKit/JSONKit.m
vendored
3
Vendor/JSONKit/JSONKit.m
vendored
@@ -1005,7 +1005,8 @@ static void _JKDictionaryAddObject(JKDictionary *dictionary, NSUInteger keyHash,
|
||||
|
||||
static JKHashTableEntry *_JKDictionaryHashTableEntryForKey(JKDictionary *dictionary, id aKey) {
|
||||
NSCParameterAssert((dictionary != NULL) && (dictionary->entry != NULL) && (dictionary->count <= dictionary->capacity));
|
||||
if(aKey == NULL) { return(NULL); }
|
||||
// Guard against a divide by zero here.
|
||||
if(aKey == NULL || 0 == dictionary->capacity) { return(NULL); }
|
||||
NSUInteger keyHash = CFHash(aKey), keyEntry = (keyHash % dictionary->capacity), idx = 0UL;
|
||||
JKHashTableEntry *atEntry = NULL;
|
||||
for(idx = 0UL; idx < dictionary->capacity; idx++) {
|
||||
|
||||
Reference in New Issue
Block a user