Adds SetArgPointee to replace SetArgumentPointee.
diff --git a/include/gmock/gmock-actions.h b/include/gmock/gmock-actions.h
index 6eb3f44..1d5509c 100644
--- a/include/gmock/gmock-actions.h
+++ b/include/gmock/gmock-actions.h
@@ -1016,6 +1016,15 @@
 PolymorphicAction<
   internal::SetArgumentPointeeAction<
     N, T, internal::IsAProtocolMessage<T>::value> >
+SetArgPointee(const T& x) {
+  return MakePolymorphicAction(internal::SetArgumentPointeeAction<
+      N, T, internal::IsAProtocolMessage<T>::value>(x));
+}
+// The following version is DEPRECATED.
+template <size_t N, typename T>
+PolymorphicAction<
+  internal::SetArgumentPointeeAction<
+    N, T, internal::IsAProtocolMessage<T>::value> >
 SetArgumentPointee(const T& x) {
   return MakePolymorphicAction(internal::SetArgumentPointeeAction<
       N, T, internal::IsAProtocolMessage<T>::value>(x));
diff --git a/scripts/gmock_doctor.py b/scripts/gmock_doctor.py
index 4a41abf..18c117f 100755
--- a/scripts/gmock_doctor.py
+++ b/scripts/gmock_doctor.py
@@ -102,6 +102,7 @@
     'ReturnRef',
     'SaveArg',
     'SetArgReferee',
+    'SetArgPointee',
     'SetArgumentPointee',
     'SetArrayArgument',
     'SetErrnoAndReturn',
diff --git a/test/gmock-actions_test.cc b/test/gmock-actions_test.cc
index fd52ce2..7200fa1 100644
--- a/test/gmock-actions_test.cc
+++ b/test/gmock-actions_test.cc
@@ -69,6 +69,7 @@
 using testing::ReturnNull;
 using testing::ReturnRef;
 using testing::ReturnRefOfCopy;
+using testing::SetArgPointee;
 using testing::SetArgumentPointee;
 
 #if !GTEST_OS_WINDOWS_MOBILE
@@ -694,6 +695,125 @@
   }, "DoDefault() cannot be used in ON_CALL()");
 }
 
