Use unique var name in SAPI_RETURN_IF_ERROR to avoid name clashes

PiperOrigin-RevId: 350724380
Change-Id: I07c11b1897043df188bbef7934b5a41185a82a79
This commit is contained in:
Wiktor Garbacz 2021-01-08 02:09:09 -08:00 committed by Copybara-Service
parent 918a409126
commit 6dd0a52561

View File

@ -26,6 +26,10 @@
#define SAPI_MACROS_IMPL_CONCAT(x, y) SAPI_MACROS_IMPL_CONCAT_INNER_(x, y)
#define SAPI_RETURN_IF_ERROR(expr) \
SAPI_RETURN_IF_ERROR_IMPL(SAPI_MACROS_IMPL_CONCAT(_sapi_status, __LINE__), \
expr)
#define SAPI_RETURN_IF_ERROR_IMPL(status, expr) \
do { \
const auto status = (expr); \
if (ABSL_PREDICT_FALSE(!status.ok())) { \