Index: testing/platform_test.h |
diff --git a/testing/platform_test.h b/testing/platform_test.h |
index 04fc845bd99bb1f19421834ee0ca6371eee37ef3..24980fbe0c160a72712b080df243fdf442c77a15 100644 |
--- a/testing/platform_test.h |
+++ b/testing/platform_test.h |
@@ -8,10 +8,8 @@ |
#include <gtest/gtest.h> |
#if defined(GTEST_OS_MAC) |
-#ifdef __OBJC__ |
-@class NSAutoreleasePool; |
-#else |
-class NSAutoreleasePool; |
+#ifndef __OBJC__ |
+typedef void* id; |
#endif |
// The purpose of this class us to provide a hook for platform-specific |
@@ -27,7 +25,10 @@ class PlatformTest : public testing::Test { |
PlatformTest(); |
private: |
- NSAutoreleasePool* pool_; |
+ // |pool_| is a NSAutoreleasePool, but since this header may be imported from |
+ // files built with Objective-C ARC that forbids explicit usage of |
+ // NSAutoreleasePools, it is declared as id here. |
+ id pool_; |
}; |
#else |
typedef testing::Test PlatformTest; |