Mercurial > sdl-ios-xcode
diff src/cdrom/macosx/AudioFilePlayer.c @ 1336:3692456e7b0f
Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 06:59:48 +0000 |
parents | 71a2648acc75 |
children | d910939febfa |
line wrap: on
line diff
--- a/src/cdrom/macosx/AudioFilePlayer.c Mon Feb 06 17:28:04 2006 +0000 +++ b/src/cdrom/macosx/AudioFilePlayer.c Tue Feb 07 06:59:48 2006 +0000 @@ -64,7 +64,7 @@ if (afp->mConnected) return 0 ; - memcpy(&afp->mPlayUnit, inDestUnit, sizeof (afp->mPlayUnit)); + SDL_memcpy(&afp->mPlayUnit, inDestUnit, sizeof (afp->mPlayUnit)); OSStatus result = noErr; @@ -155,7 +155,7 @@ FSClose (afp->mForkRefNum); afp->mForkRefNum = 0; } - free(afp); + SDL_free(afp); } } @@ -304,10 +304,10 @@ { SInt64 fileDataSize = 0; - AudioFilePlayer *afp = (AudioFilePlayer *) malloc(sizeof (AudioFilePlayer)); + AudioFilePlayer *afp = (AudioFilePlayer *) SDL_malloc(sizeof (AudioFilePlayer)); if (afp == NULL) return NULL; - memset(afp, '\0', sizeof (*afp)); + SDL_memset(afp, '\0', sizeof (*afp)); #define SET_AUDIOFILEPLAYER_METHOD(m) afp->m = AudioFilePlayer_##m SET_AUDIOFILEPLAYER_METHOD(SetDestination); @@ -326,7 +326,7 @@ if (!afp->OpenFile (afp, inFileRef, &fileDataSize)) { - free(afp); + SDL_free(afp); return NULL; }