@@ -22,19 +22,19 @@ #import "OFMapTable.h" #import "OFInvalidArgumentException.h" static uint32_t -stringHash(void *value) +stringHash(void *object) { - return [(OFString*)value hash]; + return [(OFString*)object hash]; } static bool -stringEqual(void *value1, void *value2) +stringEqual(void *object1, void *object2) { - return [(OFString*)value1 isEqual: (OFString*)value2]; + return [(OFString*)object1 isEqual: (OFString*)object2]; } @implementation OFOptionsParser @synthesize lastOption = _lastOption, lastLongOption = _lastLongOption; @synthesize argument = _argument; @@ -59,11 +59,11 @@ of_options_parser_option_t *iter2; const of_map_table_functions_t keyFunctions = { .hash = stringHash, .equal = stringEqual }; - const of_map_table_functions_t valueFunctions = { NULL }; + const of_map_table_functions_t objectFunctions = { NULL }; /* Count, sanity check, initialize pointers */ for (iter = options; iter->shortOption != '\0' || iter->longOption != nil; iter++) { @@ -85,11 +85,11 @@ count++; } _longOptions = [[OFMapTable alloc] initWithKeyFunctions: keyFunctions - valueFunctions: valueFunctions]; + objectFunctions: objectFunctions]; _options = [self allocMemoryWithSize: sizeof(*_options) count: count + 1]; for (iter = options, iter2 = _options; @@ -104,19 +104,19 @@ if (iter->longOption != nil) { @try { iter2->longOption = [iter->longOption copy]; - if ([_longOptions valueForKey: + if ([_longOptions objectForKey: iter2->longOption] != NULL) @throw [OFInvalidArgumentException exception]; [_longOptions - setValue: iter2 - forKey: iter2->longOption]; + setObject: iter2 + forKey: iter2->longOption]; } @catch (id e) { /* * Make sure we are in a consistent * state where dealloc works. */ @@ -207,11 +207,11 @@ _lastLongOption = [[argument substringWithRange: of_range(2, pos - 2)] copy]; objc_autoreleasePoolPop(pool); - option = [_longOptions valueForKey: _lastLongOption]; + option = [_longOptions objectForKey: _lastLongOption]; if (option == NULL) return '?'; if (option->hasArgument == 1 && _argument == nil) return ':';