+// Tests that SetArgPointee<N>(v) sets the variable pointed to by
+// the N-th (0-based) argument to v.
+TEST(SetArgPointeeTest, SetsTheNthPointee) {
+  typedef void MyFunction(bool, int*, char*);
+  Action<MyFunction> a = SetArgPointee<1>(2);
+
+  int n = 0;
+  char ch = '\0';
+  a.Perform(make_tuple(true, &n, &ch));
+  EXPECT_EQ(2, n);
+  EXPECT_EQ('\0', ch);
+
+  a = SetArgPointee<2>('a');
+  n = 0;
+  ch = '\0';
+  a.Perform(make_tuple(true, &n, &ch));
+  EXPECT_EQ(0, n);
+  EXPECT_EQ('a', ch);
+}
+
+#if GTEST_HAS_PROTOBUF_
+
+// Tests that SetArgPointee<N>(proto_buffer) sets the v1 protobuf
+// variable pointed to by the N-th (0-based) argument to proto_buffer.
+TEST(SetArgPointeeTest, SetsTheNthPointeeOfProtoBufferType) {
+  TestMessage* const msg = new TestMessage;
+  msg->set_member("yes");
+  TestMessage orig_msg;
+  orig_msg.CopyFrom(*msg);
+
+  Action<void(bool, TestMessage*)> a = SetArgPointee<1>(*msg);
+  // SetArgPointee<N>(proto_buffer) makes a copy of proto_buffer
+  // s.t. the action works even when the original proto_buffer has
+  // died.  We ensure this behavior by deleting msg before using the
+  // action.
+  delete msg;
+
+  TestMessage dest;
+  EXPECT_FALSE(orig_msg.Equals(dest));
+  a.Perform(make_tuple(true, &dest));
+  EXPECT_TRUE(orig_msg.Equals(dest));
+}
+
+// Tests that SetArgPointee<N>(proto_buffer) sets the
+// ::ProtocolMessage variable pointed to by the N-th (0-based)
+// argument to proto_buffer.
+TEST(SetArgPointeeTest, SetsTheNthPointeeOfProtoBufferBaseType) {
+  TestMessage* const msg = new TestMessage;
+  msg->set_member("yes");
+  TestMessage orig_msg;
+  orig_msg.CopyFrom(*msg);
+
+  Action<void(bool, ::ProtocolMessage*)> a = SetArgPointee<1>(*msg);
+  // SetArgPointee<N>(proto_buffer) makes a copy of proto_buffer
+  // s.t. the action works even when the original proto_buffer has
+  // died.  We ensure this behavior by deleting msg before using the
+  // action.
+  delete msg;
+
+  TestMessage dest;
+  ::ProtocolMessage* const dest_base = &dest;
+  EXPECT_FALSE(orig_msg.Equals(dest));
+  a.Perform(make_tuple(true, dest_base));
+  EXPECT_TRUE(orig_msg.Equals(dest));
+}
+
+// Tests that SetArgPointee<N>(proto2_buffer) sets the v2
+// protobuf variable pointed to by the N-th (0-based) argument to
+// proto2_buffer.
+TEST(SetArgPointeeTest, SetsTheNthPointeeOfProto2BufferType) {
+  using testing::internal::FooMessage;
+  FooMessage* const msg = new FooMessage;
+  msg->set_int_field(2);
+  msg->set_string_field("hi");
+  FooMessage orig_msg;
+  orig_msg.CopyFrom(*msg);
+
+  Action<void(bool, FooMessage*)> a = SetArgPointee<1>(*msg);
+  // SetArgPointee<N>(proto2_buffer) makes a copy of
+  // proto2_buffer s.t. the action works even when the original
+  // proto2_buffer has died.  We ensure this behavior by deleting msg
+  // before using the action.
+  delete msg;
+
+  FooMessage dest;
+  dest.set_int_field(0);
+  a.Perform(make_tuple(true, &dest));
+  EXPECT_EQ(2, dest.int_field());
+  EXPECT_EQ("hi", dest.string_field());
+}
+
+// Tests that SetArgPointee<N>(proto2_buffer) sets the
+// proto2::Message variable pointed to by the N-th (0-based) argument
+// to proto2_buffer.
+TEST(SetArgPointeeTest, SetsTheNthPointeeOfProto2BufferBaseType) {
+  using testing::internal::FooMessage;
+  FooMessage* const msg = new FooMessage;
+  msg->set_int_field(2);
+  msg->set_string_field("hi");
+  FooMessage orig_msg;
+  orig_msg.CopyFrom(*msg);
+
+  Action<void(bool, ::proto2::Message*)> a = SetArgPointee<1>(*msg);
+  // SetArgPointee<N>(proto2_buffer) makes a copy of
+  // proto2_buffer s.t. the action works even when the original
+  // proto2_buffer has died.  We ensure this behavior by deleting msg
+  // before using the action.
+  delete msg;
+
+  FooMessage dest;
+  dest.set_int_field(0);
+  ::proto2::Message* const dest_base = &dest;
+  a.Perform(make_tuple(true, dest_base));
+  EXPECT_EQ(2, dest.int_field());
+  EXPECT_EQ("hi", dest.string_field());
+}
+
+#endif  // GTEST_HAS_PROTOBUF_
+
 // Tests that SetArgumentPointee<N>(v) sets the variable pointed to by
 // the N-th (0-based) argument to v.
 TEST(SetArgumentPointeeTest, SetsTheNthPointee) {
diff --git a/test/gmock-generated-actions_test.cc b/test/gmock-generated-actions_test.cc
index f4d42a3..982be1b 100644
--- a/test/gmock-generated-actions_test.cc
+++ b/test/gmock-generated-actions_test.cc
@@ -58,7 +58,7 @@
 using testing::Invoke;
 using testing::Return;
 using testing::ReturnNew;
-using testing::SetArgumentPointee;
+using testing::SetArgPointee;
 using testing::StaticAssertTypeEq;
 using testing::Unused;
 using testing::WithArgs;
@@ -419,7 +419,7 @@
 // Tests DoAll(a1, a2).
 TEST(DoAllTest, TwoActions) {
   int n = 0;
-  Action<int(int*)> a = DoAll(SetArgumentPointee<0>(1),  // NOLINT
+  Action<int(int*)> a = DoAll(SetArgPointee<0>(1),  // NOLINT
                               Return(2));
   EXPECT_EQ(2, a.Perform(make_tuple(&n)));
   EXPECT_EQ(1, n);
@@ -428,8 +428,8 @@
 // Tests DoAll(a1, a2, a3).
 TEST(DoAllTest, ThreeActions) {
   int m = 0, n = 0;
-  Action<int(int*, int*)> a = DoAll(SetArgumentPointee<0>(1),  // NOLINT
-                                    SetArgumentPointee<1>(2),
+  Action<int(int*, int*)> a = DoAll(SetArgPointee<0>(1),  // NOLINT
+                                    SetArgPointee<1>(2),
                                     Return(3));
   EXPECT_EQ(3, a.Perform(make_tuple(&m, &n)));
   EXPECT_EQ(1, m);
@@ -441,9 +441,9 @@
   int m = 0, n = 0;
   char ch = '\0';
   Action<int(int*, int*, char*)> a =  // NOLINT
-      DoAll(SetArgumentPointee<0>(1),
-            SetArgumentPointee<1>(2),
-            SetArgumentPointee<2>('a'),
+      DoAll(SetArgPointee<0>(1),
+            SetArgPointee<1>(2),
+            SetArgPointee<2>('a'),
             Return(3));
   EXPECT_EQ(3, a.Perform(make_tuple(&m, &n, &ch)));
   EXPECT_EQ(1, m);
@@ -456,10 +456,10 @@
   int m = 0, n = 0;
   char a = '\0', b = '\0';
   Action<int(int*, int*, char*, char*)> action =  // NOLINT
-      DoAll(SetArgumentPointee<0>(1),
-            SetArgumentPointee<1>(2),
-            SetArgumentPointee<2>('a'),
-            SetArgumentPointee<3>('b'),
+      DoAll(SetArgPointee<0>(1),
+            SetArgPointee<1>(2),
+            SetArgPointee<2>('a'),
+            SetArgPointee<3>('b'),
             Return(3));
   EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b)));
   EXPECT_EQ(1, m);
@@ -473,11 +473,11 @@
   int m = 0, n = 0;
   char a = '\0', b = '\0', c = '\0';
   Action<int(int*, int*, char*, char*, char*)> action =  // NOLINT
-      DoAll(SetArgumentPointee<0>(1),
-            SetArgumentPointee<1>(2),
-            SetArgumentPointee<2>('a'),
-            SetArgumentPointee<3>('b'),
-            SetArgumentPointee<4>('c'),
+      DoAll(SetArgPointee<0>(1),
+            SetArgPointee<1>(2),
+            SetArgPointee<2>('a'),
+            SetArgPointee<3>('b'),
+            SetArgPointee<4>('c'),
             Return(3));
   EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c)));
   EXPECT_EQ(1, m);
@@ -492,12 +492,12 @@
   int m = 0, n = 0;
   char a = '\0', b = '\0', c = '\0', d = '\0';
   Action<int(int*, int*, char*, char*, char*, char*)> action =  // NOLINT
-      DoAll(SetArgumentPointee<0>(1),
-            SetArgumentPointee<1>(2),
-            SetArgumentPointee<2>('a'),
-            SetArgumentPointee<3>('b'),
-            SetArgumentPointee<4>('c'),
-            SetArgumentPointee<5>('d'),
+      DoAll(SetArgPointee<0>(1),
+            SetArgPointee<1>(2),
+            SetArgPointee<2>('a'),
+            SetArgPointee<3>('b'),
+            SetArgPointee<4>('c'),
+            SetArgPointee<5>('d'),
             Return(3));
   EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d)));
   EXPECT_EQ(1, m);
