Bug 427858: code cleanup. Remove declarations for unimplemented functions
PL_AllocArenaPool and PL_DestroyArenaPool. Warn that PL_CompactArenaPool
is not implemented (a no-op). The patch is contributed by
Robin Bate Boerop <moz@shorestreet.com>. r=wtc.
--- a/lib/ds/plarenas.h
+++ b/lib/ds/plarenas.h
@@ -30,51 +30,24 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#if defined(PLARENAS_H)
-#else /* defined(PLARENAS_H) */
+#ifndef PLARENAS_H
#define PLARENAS_H
PR_BEGIN_EXTERN_C
typedef struct PLArenaPool PLArenaPool;
/*
-** Allocate an arena pool as specified by the parameters.
-**
-** This is equivelant to allocating the space yourself and then
-** calling PL_InitArenaPool().
-**
-** This function may fail (and return a NULL) for a variety of
-** reasons. The reason for a particular failure can be discovered
-** by calling PR_GetError().
-*/
-#if 0 /* Not implemented */
-PR_EXTERN(PLArenaPool*) PL_AllocArenaPool(
- const char *name, PRUint32 size, PRUint32 align);
-#endif
-
-/*
-** Destroy an arena pool previously allocated by PL_AllocArenaPool().
-**
-** This function may fail if the arena is not empty and the caller
-** wishes to check for empty upon descruction.
-*/
-#if 0 /* Not implemented */
-PR_EXTERN(PRStatus) PL_DestroyArenaPool(PLArenaPool *pool, PRBool checkEmpty);
-#endif
-
-
-/*
** Initialize an arena pool with the given name for debugging and metering,
** with a minimum size per arena of size bytes.
**/
PR_EXTERN(void) PL_InitArenaPool(
PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align);
/*
** Finish using arenas, freeing all memory associated with them.
@@ -90,16 +63,17 @@ PR_EXTERN(void) PL_FreeArenaPool(PLArena
/*
** Free the arenas in pool and finish using it altogether.
**/
PR_EXTERN(void) PL_FinishArenaPool(PLArenaPool *pool);
/*
** Compact all of the arenas in a pool so that no space is wasted.
+** NOT IMPLEMENTED. Do not use.
**/
PR_EXTERN(void) PL_CompactArenaPool(PLArenaPool *pool);
/*
** Friend functions used by the PL_ARENA_*() macros.
**/
PR_EXTERN(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb);
@@ -110,11 +84,9 @@ PR_EXTERN(void) PL_ArenaRelease(PLArenaP
/*
** memset contents of all arenas in pool to pattern
*/
PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern);
PR_END_EXTERN_C
-#endif /* defined(PLARENAS_H) */
-
-/* plarenas */
+#endif /* PLARENAS_H */