10000 Merge branch 'master' of github.com:tomaz/appledoc · wentaozone/appledoc@f57c440 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tomaz/appledoc
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaz committed Sep 3, 2012
2 parents 650dd19 + 700b493 commit f57c440
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Common/GBLog.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ - (NSString *)formatLogMessage:(DDLogMessage *)m {
case LOG_FLAG_DEBUG: level = @"debug"; break;
default: level = @"unknown"; break;
}
return [NSString stringWithFormat:@"%@:%u: %@: %@", m->originalFilename, m->originalLine, level, GBLogMessage(m)];
return [NSString stringWithFormat:@"%@:%lu: %@: %@", m->originalFilename, m->originalLine, level, GBLogMessage(m)];
}
return GBLogMessage(m);
}
Expand Down
2 changes: 1 addition & 1 deletion Common/NSException+GBException.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ + (NSString *)reasonWithError:(NSError *)error message:(NSString *)message {

NSMutableString *result = [NSMutableString string];
if (message) [result appendFormat:@"%@\n", message];
[result appendFormat:@"Error: %@, code %i: %@\n", domain, code, description];
[result appendFormat:@"Error: %@, code %li: %@\n", domain, code, description];
if (reason) [result appendFormat:@"Reason: %@", reason];
return result;
}
Expand Down
8 changes: 4 additions & 4 deletions Common/ThirdParty/CocoaLumberjack/DDFileLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath

[self deleteOldLogFiles];

[pool release];
[pool drain];
};

dispatch_async([DDLog loggingQueue], block);
Expand Down Expand Up @@ -569,7 +569,7 @@ - (void)setMaximumFileSize:(unsigned long long)newMaximumFileSize
maximumFileSize = newMaximumFileSize;
[self maybeRollLogFileDueToSize];

[pool release];
[pool drain];
};

if (dispatch_get_current_queue() == loggerQueue)
Expand Down Expand Up @@ -675,7 +675,7 @@ - (void)setRollingFrequency:(NSTimeInterval)newRollingFrequency
rollingFrequency = newRollingFrequency;
[self maybeRollLogFileDueToAge:nil];

[pool release];
[pool drain];
};

if (dispatch_get_current_queue() == loggerQueue)
Expand Down Expand Up @@ -795,7 +795,7 @@ - (void)rollLogFile
dispatch_block_t block = ^{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self rollLogFileNow];
[pool release];
[pool drain];
};
dispatch_async([DDLog loggingQueue], block);

Expand Down
14 changes: 7 additions & 7 deletions Common/ThirdParty/CocoaLumberjack/DDLog.m
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ + (void)addLogger:(id <DDLogger>)logger

[self lt_addLogger:logger];

[pool release];
[pool drain];
};

dispatch_async(loggingQueue, addLoggerBlock);
Expand Down Expand Up @@ -263,7 +263,7 @@ + (void)removeLogger:(id <DDLogger>)logger

[self lt_removeLogger:logger];

[pool release];
[pool drain];
};

dispatch_async(loggingQueue, removeLoggerBlock);
Expand Down Expand Up @@ -291,7 +291,7 @@ + (void)removeAllLoggers

[self lt_removeAllLoggers];

[pool release];
[pool drain];
};

dispatch_async(loggingQueue, removeAllLoggersBlock);
Expand Down Expand Up @@ -448,7 +448,7 @@ + (void)queueLogMessage:(DDLogMessage *)logMessage synchronously:(BOOL)flag

[self lt_log:logMessage];

[pool release];
[pool drain];
};

if (flag)
Expand Down Expand Up @@ -522,7 +522,7 @@ + (void)flushLog

[self lt_flush];

[pool release];
[pool drain];
};

dispatch_sync(loggingQueue, flushBlock);
Expand Down Expand Up @@ -895,7 +895,7 @@ + (void)lt_log:(DDLogMessage *)logMessage

[currentNode->logger logMessage:logMessage];

[pool release];
[pool drain];
};

dispatch_group_async(loggingGroup, currentNode->loggerQueue, loggerBlock);
Expand All @@ -918,7 +918,7 @@ + (void)lt_log:(DDLogMessage *)logMessage

[currentNode->logger logMessage:logMessage];

[pool release];
[pool drain];
};

dispatch_sync(currentNode->loggerQueue, loggerBlock);
Expand Down
2 changes: 1 addition & 1 deletion Common/ThirdParty/GRMustache/GRMustacheCompiler.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ - (void)tokenProducerDidFinish:(id<GRMustacheTokenProducer>)tokenProducer withEr

