Skip to content

Commit

Permalink
Mac OS X thinks we want a function call to SDL_memcpy() and not memcp…
Browse files Browse the repository at this point in the history
…y() here,

 thanks to macro replacement issues.
  • Loading branch information
icculus committed Jul 14, 2007
1 parent 69917f2 commit e29db8b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/stdlib/SDL_malloc.c
Expand Up @@ -610,7 +610,6 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#endif /* MALLINFO_FIELD_TYPE */

#define memset SDL_memset
#define memcpy SDL_memcpy
#define malloc SDL_malloc
#define calloc SDL_calloc
#define realloc SDL_realloc
Expand Down Expand Up @@ -3839,7 +3838,7 @@ static void* internal_realloc(mstate m, void* oldmem, size_t bytes) {
void* newmem = internal_malloc(m, bytes);
if (newmem != 0) {
size_t oc = oldsize - overhead_for(oldp);
memcpy(newmem, oldmem, (oc < bytes)? oc : bytes);
SDL_memcpy(newmem, oldmem, (oc < bytes)? oc : bytes);
internal_free(m, oldmem);
}
return newmem;
Expand Down

0 comments on commit e29db8b

Please sign in to comment.