From 4fd103b5de98d2f469b982677ea389e7ee7d64b3 Mon Sep 17 00:00:00 2001 From: "thomasvl@gmail.com" Date: Fri, 9 Jan 2009 20:34:30 +0000 Subject: - turned off _debug framework support in tests since we now capture a lot more in log validation. - Added GTM_SUPPORT_GC for controlling the inclusion of GC related code. - If you are using GTMUnitTestDevLog, it also tries to capture logs from NSAssert. - Added GTM_FOREACH_OBJECT/GTM_FOREACH_KEY that uses NSEnumerator and objectEnumerator/keyEnumerator on 10.4, but on 10.5+/iPhone uses FastEnumeration. - GTMNSWorkspace+Running gives a variety of ways of determining the attributes of running processes. --- Foundation/GTMRegex.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Foundation/GTMRegex.m') diff --git a/Foundation/GTMRegex.m b/Foundation/GTMRegex.m index 71d5050..1027224 100644 --- a/Foundation/GTMRegex.m +++ b/Foundation/GTMRegex.m @@ -190,6 +190,7 @@ static NSString *const kReplacementPattern = return self; } +#if GTM_SUPPORT_GC - (void)finalize { // we used pattern_ as our flag that we initialized the regex_t if (pattern_) { @@ -200,6 +201,7 @@ static NSString *const kReplacementPattern = } [super finalize]; } +#endif - (void)dealloc { // we used pattern_ as our flag that we initialized the regex_t @@ -390,9 +392,8 @@ static NSString *const kReplacementPattern = // no replacements, they want to eat matches, nothing to do } else { // spin over the split up replacement - NSEnumerator *replacementEnumerator = [replacements objectEnumerator]; GTMRegexStringSegment *replacementSegment = nil; - while ((replacementSegment = [replacementEnumerator nextObject]) != nil) { + GTM_FOREACH_OBJECT(replacementSegment, replacements) { if (![replacementSegment isMatch]) { // not a match, raw text to put in [result appendString:[replacementSegment string]]; -- cgit v1.2.3