Mercurial > sdl-ios-xcode
diff src/cdrom/macosx/AudioFileReaderThread.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 | 604d73db6802 |
line wrap: on
line diff
--- a/src/cdrom/macosx/AudioFileReaderThread.c Mon Feb 06 17:28:04 2006 +0000 +++ b/src/cdrom/macosx/AudioFileReaderThread.c Tue Feb 07 06:59:48 2006 +0000 @@ -86,7 +86,7 @@ FileData *i = frt->mFileData; FileData *prev = NULL; - FileData *newfd = (FileData *) malloc(sizeof (FileData)); + FileData *newfd = (FileData *) SDL_malloc(sizeof (FileData)); newfd->obj = inItem; newfd->next = NULL; @@ -136,7 +136,7 @@ frt->mFileData = next; else prev->next = next; - free(i); + SDL_free(i); } i = next; } @@ -279,7 +279,7 @@ { FileData *next = frt->mFileData->next; theItem = frt->mFileData->obj; - free(frt->mFileData); + SDL_free(frt->mFileData); frt->mFileData = next; } @@ -330,21 +330,21 @@ if (frt != NULL) { delete_SDLOSXCAGuard(frt->mGuard); - free(frt); + SDL_free(frt); } } FileReaderThread *new_FileReaderThread () { - FileReaderThread *frt = (FileReaderThread *) malloc(sizeof (FileReaderThread)); + FileReaderThread *frt = (FileReaderThread *) SDL_malloc(sizeof (FileReaderThread)); if (frt == NULL) return NULL; - memset(frt, '\0', sizeof (*frt)); + SDL_memset(frt, '\0', sizeof (*frt)); frt->mGuard = new_SDLOSXCAGuard(); if (frt->mGuard == NULL) { - free(frt); + SDL_free(frt); return NULL; } @@ -549,7 +549,7 @@ free (afm->mFileBuffer); } - free(afm); + SDL_free(afm); } } @@ -568,10 +568,10 @@ return NULL; } - afm = (AudioFileManager *) malloc(sizeof (AudioFileManager)); + afm = (AudioFileManager *) SDL_malloc(sizeof (AudioFileManager)); if (afm == NULL) return NULL; - memset(afm, '\0', sizeof (*afm)); + SDL_memset(afm, '\0', sizeof (*afm)); #define SET_AUDIOFILEMANAGER_METHOD(m) afm->m = AudioFileManager_##m SET_AUDIOFILEMANAGER_METHOD(Disconnect);