Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: build problem with patch level 1.5301



On Fri, 13 May 2011 21:00:00 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> All that's really necessary, though, is to make the typedef for
> "Heapid" visible regardless of whether ZSH_HEAP_DEBUG is defined.

No problem with that, but it's probably a bit safer also to hide the
prototypes of things we don't need to see.

Index: Src/mem.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/mem.c,v
retrieving revision 1.19
diff -p -u -r1.19 mem.c
--- Src/mem.c	14 May 2011 00:07:42 -0000	1.19
+++ Src/mem.c	14 May 2011 16:20:45 -0000
@@ -123,6 +123,7 @@ static Heap heaps;
 
 static Heap fheap;
 
+/**/
 #ifdef ZSH_HEAP_DEBUG
 /*
  * The heap ID we'll allocate next.
@@ -172,6 +173,8 @@ new_heap_id(void)
 {
     return next_heap_id++;
 }
+
+/**/
 #endif
 
 /* 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
 /*
  * Check if heap_id is the identifier of a currently valid heap,
@@ -768,6 +772,7 @@ memory_validate(Heapid heap_id)
 
     return 1;
 }
+/**/
 #endif
 
 /* allocate memory from the current memory pool and clear it */

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author