summaryrefslogtreecommitdiff
path: root/pad.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-09-26 15:22:25 +0100
committerDavid Mitchell <davem@iabyn.com>2016-09-26 15:48:48 +0100
commitd081a35540aca5feaa56d2ce8a0b72b909a2d79e (patch)
treeb742f08de24ed3c9ac7759acc7621b2029f1616d /pad.h
parentf2949f414d32db2fe5a59d82956b1cc4c693639f (diff)
downloadperl-d081a35540aca5feaa56d2ce8a0b72b909a2d79e.tar.gz
make PADOFFSET be SSizet_t
Currently it's defined as U32 or U64 depending on whether pointers are 32 bit or 64-bit, which is just a long-winded way of doing typedef Size_t PADOFFSET Change it to typedef SSize_t PADOFFSET Making it signed makes it easier to handle comparisons against PADOFFSET values that can be -1, such as PL_comppad_name_floor (which will be fixed in the next commit).
Diffstat (limited to 'pad.h')
-rw-r--r--pad.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/pad.h b/pad.h
index 7ed10333f2..56d88abc8d 100644
--- a/pad.h
+++ b/pad.h
@@ -18,13 +18,7 @@
/* offsets within a pad */
-#if PTRSIZE == 4
-typedef U32TYPE PADOFFSET;
-#else
-# if PTRSIZE == 8
-typedef U64TYPE PADOFFSET;
-# endif
-#endif
+typedef SSize_t PADOFFSET; /* signed so that -1 is a valid value */
#define NOT_IN_PAD ((PADOFFSET) -1)
/* B.xs expects the first members of these two structs to line up