Fix worrying typo in handy.h :-s
[p5sagit/p5-mst-13.2.git] / handy.h
diff --git a/handy.h b/handy.h
index 8cddbab..106996d 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -550,18 +550,19 @@ C<id> is an integer id between 0 and 1299 (used to identify leaks).
 =for apidoc Am|void|Newx|void* ptr|int nitems|type
 The XSUB-writer's interface to the C C<malloc> function.
 
+In 5.9.3, Newx() and friends replace the older New() API, and drops
+the first parameter, I<x>, a debug aid which allowed callers to identify
+themselves.  This aid has been superceded by a new build option,
+PERL_MEM_LOG (see L<perlhack/PERL_MEM_LOG>).  The older API is still
+there for use in XS modules supporting older perls.
+
 =for apidoc Am|void|Newxc|void* ptr|int nitems|type|cast
 The XSUB-writer's interface to the C C<malloc> function, with
-cast.
+cast.  See also C<Newx>.
 
 =for apidoc Am|void|Newxz|void* ptr|int nitems|type
 The XSUB-writer's interface to the C C<malloc> function.  The allocated
-memory is zeroed with C<memzero>.
-
-In 5.9.3, we removed the 1st parameter, a debug aid, from the api.  It
-was used to uniquely identify each usage of these allocation
-functions, but was deemed unnecessary with the availability of better
-memory tracking tools, valgrind for example.
+memory is zeroed with C<memzero>.  See also C<Newx>.
 
 =for apidoc Am|void|Renew|void* ptr|int nitems|type
 The XSUB-writer's interface to the C C<realloc> function.
@@ -638,7 +639,7 @@ hopefully catches attempts to access uninitialized memory.
 
 #ifdef PERL_MEM_LOG
 /*
- * If PERL_MEM_LOG is defined, all New()s, Renew()s, and Safefree()s
+ * If PERL_MEM_LOG is defined, all Newx()s, Renew()s, and Safefree()s
  * go through functions, which are handy for debugging breakpoints, but
  * which more importantly get the immediate calling environment (file and
  * line number) passed in.  This can then be used for logging the calls,
@@ -698,7 +699,7 @@ Malloc_t Perl_mem_log_free(Malloc_t oldalloc, const char *filename, const int li
 /* pre 5.9.x compatibility */
 #define New(x,v,n,t)   Newx(v,n,t)
 #define Newc(x,v,n,t,c)        Newxc(v,n,t,c)
-#define Newc(x,v,n,t,c)        Newxc(v,n,t,c)
+#define Newz(x,v,n,t,c)        Newxz(v,n,t,c)
 
 #define Renew(v,n,t) \
          (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_REALLOC(n,t,v,(t*)saferealloc((Malloc_t)(v),(MEM_SIZE)((n)*sizeof(t))))))