Upgrade to Pod-Simple-3.04
[p5sagit/p5-mst-13.2.git] / handy.h
diff --git a/handy.h b/handy.h
index cb5de19..4456111 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -250,6 +250,7 @@ typedef U64TYPE U64;
 #define sv_catpvs(sv, str) Perl_sv_catpvn_flags(aTHX_ sv, STR_WITH_LEN(str), SV_GMAGIC)
 #define savepvs(str) Perl_savepvn(aTHX_ STR_WITH_LEN(str))
 #define gv_stashpvs(str, create) Perl_gv_stashpvn(aTHX_ STR_WITH_LEN(str), create)
+#define hv_fetchs(hv,key,lval) Perl_hv_fetch(aTHX_ hv, STR_WITH_LEN(key), lval)
 
 /*
 =head1 Miscellaneous Functions
@@ -553,15 +554,6 @@ typedef U32 line_t;
 
 
 /*
-=head1 SV Manipulation Functions
-
-=for apidoc Am|SV*|NEWSV|int id|STRLEN len
-Creates a new SV.  A non-zero C<len> parameter indicates the number of
-bytes of preallocated string space the SV should have.  An extra byte for a
-tailing NUL is also reserved.  (SvPOK is not set for the SV even if string
-space is allocated.)  The reference count for the new SV is set to 1.
-C<id> is an integer id between 0 and 1299 (used to identify leaks).
-
 =head1 Memory Management
 
 =for apidoc Am|void|Newx|void* ptr|int nitems|type
@@ -569,7 +561,7 @@ 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,
+themselves.  This aid has been superseded 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.
 
@@ -630,12 +622,15 @@ hopefully catches attempts to access uninitialized memory.
 
 =cut */
 
+/* Maintained for backwards-compatibility only. Use newSV() instead. */
+#ifndef PERL_CORE
 #define NEWSV(x,len)   newSV(len)
+#endif
 
 #ifdef PERL_MALLOC_WRAP
 #define MEM_WRAP_CHECK(n,t) MEM_WRAP_CHECK_1(n,t,PL_memory_wrap)
 #define MEM_WRAP_CHECK_1(n,t,a) \
-       (void)((sizeof(t)>1?(n):1)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(a),0):0)
+       (void)(sizeof(t) > 1 && (n) > ((MEM_SIZE)~0)/sizeof(t) && (Perl_croak_nocontext(a),0))
 #define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
 
 #define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > (MEM_SIZE)~0 - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (Perl_croak_nocontext(PL_memory_wrap),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1)))