Skip to content

Commit 6ff5935

Browse files
committed
Add #defines for INT16_C, INT32_C
These are claimed to exist in our documentation, but didn't actually until this commit.
1 parent ffdc656 commit 6ff5935

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

perl.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,13 @@ Use C<L</UINTMAX_C>> to get the largest type available on the platform.
14541454
14551455
=cut
14561456
*/
1457+
#ifndef INT16_C
1458+
# if INTSIZE >= 2
1459+
# define INT16_C(x) ((I16_TYPE)x)
1460+
# else
1461+
# define INT16_C(x) ((I16_TYPE)x##L)
1462+
# endif
1463+
#endif
14571464
#ifndef UINT16_C
14581465
# if INTSIZE >= 2
14591466
# define UINT16_C(x) ((U16_TYPE)x##U)
@@ -1462,6 +1469,13 @@ Use C<L</UINTMAX_C>> to get the largest type available on the platform.
14621469
# endif
14631470
#endif
14641471

1472+
#ifndef INT32_C
1473+
# if INTSIZE >= 4
1474+
# define INT32_C(x) ((I32_TYPE)x)
1475+
# else
1476+
# define INT32_C(x) ((I32_TYPE)x##L)
1477+
# endif
1478+
#endif
14651479
#ifndef UINT32_C
14661480
# if INTSIZE >= 4
14671481
# define UINT32_C(x) ((U32_TYPE)x##U)

0 commit comments

Comments
 (0)