$OpenBSD$ try to fix build with llvm/libobc2 --- Modules/Parsers/ProjectCenter/PCParser.m.orig Wed Apr 6 19:40:19 2011 +++ Modules/Parsers/ProjectCenter/PCParser.m Wed Apr 6 19:44:48 2011 @@ -124,12 +124,6 @@ CodeType codeType(unichar *ch) } } -static SEL selString = @selector(string:); -static SEL selNumber = @selector(number:); -static SEL selSpaceAndNewLine = @selector(spaceAndNewLine:); -static SEL selInvisible = @selector(invisible:); -static SEL selSymbol = @selector(symbol:); - static void (*impString)(id, SEL, id); static void (*impNumber)(id, SEL, id); static void (*impSpaceAndNewLine)(id, SEL, unichar); @@ -145,15 +139,15 @@ static void (*impSymbol)(id, SEL, unichar); NSLog(@"CodeParser begin..."); impString = (void (*)(id, SEL, id)) - [[_handler class] instanceMethodForSelector:selString]; + [[_handler class] instanceMethodForSelector:@selector(string:)]; impNumber = (void (*)(id, SEL, id)) - [[_handler class] instanceMethodForSelector:selNumber]; + [[_handler class] instanceMethodForSelector:@selector(number:)]; impSpaceAndNewLine = (void (*)(id, SEL, unichar)) - [[_handler class] instanceMethodForSelector:selSpaceAndNewLine]; + [[_handler class] instanceMethodForSelector:@selector(spaceAndNewLine:)]; impInvisible = (void (*)(id, SEL, unichar)) - [[_handler class] instanceMethodForSelector:selInvisible]; + [[_handler class] instanceMethodForSelector:@selector(invisible:)]; impSymbol = (void (*)(id, SEL, unichar)) - [[_handler class] instanceMethodForSelector:selSymbol]; + [[_handler class] instanceMethodForSelector:@selector(symbol:)]; start = end = 0; startType = codeType(_uchar+start); @@ -172,12 +166,12 @@ static void (*impSymbol)(id, SEL, unichar); if (startType == StringCodeType) { out = [_string substringWithRange:NSMakeRange(start, end-start)]; - (*impString)(_handler, selString, out); + (*impString)(_handler, @selector(string:), out); } else if (startType == NumberCodeType) { out = [_string substringWithRange: NSMakeRange(start, end-start)]; - (*impNumber)(_handler, selNumber, out); + (*impNumber)(_handler, @selector(number:), out); } else if (startType == SpaceAndNewLineCodeType) { @@ -185,7 +179,7 @@ static void (*impSymbol)(id, SEL, unichar); for (j = 0; j < jlen; j++) { (*impSpaceAndNewLine)(_handler, - selSpaceAndNewLine, _uchar[start+j]); + @selector(spaceAndNewLine:), _uchar[start+j]); } } else if (startType == SymbolCodeType) @@ -193,7 +187,7 @@ static void (*impSymbol)(id, SEL, unichar); unsigned int j, jlen = end-start/*[out length]*/; for (j = 0; j < jlen; j++) { - (*impSymbol)(_handler, selSymbol, _uchar[start+j]); + (*impSymbol)(_handler, @selector(symbol:), _uchar[start+j]); } } else if (startType == InvisibleCodeType) @@ -201,7 +195,7 @@ static void (*impSymbol)(id, SEL, unichar); unsigned int j, jlen = end-start/*[out length]*/; for (j = 0; j < jlen; j++) { - (*impInvisible)(_handler, selInvisible, _uchar[start+j]); + (*impInvisible)(_handler, @selector(invisible:), _uchar[start+j]); } } start = i;