src/SDL12_compat.c
changeset 98 55027ad695d6
parent 97 45e4b37e14f3
child 99 db10b95d4059
     1.1 --- a/src/SDL12_compat.c	Fri Mar 01 23:52:55 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Fri Mar 01 23:54:52 2019 -0500
     1.3 @@ -3176,12 +3176,12 @@
     1.4          }
     1.5  
     1.6          /* reset the actual error. */
     1.7 -        char *dup = SDL_strdup(err);
     1.8 +        char *dup = SDL20_strdup(err);
     1.9          if (!dup) {
    1.10 -            SDL20_SetError("Out of memory");
    1.11 +            SDL20_OutOfMemory();
    1.12          } else {
    1.13              SDL20_SetError(dup);
    1.14 -            SDL_free(dup);
    1.15 +            SDL20_free(dup);
    1.16          }
    1.17      }
    1.18      return rc;
    1.19 @@ -3696,9 +3696,9 @@
    1.20          return SDL20_SetError("Callback can't be NULL");
    1.21      }
    1.22  
    1.23 -    AudioCallbackWrapperData *data = (AudioCallbackWrapperData *) SDL_calloc(1, sizeof (AudioCallbackWrapperData));
    1.24 +    AudioCallbackWrapperData *data = (AudioCallbackWrapperData *) SDL20_calloc(1, sizeof (AudioCallbackWrapperData));
    1.25      if (!data) {
    1.26 -        return SDL20_SetError("Out of memory");
    1.27 +        return SDL20_OutOfMemory();
    1.28      }
    1.29      data->app_callback = want->callback;
    1.30      data->app_userdata = want->userdata;
    1.31 @@ -3711,7 +3711,7 @@
    1.32      want->callback = data->app_callback;
    1.33      want->userdata = data->app_userdata;
    1.34      if (retval == -1) {
    1.35 -        SDL_free(data);
    1.36 +        SDL20_free(data);
    1.37      } else {
    1.38          FIXME("memory leak on callback data");
    1.39          if (!obtained) {