- (NSError *)parseErrorAtLine:(NSInteger)line description:(NSString *)description {
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithCapacity:3];
[userInfo setObject:[NSString stringWithFormat:@"Parse error at line %d: %@", line, description]
[userInfo setObject:[NSString stringWithFormat:@"Parse error at line %ld: %@", line, description]
forKey:NSLocalizedDescriptionKey];
[userInfo setObject:[NSNumber numberWithInteger:line]
forKey:GRMustacheErrorLine];
Expand Down
4 changes: 2 additions & 2 deletions Common/ThirdParty/GRMustache/GRMustacheContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ + (BOOL)class:(Class)class hasBOOLPropertyNamed:(NSString *)propertyName {
classes = [[NSMutableDictionary dictionaryWithCapacity:12] retain];
}

NSMutableDictionary *propertyNames = [classes objectForKey:class];
NSMutableDictionary *propertyNames = [classes objectForKey:NSStringFromClass(class)];
if (propertyNames == nil) {
propertyNames = [[NSMutableDictionary dictionaryWithCapacity:4] retain];
[classes setObject:propertyNames forKey:class];
[classes setObject:propertyNames forKey:NSStringFromClass(class)];
}

NSNumber *boolNumber = [propertyNames objectForKey:propertyName];
Expand Down
4 changes: 3 additions & 1 deletion Common/ThirdParty/GRMustache/GRMustacheTemplate.m
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ + (id)templateWithString:(NSString *)templateString templateId:(id)templateId te
- (id)initWithString:(NSString *)theTemplateString templateId:(id)theTemplateId templateLoader:(GRMustacheTemplateLoader *)theTemplateLoader {
NSAssert(theTemplateLoader, @"Can't init GRMustacheTemplate with nil template loader");
NSAssert(theTemplateString, @"Can't init GRMustacheTemplate with nil template string");
if (self == [self init]) {

self = [super init];
if (self) {
self.templateId = theTemplateId;
self.templateLoader = theTemplateLoader;
self.templateString = theTemplateString;
Expand Down
2 changes: 1 addition & 1 deletion Common/ThirdParty/GRMustache/GRMustacheTokenizer.m
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ - (void)didFinish {
- (void)didFinishWithParseErrorAtLine:(NSInteger)line description:(NSString *)description {
if (tokenConsumer) {
NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithCapacity:3];
[userInfo setObject:[NSString stringWithFormat:@"Parse error at line %d: %@", line, description]
[userInfo setObject:[NSString stringWithFormat:@"Parse error at line %ld: %@", line, description]
forKey:NSLocalizedDescriptionKey];
[userInfo setObject:[NSNumber numberWithInteger:line]
forKey:GRMustacheErrorLine];
Expand Down
2 changes: 1 addition & 1 deletion Common/ThirdParty/RegexKitLite/RegexKitLite.m
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ static void rkl_handleDelayedAssert(id self, SEL _cmd, id exception) {
else {
id functionString = [exception objectForKey:@"function"], fileString = [exception objectForKey:@"file"], descriptionString = [exception objectForKey:@"description"], lineNumber = [exception objectForKey:@"line"];
RKLCHardAbortAssert((functionString != NULL) && (fileString != NULL) && (descriptionString != NULL) && (lineNumber != NULL));
[[NSAssertionHandler currentHandler] handleFailureInFunction:functionString file:fileString lineNumber:(NSInteger)[lineNumber longValue] description:descriptionString];
[[NSAssertionHandler currentHandler] handleFailureInFunction:functionString file:fileString lineNumber:(NSInteger)[lineNumber longValue] description:@"%@",descriptionString];
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Model/GBStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ - (id)init {
#pragma mark Overriden methods

- (NSString *)debugDescription {
return [NSString stringWithFormat:@"%@{ %u classes, %u categories, %u protocols }", [self className], [self.classes count], [self.categories count], [self.protocols count]];
return [NSString stringWithFormat:@"%@{ %lu classes, %lu categories, %lu protocols }", [self className], [self.classes count], [self.categories count], [self.protocols count]];
}

#pragma mark Helper methods
Expand Down
21 changes: 13 additions & 8 deletions Processing/GBCommentsProcessor.m
Original file line number Diff line number Diff line change
Expand Up @@ -676,19 +676,21 @@ - (NSString *)stringByConvertingSimpleCrossReferencesInString:(NSString *)string
}

// If there is some text skipped after previous link (or search range), append it to output first.
if (linkData->range.location > lastUsedLocation) {
if (linkData && linkData->range.location > lastUsedLocation) {
NSRange skippedRange = NSMakeRange(lastUsedLocation, linkData->range.location - lastUsedLocation);
NSString *skippedText = [string substringWithRange:skippedRange];
//NSLog(@"adding skipped text to result : %@", skippedText);
[result appendString:skippedText];
}

// Convert the raw link to Markdown syntax and append to output.
NSString *markdownLink = isInsideMarkdown ? linkData->address : linkData->markdown;
[result appendString:markdownLink];

if(linkData) {
NSString *markdownLink = isInsideMarkdown ? linkData->address : linkData->markdown;
[result appendString:markdownLink];
}

// Update range and remove the link from the temporary array.
NSUInteger location = linkData->range.location + linkData->range.length;
NSUInteger location = linkData ? linkData->range.location + linkData->range.length : 0;
searchRange.location = location;
searchRange.length = searchEndLocation - location;
lastUsedLocation = location;
Expand All @@ -710,12 +712,15 @@ - (NSString *)stringByConvertingSimpleCrossReferencesInString:(NSString *)string

- (BOOL)isCrossReference:(GBCrossRefData *)data matchingObject:(id)object {
if ([object isTopLevelObject]) {
if ([object isKindOfClass:[GBClassData class]])
if ([object isKindOfClass:[GBClassData class]]) {
if ([data->description isEqualToString:[object nameOfClass]]) return YES;
else if ([object isKindOfClass:[GBCategoryData class]])
}
else if ([object isKindOfClass:[GBCategoryData class]]) {
if ([data->description isEqualToString:[object idOfCategory]]) return YES;
else if ([object isKindOfClass:[GBProtocolData class]])
}
else if ([object isKindOfClass:[GBProtocolData class]]) {
if ([data->description isEqualToString:[object nameOfProtocol]]) return YES;
}
} else {
if (![object isKindOfClass:[GBDocumentData class]] && [data->description isEqualToString:[object methodSelector]]) return YES;
}
Expand Down
7 changes: 3 additions & 4 deletions Testing/GBCommentTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ - (void)testHtmlString_shouldUseAssignedSettings {
component.settings = settings;
[[settings expect] stringByConvertingMarkdownToHTML:component.markdownValue];
// execute
NSString *html = component.htmlValue;
(void)component.htmlValue;
// verify
[settings verify];
html = nil; // just to suppress compiler warning of unused var...

}

- (void)testTextString_shouldUseAssignedSettings {
Expand All @@ -52,10 +52,9 @@ - (void)testTextString_shouldUseAssignedSettings {
component.settings = settings;
[[settings expect] stringByConvertingMarkdownToText:component.markdownValue];
// execute
NSString *html = component.textValue;
(void)component.textValue;
// verify
[settings verify];
html = nil; // just to suppress compiler warning of unused var...
}

@end
2 changes: 1 addition & 1 deletion Testing/GBObjectsAssertor.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ - (void)assertMethodArguments:(NSArray *)arguments matches:(NSString *)name, ...
[expectedComps removeObjectAtIndex:0];
char *argList = NULL;
if ([expectedComps count] > 0) {
argList = (char *)malloc(sizeof(NSString *) * [expectedComps count]);
argList = (char *)malloc(sizeof(char) * [expectedComps count]);
[expectedComps getObjects:(id *)argList];
}
[self assertCommentComponents:argument.argumentDescription matchesValues:firstExpectedComp values:(__va_list_tag *)argList];
Expand Down
5 changes: 5 additions & 0 deletions Testing/GBTemplateHandlerTesting.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ @interface GBTemplateHandler (TestingAPI)
@end

@implementation GBTemplateHandler (TestingAPI)
//method below is intenionally overwritten so we want to silent the warning
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
- (NSString *)templateString { return [self valueForKey:@"_templateString"]; }
#pragma clang diagnostic pop

- (NSDictionary *)templateSections { return [self valueForKey:@"_templateSections"]; }
- (GRMustacheTemplate *)template { return [self valueForKey:@"_template"]; }
@end
Expand Down
4 changes: 3 additions & 1 deletion appledoc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0430;
LastUpgradeCheck = 0450;
ORGANIZATIONNAME = "Gentle Bytes";
};
buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "appledoc" */;
Expand Down Expand Up @@ -1453,6 +1453,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1493,6 +1494,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
Expand Down
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f57c440

Please sign in to comment.
0