diff src/loadso/windows/SDL_loadso.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 450721ad5436
children c71e05b4dc2e
line wrap: on
line diff
--- a/src/loadso/windows/SDL_loadso.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/loadso/windows/SDL_loadso.c	Tue Feb 07 06:59:48 2006 +0000
@@ -45,8 +45,8 @@
 #if defined(_WIN32_WCE)
 	char errbuf[512];
 
-	wchar_t *errbuf_t = malloc(512 * sizeof(wchar_t));
-	wchar_t *sofile_t = malloc((MAX_PATH+1) * sizeof(wchar_t));
+	wchar_t *errbuf_t = SDL_malloc(512 * sizeof(wchar_t));
+	wchar_t *sofile_t = SDL_malloc((MAX_PATH+1) * sizeof(wchar_t));
 
 	MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, sofile, -1, sofile_t, MAX_PATH);
 	handle = (void *)LoadLibrary(sofile_t);
@@ -62,8 +62,8 @@
 		loaderror = errbuf;
 	}
 
-	free(sofile_t);
-	free(errbuf_t);
+	SDL_free(sofile_t);
+	SDL_free(errbuf_t);
 
 #else /*if defined(WIN32)*/
 	char errbuf[512];
@@ -94,10 +94,10 @@
 
 #if defined(_WIN32_WCE)
 	char errbuf[512];
-	int length = strlen(name);
+	int length = SDL_strlen(name);
 
-	wchar_t *name_t = malloc((length + 1) * sizeof(wchar_t));
-	wchar_t *errbuf_t = malloc(512 * sizeof(wchar_t));
+	wchar_t *name_t = SDL_malloc((length + 1) * sizeof(wchar_t));
+	wchar_t *errbuf_t = SDL_malloc(512 * sizeof(wchar_t));
 
 	MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length);
 
@@ -112,8 +112,8 @@
 		loaderror = errbuf;
 	}
 
-	free(name_t);
-	free(errbuf_t);
+	SDL_free(name_t);
+	SDL_free(errbuf_t);
 
 #else /*if defined(WIN32)*/
 	char errbuf[512];