Eliminate gpr_ int types - and insist on C99 variants instead
diff --git a/test/cpp/common/alarm_test.cc b/test/cpp/common/alarm_test.cc
index 18083cd..d41a25a 100644
--- a/test/cpp/common/alarm_test.cc
+++ b/test/cpp/common/alarm_test.cc
@@ -43,12 +43,12 @@
class TestTag : public CompletionQueueTag {
public:
TestTag() : tag_(0) {}
- TestTag(gpr_intptr tag) : tag_(tag) {}
+ TestTag(intptr_t tag) : tag_(tag) {}
bool FinalizeResult(void** tag, bool* status) { return true; }
- gpr_intptr tag() { return tag_; }
+ intptr_t tag() { return tag_; }
private:
- gpr_intptr tag_;
+ intptr_t tag_;
};
TEST(AlarmTest, RegularExpiry) {
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index 279423a..af0b7fd 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -63,7 +63,7 @@
namespace {
-void* tag(int i) { return (void*)(gpr_intptr)i; }
+void* tag(int i) { return (void*)(intptr_t)i; }
#ifdef GPR_POSIX_SOCKET
static int assert_non_blocking_poll(struct pollfd* pfds, nfds_t nfds,
diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc
index 6ecf7eb..350e67b 100644
--- a/test/cpp/end2end/generic_end2end_test.cc
+++ b/test/cpp/end2end/generic_end2end_test.cc
@@ -60,7 +60,7 @@
namespace testing {
namespace {
-void* tag(int i) { return (void*)(gpr_intptr)i; }
+void* tag(int i) { return (void*)(intptr_t)i; }
void verify_ok(CompletionQueue* cq, int i, bool expect_ok) {
bool ok;
diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h
index ace1930..0f77474 100644
--- a/test/cpp/interop/client_helper.h
+++ b/test/cpp/interop/client_helper.h
@@ -60,7 +60,7 @@
return grpc_call_test_only_get_compression_algorithm(context_.call_);
}
- gpr_uint32 GetMessageFlags() const {
+ uint32_t GetMessageFlags() const {
return grpc_call_test_only_get_message_flags(context_.call_);
}
diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc
index 92b5bf4..d08385a 100644
--- a/test/cpp/interop/reconnect_interop_server.cc
+++ b/test/cpp/interop/reconnect_interop_server.cc
@@ -143,7 +143,7 @@
backoff > max_backoff + kTransmissionDelay) {
passed = false;
}
- response->add_backoff_ms(static_cast<gpr_int32>(backoff));
+ response->add_backoff_ms(static_cast<int32_t>(backoff));
expected_backoff *= kBackoffMultiplier;
expected_backoff =
expected_backoff > kMaxBackoffMs ? kMaxBackoffMs : expected_backoff;
diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc
index 5138a38..9a28409 100644
--- a/test/cpp/interop/server_helper.cc
+++ b/test/cpp/interop/server_helper.cc
@@ -68,7 +68,7 @@
return grpc_call_test_only_get_compression_algorithm(context_.call_);
}
-gpr_uint32 InteropServerContextInspector::GetEncodingsAcceptedByClient() const {
+uint32_t InteropServerContextInspector::GetEncodingsAcceptedByClient() const {
return grpc_call_test_only_get_encodings_accepted_by_peer(context_.call_);
}
diff --git a/test/cpp/interop/server_helper.h b/test/cpp/interop/server_helper.h
index dc0ae1d..57337e5 100644
--- a/test/cpp/interop/server_helper.h
+++ b/test/cpp/interop/server_helper.h
@@ -53,7 +53,7 @@
std::shared_ptr<const AuthContext> GetAuthContext() const;
bool IsCancelled() const;
grpc_compression_algorithm GetCallCompressionAlgorithm() const;
- gpr_uint32 GetEncodingsAcceptedByClient() const;
+ uint32_t GetEncodingsAcceptedByClient() const;
private:
const ::grpc::ServerContext& context_;
diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc
index 9a76984..0de388d 100644
--- a/test/cpp/util/cli_call.cc
+++ b/test/cpp/util/cli_call.cc
@@ -46,7 +46,7 @@
namespace grpc {
namespace testing {
namespace {
-void* tag(int i) { return (void*)(gpr_intptr)i; }
+void* tag(int i) { return (void*)(intptr_t)i; }
} // namespace
Status CliCall::Call(std::shared_ptr<grpc::Channel> channel,