mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
29282: hide prototypes for ZSH_HEAP_DEBUG with #ifdef's
This commit is contained in:
parent
fdb4a83213
commit
ad30100e09
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-05-14 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
|
* 29282: Src/mem.c: hide prototypes for ZSH_HEAP_DEBUG with
|
||||||
|
#ifdef's.
|
||||||
|
|
||||||
2011-05-14 Bart Schaefer <schaefer@zsh.org>
|
2011-05-14 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 29276: Src/zsh.h: typedef Heapid unconditionally, to prevent
|
* 29276: Src/zsh.h: typedef Heapid unconditionally, to prevent
|
||||||
|
@ -14703,5 +14708,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.5302 $
|
* $Revision: 1.5303 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -123,6 +123,7 @@ static Heap heaps;
|
||||||
|
|
||||||
static Heap fheap;
|
static Heap fheap;
|
||||||
|
|
||||||
|
/**/
|
||||||
#ifdef ZSH_HEAP_DEBUG
|
#ifdef ZSH_HEAP_DEBUG
|
||||||
/*
|
/*
|
||||||
* The heap ID we'll allocate next.
|
* The heap ID we'll allocate next.
|
||||||
|
@ -172,6 +173,8 @@ new_heap_id(void)
|
||||||
{
|
{
|
||||||
return next_heap_id++;
|
return next_heap_id++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Use new heaps from now on. This returns the old heap-list. */
|
/* Use new heaps from now on. This returns the old heap-list. */
|
||||||
|
@ -723,6 +726,7 @@ hrealloc(char *p, size_t old, size_t new)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**/
|
||||||
#ifdef ZSH_HEAP_DEBUG
|
#ifdef ZSH_HEAP_DEBUG
|
||||||
/*
|
/*
|
||||||
* Check if heap_id is the identifier of a currently valid heap,
|
* Check if heap_id is the identifier of a currently valid heap,
|
||||||
|
@ -768,6 +772,7 @@ memory_validate(Heapid heap_id)
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
/**/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* allocate memory from the current memory pool and clear it */
|
/* allocate memory from the current memory pool and clear it */
|
||||||
|
|
Loading…
Reference in a new issue