platform/posix.c
changeset 648 5c993684b8f2
parent 644 1cb5533d369c
child 657 dad3b5c307a9
--- a/platform/posix.c	Sun Sep 26 00:24:05 2004 +0000
+++ b/platform/posix.c	Sun Sep 26 00:25:04 2004 +0000
@@ -501,35 +501,34 @@
 } /* __PHYSFS_platformGetLastModTime */
 
 
-PHYSFS_memhandle __PHYSFS_platformMalloc(size_t s)
+int __PHYSFS_platformAllocatorInit(void)
+{
+    return(1);  /* always succeeds. */
+} /* __PHYSFS_platformAllocatorInit */
+
+
+void __PHYSFS_platformAllocatorDeinit(void)
 {
-    assert(sizeof (h) == sizeof (void *));
-    return((PHYSFS_memhandle) malloc(s));
+    /* no-op */
+} /* __PHYSFS_platformAllocatorInit */
+
+
+void *__PHYSFS_platformAllocatorMalloc(size_t s)
+{
+    return(malloc(s));
 } /* __PHYSFS_platformMalloc */
 
 
-PHYSFS_memhandle __PHYSFS_platformRealloc(PHYSFS_memhandle h, size_t s)
+void *__PHYSFS_platformAllocatorRealloc(void *ptr, size_t s)
 {
-    return((PHYSFS_memhandle) realloc((void *) h, s));
+    return(realloc(ptr, s));
 } /* __PHYSFS_platformRealloc */
 
 
-void __PHYSFS_platformFree(PHYSFS_memhandle h)
-{
-    free((void *) h);
-} /* __PHYSFS_platformFree */
-
-
-void *__PHYSFS_platformLock(PHYSFS_memhandle h)
+void __PHYSFS_platformAllocatorFree(void *ptr)
 {
-    return((void *) h);
-} /* __PHYSFS_platformLock */
-
-
-void __PHYSFS_platformUnlock(PHYSFS_memhandle h)
-{
-    /* no-op. */
-} /* __PHYSFS_platformUnlock */
+    free(ptr);
+} /* __PHYSFS_platformAllocatorFree */
 
 #endif /* !defined WIN32 */