physfs.h
changeset 691 71d9affe0d8a
parent 687 f76dffa43fa2
child 724 59b7f0c2c5c0
equal deleted inserted replaced
690:c34d1027aad0 691:71d9affe0d8a
  1859  *
  1859  *
  1860  * \sa PHYSFS_setAllocator
  1860  * \sa PHYSFS_setAllocator
  1861  */
  1861  */
  1862 typedef struct
  1862 typedef struct
  1863 {
  1863 {
  1864     int (*init)(void);
  1864     int (*Init)(void);
  1865     void (*deinit)(void);
  1865     void (*Deinit)(void);
  1866     void *(*malloc)(size_t);
  1866     void *(*Malloc)(size_t);
  1867     void *(*realloc)(void *, size_t);
  1867     void *(*Realloc)(void *, size_t);
  1868     void (*free)(void *);
  1868     void (*Free)(void *);
  1869 } PHYSFS_Allocator;
  1869 } PHYSFS_Allocator;
  1870 
  1870 
  1871 
  1871 
  1872 /**
  1872 /**
  1873  * \fn int PHYSFS_setAllocator(PHYSFS_Allocator *allocator)
  1873  * \fn int PHYSFS_setAllocator(PHYSFS_Allocator *allocator)
  1874  * \brief Hook your own allocation routines into PhysicsFS.
  1874  * \brief Hook your own allocation routines into PhysicsFS.
  1875  *
  1875  *
  1876  * (This is for limited, hardcore use. If you don't immediately see a need
  1876  * (This is for limited, hardcore use. If you don't immediately see a need
  1877  *  for it, you can probably ignore this forever.)
  1877  *  for it, you can probably ignore this forever.)
       
  1878  *
       
  1879  *  !!! FIXME: don't promise C runtime malloc.
  1878  *
  1880  *
  1879  * By default, PhysicsFS will use ANSI C malloc/realloc/calloc/free calls
  1881  * By default, PhysicsFS will use ANSI C malloc/realloc/calloc/free calls
  1880  *  to manage dynamic memory, but in some uncommon cases, the app might want
  1882  *  to manage dynamic memory, but in some uncommon cases, the app might want
  1881  *  more control over the library's memory management. This lets you redirect
  1883  *  more control over the library's memory management. This lets you redirect
  1882  *  physfs to use your own allocation routines instead. You can only call this
  1884  *  physfs to use your own allocation routines instead. You can only call this