summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2017-11-11 13:35:13 +0100
committerLukas Mai <l.mai@web.de>2017-11-11 13:53:30 +0100
commit445198b9b50e1018da1c98005a88bdf15c964f23 (patch)
treeae76f1f01a198ff9e80c69a7ecb3306c473fce52 /handy.h
parentb7112dce7ec5b90ace89fcf4598b0be8168fea82 (diff)
downloadperl-445198b9b50e1018da1c98005a88bdf15c964f23.tar.gz
Revert "Simplify _MEM_WRAP_NEEDS_RUNTIME_CHECK()"
This reverts commit 004073bac990d90244eb463f435c52d4040b36df.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/handy.h b/handy.h
index d8d041d7bc..77415ecb45 100644
--- a/handy.h
+++ b/handy.h
@@ -2312,7 +2312,8 @@ PoisonWith(0xEF) for catching access to freed memory.
*/
# define _MEM_WRAP_NEEDS_RUNTIME_CHECK(n,t) \
- (8 * sizeof(n) + sizeof(t) > sizeof(MEM_SIZE))
+ ( sizeof(MEM_SIZE) < sizeof(n) \
+ || sizeof(t) > ((MEM_SIZE)1 << 8*(sizeof(MEM_SIZE) - sizeof(n))))
/* This is written in a slightly odd way to avoid various spurious
* compiler warnings. We *want* to write the expression as