include/SDL_assert.h
changeset 3649 1e74d7984d0b
parent 3647 c5925cd41955
child 3650 91460fdfe83a
     1.1 --- a/include/SDL_assert.h	Wed Jan 13 07:00:20 2010 +0000
     1.2 +++ b/include/SDL_assert.h	Wed Jan 13 07:25:28 2010 +0000
     1.3 @@ -21,13 +21,11 @@
     1.4  */
     1.5  #include "SDL_config.h"
     1.6  
     1.7 -/* This is an assert macro for SDL's internal use. Not for the public API! */
     1.8 -
     1.9  #ifndef _SDL_assert_h
    1.10  #define _SDL_assert_h
    1.11  
    1.12  #ifndef SDL_ASSERT_LEVEL
    1.13 -#error SDL_ASSERT_LEVEL is not defined. Please fix your SDL_config.h.
    1.14 +#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
    1.15  #endif
    1.16  
    1.17  /*
    1.18 @@ -107,12 +105,12 @@
    1.19  #define SDL_enabled_assert(condition) \
    1.20      do { \
    1.21          while ( !(condition) ) { \
    1.22 -			static struct SDL_assert_data assert_data = { \
    1.23 +            static struct SDL_assert_data assert_data = { \
    1.24                  0, 0, #condition, __FILE__, 0, 0, 0 \
    1.25              }; \
    1.26 -			const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
    1.27 +            const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
    1.28                                                                 SDL_FUNCTION, \
    1.29 -															   __LINE__); \
    1.30 +                                                               __LINE__); \
    1.31              if (state == SDL_ASSERTION_RETRY) { \
    1.32                  continue; /* go again. */ \
    1.33              } else if (state == SDL_ASSERTION_BREAK) { \
    1.34 @@ -148,4 +146,3 @@
    1.35  #endif /* _SDL_assert_h */
    1.36  
    1.37  /* vi: set ts=4 sw=4 expandtab: */
    1.38 -