src/stdlib/SDL_malloc.c
changeset 7003 eeaf77005c30
parent 6885 700f1b25f77f
child 7191 75360622e65f
equal deleted inserted replaced
7002:978ff4e06388 7003:eeaf77005c30
    22 
    22 
    23 /* This file contains portable memory management functions for SDL */
    23 /* This file contains portable memory management functions for SDL */
    24 
    24 
    25 #include "SDL_stdinc.h"
    25 #include "SDL_stdinc.h"
    26 
    26 
    27 #ifndef HAVE_MALLOC
    27 #ifdef SDL_malloc
       
    28 /* expose the symbol, but use what we figured out elsewhere. */
       
    29 #undef SDL_malloc
       
    30 #undef SDL_calloc
       
    31 #undef SDL_realloc
       
    32 #undef SDL_free
       
    33 void *SDL_malloc(size_t size) { return SDL_malloc_inline(size); }
       
    34 void *SDL_calloc(size_t nmemb, size_t size) { return SDL_calloc_inline(nmemb, size); }
       
    35 void *SDL_realloc(void *ptr, size_t size) { return SDL_realloc_inline(ptr, size); }
       
    36 void SDL_free(void *ptr) { SDL_free_inline(ptr); }
       
    37 
       
    38 #else  /* the rest of this is a LOT of tapdancing to implement malloc. :) */
    28 
    39 
    29 #define LACKS_SYS_TYPES_H
    40 #define LACKS_SYS_TYPES_H
    30 #define LACKS_STDIO_H
    41 #define LACKS_STDIO_H
    31 #define LACKS_STRINGS_H
    42 #define LACKS_STRINGS_H
    32 #define LACKS_STRING_H
    43 #define LACKS_STRING_H