//
// © 2018-2020 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
//

#ifndef IoTGlobals_h
#define IoTGlobals_h

#define makeWeak(var) __weak typeof(var) weak_##var = var;

#define makeStrongAndReturnIfNil(var) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
__strong typeof(var) var = weak_##var; \
if (!var) return; \
_Pragma("clang diagnostic pop")

#endif /* IoTGlobals_h */
