diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc/support/useful.h | 7 |
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 */ |