mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Improve conversions from uint64 to Perl types.
Perl's integers are pointer-sized, so can hold more than INT_MAX on LP64 platforms, and come in both signed (IV) and unsigned (UV). Floating point values (NV) may also be larger than double. Since Perl 5.19.4 array indices are SSize_t instead of I32, so allow up to SSize_t_max on those versions. The limit is not imposed just by av_extend's argument type, but all the array handling code, so remove the speculative comment. Dagfinn Ilmari Mannsåker
This commit is contained in:
@ -88,6 +88,13 @@
|
||||
#define GvCV_set(gv, cv) (GvCV(gv) = cv)
|
||||
#endif
|
||||
|
||||
/* Perl 5.19.4 changed array indices from I32 to SSize_t */
|
||||
#if PERL_BCDVERSION >= 0x5019004
|
||||
#define AV_SIZE_MAX SSize_t_MAX
|
||||
#else
|
||||
#define AV_SIZE_MAX I32_MAX
|
||||
#endif
|
||||
|
||||
/* declare routines from plperl.c for access by .xs files */
|
||||
HV *plperl_spi_exec(char *, int);
|
||||
void plperl_return_next(SV *);
|
||||
|
Reference in New Issue
Block a user