Mercurial > sdl-ios-xcode
comparison src/stdlib/SDL_malloc.c @ 4061:95ecf165f113 SDL-1.2
Mac OS X thinks we want a function call to SDL_memcpy() and not memcpy() here,
thanks to macro replacement issues.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 14 Jul 2007 06:45:01 +0000 |
parents | 8dfa9a6d69a5 |
children | d634945c6172 |
comparison
equal
deleted
inserted
replaced
4060:0b4ebec67cad | 4061:95ecf165f113 |
---|---|
608 #ifndef MALLINFO_FIELD_TYPE | 608 #ifndef MALLINFO_FIELD_TYPE |
609 #define MALLINFO_FIELD_TYPE size_t | 609 #define MALLINFO_FIELD_TYPE size_t |
610 #endif /* MALLINFO_FIELD_TYPE */ | 610 #endif /* MALLINFO_FIELD_TYPE */ |
611 | 611 |
612 #define memset SDL_memset | 612 #define memset SDL_memset |
613 #define memcpy SDL_memcpy | |
614 #define malloc SDL_malloc | 613 #define malloc SDL_malloc |
615 #define calloc SDL_calloc | 614 #define calloc SDL_calloc |
616 #define realloc SDL_realloc | 615 #define realloc SDL_realloc |
617 #define free SDL_free | 616 #define free SDL_free |
618 | 617 |
3837 } | 3836 } |
3838 else { | 3837 else { |
3839 void* newmem = internal_malloc(m, bytes); | 3838 void* newmem = internal_malloc(m, bytes); |
3840 if (newmem != 0) { | 3839 if (newmem != 0) { |
3841 size_t oc = oldsize - overhead_for(oldp); | 3840 size_t oc = oldsize - overhead_for(oldp); |
3842 memcpy(newmem, oldmem, (oc < bytes)? oc : bytes); | 3841 SDL_memcpy(newmem, oldmem, (oc < bytes)? oc : bytes); |
3843 internal_free(m, oldmem); | 3842 internal_free(m, oldmem); |
3844 } | 3843 } |
3845 return newmem; | 3844 return newmem; |
3846 } | 3845 } |
3847 } | 3846 } |