aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar dmaclach <dmaclach@gmail.com>2018-11-11 10:46:22 -0800
committerGravatar GitHub <noreply@github.com>2018-11-11 10:46:22 -0800
commitfb4035f4403005ad400e98a0f1f6f527a26a1658 (patch)
tree621e6eb788574743ea1759b9d63aa4eae186657b
parent1507eb202cf007c7788d220a1f319d88b8709d6b (diff)
Deprecate GTMRegex. Use NSRegularExpression instead. (#184)
-rw-r--r--Foundation/GTMRegex.h3
-rw-r--r--Foundation/GTMRegex.m6
-rw-r--r--Foundation/GTMRegexTest.m6
3 files changed, 15 insertions, 0 deletions
diff --git a/Foundation/GTMRegex.h b/Foundation/GTMRegex.h
index 03f7ae5..1108041 100644
--- a/Foundation/GTMRegex.h
+++ b/Foundation/GTMRegex.h
@@ -117,6 +117,9 @@ _EXTERN NSString* kGTMRegexPatternErrorErrorString _INITIALIZE_AS(@"patternError
// withReplacement:@"<i>\\1</i><b>\\2</b>"];
// ....
//
+
+// Use NSRegularExpression instead
+NS_DEPRECATED(10_0, 10_7, 1_0, 4_0)
@interface GTMRegex : NSObject {
@private
NSString *pattern_;
diff --git a/Foundation/GTMRegex.m b/Foundation/GTMRegex.m
index 957b9ce..5649156 100644
--- a/Foundation/GTMRegex.m
+++ b/Foundation/GTMRegex.m
@@ -20,6 +20,10 @@
#import "GTMRegex.h"
#import "GTMDefines.h"
+#pragma clang diagnostic push
+// Ignore all of the deprecation warnings for GTMRegex
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
// This is the pattern to use for walking replacement text when doing
// substitutions.
//
@@ -796,3 +800,5 @@ static NSString *const kReplacementPattern =
}
@end
+
+#pragma clang diagnostic push
diff --git a/Foundation/GTMRegexTest.m b/Foundation/GTMRegexTest.m
index 65aadd5..75f5aad 100644
--- a/Foundation/GTMRegexTest.m
+++ b/Foundation/GTMRegexTest.m
@@ -26,6 +26,10 @@
// libregex, we just want to test our wrapper.
//
+#pragma clang diagnostic push
+// Ignore all of the deprecation warnings for GTMRegex
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
@interface GTMRegexTest : GTMTestCase
@end
@@ -1218,3 +1222,5 @@
}
@end
+
+#pragma clang diagnostic pop