aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-07 08:25:02 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-07 08:25:02 -0700
commitf666adef90b05c1c0878a0971c14d7f306eeb62e (patch)
treec39eee8f1fddbe7f8737c93421832cd8bdc83896 /include
parentf9e6adf998ed36479ccbb8eb3cdc58b02cc161dd (diff)
parent63733efd730316c0317a5df4f288aac242014d91 (diff)
Merge github.com:grpc/grpc into churn-churn-churn-the-api-gently-down-the-stream
Diffstat (limited to 'include')
-rw-r--r--include/grpc/support/useful.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/grpc/support/useful.h b/include/grpc/support/useful.h
index 979f3d026b..e1ce0455c6 100644
--- a/include/grpc/support/useful.h
+++ b/include/grpc/support/useful.h
@@ -45,4 +45,11 @@
#define GPR_ARRAY_SIZE(array) (sizeof(array) / sizeof(*(array)))
+#define GPR_SWAP(type, a, b) \
+ do { \
+ type x = a; \
+ a = b; \
+ b = x; \
+ } while (0)
+
#endif /* GRPC_SUPPORT_USEFUL_H */