@@ -514,13 +514,13 @@
   char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0';
   Action<int(int*, int*, char*, char*, char*, char*,  // NOLINT
              char*)> action =
-      DoAll(SetArgumentPointee<0>(1),
-            SetArgumentPointee<1>(2),
-            SetArgumentPointee<2>('a'),
-            SetArgumentPointee<3>('b'),
-            SetArgumentPointee<4>('c'),
-            SetArgumentPointee<5>('d'),
-            SetArgumentPointee<6>('e'),
+      DoAll(SetArgPointee<0>(1),
+            SetArgPointee<1>(2),
+            SetArgPointee<2>('a'),
+            SetArgPointee<3>('b'),
+            SetArgPointee<4>('c'),
+            SetArgPointee<5>('d'),
+            SetArgPointee<6>('e'),
             Return(3));
   EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e)));
   EXPECT_EQ(1, m);
@@ -538,14 +538,14 @@
   char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0', f = '\0';
   Action<int(int*, int*, char*, char*, char*, char*,  // NOLINT
              char*, char*)> action =
-      DoAll(SetArgumentPointee<0>(1),
-            SetArgumentPointee<1>(2),
-            SetArgumentPointee<2>('a'),
-            SetArgumentPointee<3>('b'),
-            SetArgumentPointee<4>('c'),
-            SetArgumentPointee<5>('d'),
-            SetArgumentPointee<6>('e'),
-            SetArgumentPointee<7>('f'),
+      DoAll(SetArgPointee<0>(1),
+            SetArgPointee<1>(2),
+            SetArgPointee<2>('a'),
+            SetArgPointee<3>('b'),
+            SetArgPointee<4>('c'),
+            SetArgPointee<5>('d'),
+            SetArgPointee<6>('e'),
+            SetArgPointee<7>('f'),
             Return(3));
   EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f)));
   EXPECT_EQ(1, m);
