Skip to content

Commit

Permalink
Bug 807883: Update NSPR to NSPR 4.9.6 Beta 2. This adds 'const' to the
Browse files Browse the repository at this point in the history
'pool' input parameter of PL_SizeOfArenaPoolExcludingPool. r=n.nethercote.
  • Loading branch information
wantehchang committed Feb 12, 2013
1 parent 5318762 commit 34e364f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion nsprpub/TAG-INFO
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NSPR_4_9_6_BETA1
NSPR_4_9_6_BETA2
1 change: 0 additions & 1 deletion nsprpub/config/prdepend.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
*/

#error "Do not include this header file."

6 changes: 3 additions & 3 deletions nsprpub/lib/ds/plarena.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,14 @@ PR_IMPLEMENT(void) PL_ArenaFinish(void)
}

PR_IMPLEMENT(size_t) PL_SizeOfArenaPoolExcludingPool(
PLArenaPool *pool, PLMallocSizeFn mallocSizeOf)
const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf)
{
/*
* The first PLArena is within |pool|, so don't measure it. Subsequent
* PLArenas are separate and must measured.
* PLArenas are separate and must be measured.
*/
size_t size = 0;
PLArena *arena = pool->first.next;
const PLArena *arena = pool->first.next;
while (arena) {
size += mallocSizeOf(arena);
arena = arena->next;
Expand Down
6 changes: 3 additions & 3 deletions nsprpub/lib/ds/plarenas.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark);
PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern);

/*
** A function like malloc_size() or malloc_usable_size() that returns the
** A function like malloc_size() or malloc_usable_size() that measures the
** size of a heap block.
*/
typedef size_t (*PLMallocSizeFn)(const void *ptr);

/*
** Return all memory used by a PLArenaPool, excluding the PLArenaPool
** Measure all memory used by a PLArenaPool, excluding the PLArenaPool
** structure.
*/
PR_EXTERN(size_t) PL_SizeOfArenaPoolExcludingPool(
PLArenaPool *pool, PLMallocSizeFn mallocSizeOf);
const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf);

PR_END_EXTERN_C

Expand Down

0 comments on commit 34e364f

Please sign in to comment.