src/SDL_assert.c
changeset 3655 1cc7f0143c12
parent 3651 cb5b1aedb5a7
child 3656 f17ea6f49745
     1.1 --- a/src/SDL_assert.c	Wed Jan 13 08:06:32 2010 +0000
     1.2 +++ b/src/SDL_assert.c	Wed Jan 13 08:25:16 2010 +0000
     1.3 @@ -265,7 +265,7 @@
     1.4                  data->trigger_count, (data->trigger_count == 1) ? "" : "s",
     1.5                  data->condition);
     1.6  
     1.7 -	/* let env. variable override, so unit tests won't block in a GUI. */
     1.8 +    /* let env. variable override, so unit tests won't block in a GUI. */
     1.9      envr = SDL_getenv("SDL_ASSERT");
    1.10      if (envr != NULL) {
    1.11          if (SDL_strcmp(envr, "abort") == 0) {
    1.12 @@ -327,7 +327,8 @@
    1.13  static SDL_mutex *assertion_mutex = NULL;
    1.14  
    1.15  SDL_assert_state
    1.16 -SDL_ReportAssertion(SDL_assert_data *data, const char *func, int line)
    1.17 +SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file,
    1.18 +                    int line)
    1.19  {
    1.20      SDL_assert_state state;
    1.21  
    1.22 @@ -338,7 +339,8 @@
    1.23      /* doing this because Visual C is upset over assigning in the macro. */
    1.24      if (data->trigger_count == 0) {
    1.25          data->function = func;
    1.26 -		data->linenum = line;
    1.27 +        data->filename = file;
    1.28 +        data->linenum = line;
    1.29      }
    1.30  
    1.31      SDL_AddAssertionToReport(data);