Bug 427858: code cleanup. Remove declarations for unimplemented functions NSPR_4_8_9_BETA5
authorwtc%google.com
Wed, 03 Aug 2011 22:28:42 +0000
changeset 4339 90044e3db22d4f577c741161ca80df839433c689
parent 4338 a868dc8e4218d697cb8ad942f3f02271807a15ab
child 4340 8adcd9e961ab7a4ad6e2619ce91546dabf09faeb
child 4342 6fddde86cfb014f3ba69ae77ac76b87a19ce9afa
push idunknown
push userunknown
push dateunknown
bugs427858
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.
lib/ds/plarenas.h
--- 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 */