aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alError.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-26 07:06:02 +0100
committerSven Gothel <[email protected]>2014-01-26 07:06:02 +0100
commite6f4251945c228a775649b5ccd7f11dd4519c28d (patch)
tree8454b34363358cf9bb502021a68c6985c97daac4 /OpenAL32/Include/alError.h
parent389ae1f767bfad6116e21306fc3cdf89a4cbcc0a (diff)
parent49baa9128dd98e986639def4f24c7522d9ec6b56 (diff)
Merge branch 'UPSTREAM'
Diffstat (limited to 'OpenAL32/Include/alError.h')
-rw-r--r--OpenAL32/Include/alError.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenAL32/Include/alError.h b/OpenAL32/Include/alError.h
index 0ade342d..ab91d27b 100644
--- a/OpenAL32/Include/alError.h
+++ b/OpenAL32/Include/alError.h
@@ -11,6 +11,21 @@ extern ALboolean TrapALError;
ALvoid alSetError(ALCcontext *Context, ALenum errorCode);
+#define SET_ERROR_AND_RETURN(ctx, err) do { \
+ alSetError((ctx), (err)); \
+ return; \
+} while(0)
+
+#define SET_ERROR_AND_RETURN_VALUE(ctx, err, val) do { \
+ alSetError((ctx), (err)); \
+ return (val); \
+} while(0)
+
+#define SET_ERROR_AND_GOTO(ctx, err, lbl) do { \
+ alSetError((ctx), (err)); \
+ goto lbl; \
+} while(0)
+
#ifdef __cplusplus
}
#endif