Merge pull request #11 from alexxvk/master
[openal-soft/openbsd.git] / OpenAL32 / Include / alError.h
blobab91d27b288ba813985c7a0c3db65634934b6e0d
1 #ifndef _AL_ERROR_H_
2 #define _AL_ERROR_H_
4 #include "alMain.h"
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 extern ALboolean TrapALError;
12 ALvoid alSetError(ALCcontext *Context, ALenum errorCode);
14 #define SET_ERROR_AND_RETURN(ctx, err) do { \
15 alSetError((ctx), (err)); \
16 return; \
17 } while(0)
19 #define SET_ERROR_AND_RETURN_VALUE(ctx, err, val) do { \
20 alSetError((ctx), (err)); \
21 return (val); \
22 } while(0)
24 #define SET_ERROR_AND_GOTO(ctx, err, lbl) do { \
25 alSetError((ctx), (err)); \
26 goto lbl; \
27 } while(0)
29 #ifdef __cplusplus
31 #endif
33 #endif