@@ -565,15 +565,15 @@
   char e = '\0', f = '\0', g = '\0';
   Action<int(int*, int*, char*, char*, char*, char*,  // NOLINT
              char*, char*, char*)> action =
-      DoAll(SetArgumentPointee<0>(1),
-            SetArgumentPointee<1>(2),
-            SetArgumentPointee<2>('a'),
-            SetArgumentPointee<3>('b'),
-            SetArgumentPointee<4>('c'),
-            SetArgumentPointee<5>('d'),
-            SetArgumentPointee<6>('e'),
-            SetArgumentPointee<7>('f'),
-            SetArgumentPointee<8>('g'),
+      DoAll(SetArgPointee<0>(1),
+            SetArgPointee<1>(2),
+            SetArgPointee<2>('a'),
+            SetArgPointee<3>('b'),
+            SetArgPointee<4>('c'),
+            SetArgPointee<5>('d'),
+            SetArgPointee<6>('e'),
+            SetArgPointee<7>('f'),
+            SetArgPointee<8>('g'),
             Return(3));
   EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f, &g)));
   EXPECT_EQ(1, m);
diff --git a/test/gmock-more-actions_test.cc b/test/gmock-more-actions_test.cc
index c09cccf..64c4e08 100644
--- a/test/gmock-more-actions_test.cc
+++ b/test/gmock-more-actions_test.cc
@@ -60,7 +60,6 @@
 using testing::ReturnPointee;
 using testing::SaveArg;
 using testing::SetArgReferee;
-using testing::SetArgumentPointee;
 using testing::StaticAssertTypeEq;
 using testing::Unused;
 using testing::WithArg;
diff --git a/test/gmock_link_test.h b/test/gmock_link_test.h
index 00b2110..499cc18 100644
--- a/test/gmock_link_test.h
+++ b/test/gmock_link_test.h
@@ -44,7 +44,7 @@
 //      ReturnNull
 //      ReturnRef
 //      Assign
-//      SetArgumentPointee
+//      SetArgPointee
 //      SetArrayArgument
 //      SetErrnoAndReturn
 //      Invoke(function)
@@ -164,7 +164,7 @@
 using testing::Return;
 using testing::ReturnNull;
 using testing::ReturnRef;
-using testing::SetArgumentPointee;
+using testing::SetArgPointee;
 using testing::SetArrayArgument;
 using testing::StartsWith;
 using testing::StrCaseEq;
@@ -281,12 +281,12 @@
   mock.VoidFromString(NULL);
 }
 
-// Tests the linkage of the SetArgumentPointee action.
-TEST(LinkTest, TestSetArgumentPointee) {
+// Tests the linkage of the SetArgPointee action.
+TEST(LinkTest, TestSetArgPointee) {
   Mock mock;
   char ch = 'x';
 
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArgumentPointee<0>('y'));
+  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArgPointee<0>('y'));
   mock.VoidFromString(&ch);
 }
 
@@ -381,7 +381,7 @@
   char ch = 'x';
 
   EXPECT_CALL(mock, VoidFromString(_))
-      .WillOnce(DoAll(SetArgumentPointee<0>('y'), Return()));
+      .WillOnce(DoAll(SetArgPointee<0>('y'), Return()));
   mock.VoidFromString(&ch);
 }