diff options
author | Gisle Aas <gisle@activestate.com> | 2006-01-17 11:37:54 +0000 |
---|---|---|
committer | Gisle Aas <gisle@activestate.com> | 2006-01-17 11:37:54 +0000 |
commit | bbbd43383bc4e5b5c9d9b30d4a2008afec8893d8 (patch) | |
tree | 9c440df82d626e6f6700db9d169a4b78b8a10c69 /handy.h | |
parent | 5b213ac8552d2007a5836890a1c4a2f8d9df150b (diff) | |
download | perl-bbbd43383bc4e5b5c9d9b30d4a2008afec8893d8.tar.gz |
More readable MEM_WRAP_CHECK_1() macro.
This form also avoids the "dead part of constant expression is nonconstant"
warning from the Sun Studio 10 compiler.
p4raw-id: //depot/perl@26871
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -636,7 +636,7 @@ hopefully catches attempts to access uninitialized memory. #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))) |