diff --git a/XSUB.h b/XSUB.h index 2548a0f45833..69aa3e4b1a85 100644 --- a/XSUB.h +++ b/XSUB.h @@ -37,12 +37,12 @@ Variable which is setup by C to designate the object in a C++ XSUB. This is always the proper type for the C++ object. See C> and L. -=for apidoc Amn|SSize_t|ax +=for apidoc Amn|Stack_off_t|ax Variable which is setup by C to indicate the stack base offset, used by the C, C and C macros. The C macro must be called prior to setup the C variable. -=for apidoc Amn|SSize_t|items +=for apidoc Amn|Stack_off_t|items Variable which is setup by C to indicate the number of items on the stack. See L. @@ -157,13 +157,13 @@ is a lexical C<$_> in scope. * Try explicitly using XS_INTERNAL/XS_EXTERNAL instead, please. */ #define XS(name) XS_EXTERNAL(name) -#define dAX const SSize_t ax = (SSize_t)(MARK - PL_stack_base + 1) +#define dAX const Stack_off_t ax = (Stack_off_t)(MARK - PL_stack_base + 1) #define dAXMARK \ - SSize_t ax = POPMARK; \ + Stack_off_t ax = POPMARK; \ SV **mark = PL_stack_base + ax++ -#define dITEMS SSize_t items = (SSize_t)(SP - MARK) +#define dITEMS Stack_off_t items = (Stack_off_t)(SP - MARK) #define dXSARGS \ dSP; dAXMARK; dITEMS @@ -174,16 +174,16 @@ is a lexical C<$_> in scope. Note these macros are not drop in replacements for dXSARGS since they set PL_xsubfilename. */ #define dXSBOOTARGSXSAPIVERCHK \ - SSize_t ax = XS_BOTHVERSION_SETXSUBFN_POPMARK_BOOTCHECK; \ + Stack_off_t ax = XS_BOTHVERSION_SETXSUBFN_POPMARK_BOOTCHECK; \ SV **mark = PL_stack_base + ax - 1; dSP; dITEMS #define dXSBOOTARGSAPIVERCHK \ - SSize_t ax = XS_APIVERSION_SETXSUBFN_POPMARK_BOOTCHECK; \ + Stack_off_t ax = XS_APIVERSION_SETXSUBFN_POPMARK_BOOTCHECK; \ SV **mark = PL_stack_base + ax - 1; dSP; dITEMS /* dXSBOOTARGSNOVERCHK has no API in xsubpp to choose it so do #undef dXSBOOTARGSXSAPIVERCHK #define dXSBOOTARGSXSAPIVERCHK dXSBOOTARGSNOVERCHK */ #define dXSBOOTARGSNOVERCHK \ - SSize_t ax = XS_SETXSUBFN_POPMARK; \ + Stack_off_t ax = XS_SETXSUBFN_POPMARK; \ SV **mark = PL_stack_base + ax - 1; dSP; dITEMS #define dXSTARG SV * const targ = ((PL_op->op_private & OPpENTERSUB_HASTARG) \ diff --git a/embed.fnc b/embed.fnc index a2a751aa0396..b7154307ac79 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3786,7 +3786,8 @@ Adp |void |wrap_op_checker|Optype opcode \ p |void |write_to_stderr|NN SV *msv Xp |void |xs_boot_epilog |const SSize_t ax -FTXopv |SSize_t|xs_handshake |const U32 key \ +FTXopv |Stack_off_t|xs_handshake \ + |const U32 key \ |NN void *v_my_perl \ |NN const char *file \ |... diff --git a/proto.h b/proto.h index 62df72929b05..d23db55c6425 100644 --- a/proto.h +++ b/proto.h @@ -5351,7 +5351,7 @@ PERL_CALLCONV void Perl_xs_boot_epilog(pTHX_ const SSize_t ax); #define PERL_ARGS_ASSERT_XS_BOOT_EPILOG -PERL_CALLCONV SSize_t +PERL_CALLCONV Stack_off_t Perl_xs_handshake(const U32 key, void *v_my_perl, const char *file, ...); #define PERL_ARGS_ASSERT_XS_HANDSHAKE \ assert(v_my_perl); assert(file) diff --git a/util.c b/util.c index 5df11e27a9c7..a364193aef04 100644 --- a/util.c +++ b/util.c @@ -5531,12 +5531,12 @@ Perl_my_cxt_init(pTHX_ int *indexp, size_t size) 'file' is the source filename of the caller. */ -SSize_t +Stack_off_t Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...) { va_list args; - SSize_t items; - SSize_t ax; + Stack_off_t items; + Stack_off_t ax; void * got; void * need; const char *stage = "first"; @@ -5598,12 +5598,12 @@ Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...) ax = POPMARK; { SV **mark = PL_stack_base + ax++; { dSP; - items = (SSize_t)(SP - MARK); + items = (Stack_off_t)(SP - MARK); } } } else { - items = va_arg(args, SSize_t); - ax = va_arg(args, SSize_t); + items = va_arg(args, Stack_off_t); + ax = va_arg(args, Stack_off_t); } assert(ax >= 0); assert(items >= 0);