platform/os2.c
changeset 845 3f150ffcf50c
parent 844 68272bd212a5
child 1020 1b4730384fc3
--- a/platform/os2.c	Tue Mar 20 17:57:45 2007 +0000
+++ b/platform/os2.c	Tue Mar 20 18:33:56 2007 +0000
@@ -690,39 +690,11 @@
 } /* __PHYSFS_platformReleaseMutex */
 
 
-int __PHYSFS_platformAllocatorInit(void)
-{
-    return(1);  /* always succeeds. */
-} /* __PHYSFS_platformAllocatorInit */
-
-
-void __PHYSFS_platformAllocatorDeinit(void)
-{
-    /* no-op */
-} /* __PHYSFS_platformAllocatorInit */
-
-
-void *__PHYSFS_platformAllocatorMalloc(PHYSFS_uint64 s)
+/* !!! FIXME: Don't use C runtime for allocators? */
+int __PHYSFS_platformSetDefaultAllocator(PHYSFS_Allocator *a)
 {
-    BAIL_IF_MACRO(__PHYSFS_ui64FitsAddressSpace(s), ERR_OUT_OF_MEMORY, NULL);
-    #undef malloc
-    return(malloc((size_t) s));
-} /* __PHYSFS_platformMalloc */
-
-
-void *__PHYSFS_platformAllocatorRealloc(void *ptr, PHYSFS_uint64 s)
-{
-    BAIL_IF_MACRO(__PHYSFS_ui64FitsAddressSpace(s), ERR_OUT_OF_MEMORY, NULL);
-    #undef realloc
-    return(realloc(ptr, (size_t) s));
-} /* __PHYSFS_platformRealloc */
-
-
-void __PHYSFS_platformAllocatorFree(void *ptr)
-{
-    #undef free
-    free(ptr);
-} /* __PHYSFS_platformAllocatorFree */
+    return(0);  /* just use malloc() and friends. */
+} /* __PHYSFS_platformSetDefaultAllocator */
 
 #endif  /* PHYSFS_PLATFORM_OS2 */