99 */
1010
1111#ifndef PERL_XSUB_H_
12- #define PERL_XSUB_H_ 1
12+ #define PERL_XSUB_H_ 1
1313
1414/* first, some documentation for xsubpp-generated items */
1515
@@ -108,13 +108,13 @@ is a lexical C<$_> in scope.
108108*/
109109
110110#ifndef PERL_UNUSED_ARG
111- # define PERL_UNUSED_ARG (x ) ((void )sizeof (x))
111+ # define PERL_UNUSED_ARG (x ) ((void )sizeof (x))
112112#endif
113113#ifndef PERL_UNUSED_VAR
114- # define PERL_UNUSED_VAR (x ) ((void )sizeof (x))
114+ # define PERL_UNUSED_VAR (x ) ((void )sizeof (x))
115115#endif
116116
117- #define ST (off ) PL_stack_base[ax + (off)]
117+ #define ST (off ) PL_stack_base[ax + (off)]
118118
119119/* XSPROTO() is also used by SWIG like this:
120120 *
@@ -134,36 +134,36 @@ is a lexical C<$_> in scope.
134134 * "STATIC", ie. it exports XSUB symbols. You probably don't want that.
135135 */
136136
137- #define XSPROTO (name ) void name (pTHX_ CV* cv __attribute__unused__)
137+ #define XSPROTO (name ) void name (pTHX_ CV* cv __attribute__unused__)
138138
139139#undef XS
140140#undef XS_EXTERNAL
141141#undef XS_INTERNAL
142142#if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
143- # define XS_EXTERNAL (name ) __declspec(dllexport) XSPROTO(name)
144- # define XS_INTERNAL (name ) STATIC XSPROTO (name)
143+ # define XS_EXTERNAL (name ) __declspec(dllexport) XSPROTO(name)
144+ # define XS_INTERNAL (name ) STATIC XSPROTO (name)
145145#elif defined(__cplusplus)
146- # define XS_EXTERNAL (name ) extern " C" XSPROTO(name)
147- # define XS_INTERNAL (name ) static XSPROTO (name)
146+ # define XS_EXTERNAL (name ) extern " C" XSPROTO(name)
147+ # define XS_INTERNAL (name ) static XSPROTO (name)
148148#elif defined(HASATTRIBUTE_UNUSED)
149- # define XS_EXTERNAL (name ) void name (pTHX_ CV* cv __attribute__unused__)
150- # define XS_INTERNAL (name ) STATIC void name (pTHX_ CV* cv __attribute__unused__)
149+ # define XS_EXTERNAL (name ) void name (pTHX_ CV* cv __attribute__unused__)
150+ # define XS_INTERNAL (name ) STATIC void name (pTHX_ CV* cv __attribute__unused__)
151151#else
152- # define XS_EXTERNAL (name ) XSPROTO(name)
153- # define XS_INTERNAL (name ) STATIC XSPROTO (name)
152+ # define XS_EXTERNAL (name ) XSPROTO(name)
153+ # define XS_INTERNAL (name ) STATIC XSPROTO (name)
154154#endif
155155
156156/* We do export xsub symbols by default for the public XS macro.
157157 * Try explicitly using XS_INTERNAL/XS_EXTERNAL instead, please. */
158- #define XS (name ) XS_EXTERNAL(name)
158+ #define XS (name ) XS_EXTERNAL(name)
159159
160- #define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1 )
160+ #define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1 )
161161
162162#define dAXMARK \
163163 I32 ax = POPMARK; \
164164 SV **mark = PL_stack_base + ax++
165165
166- #define dITEMS I32 items = (I32)(SP - MARK)
166+ #define dITEMS I32 items = (I32)(SP - MARK)
167167
168168#define dXSARGS \
169169 dSP; dAXMARK; dITEMS
@@ -181,7 +181,7 @@ is a lexical C<$_> in scope.
181181 SV **mark = PL_stack_base + ax - 1 ; dSP; dITEMS
182182/* dXSBOOTARGSNOVERCHK has no API in xsubpp to choose it so do
183183#undef dXSBOOTARGSXSAPIVERCHK
184- #define dXSBOOTARGSXSAPIVERCHK dXSBOOTARGSNOVERCHK */
184+ #define dXSBOOTARGSXSAPIVERCHK dXSBOOTARGSNOVERCHK */
185185#define dXSBOOTARGSNOVERCHK \
186186 I32 ax = XS_SETXSUBFN_POPMARK; \
187187 SV **mark = PL_stack_base + ax - 1 ; dSP; dITEMS
@@ -191,26 +191,26 @@ is a lexical C<$_> in scope.
191191 ? PAD_SV(PL_op->op_targ) : sv_newmortal())
192192
193193/* Should be used before final PUSHi etc. if not in PPCODE section. */
194- #define XSprePUSH (sp = PL_stack_base + ax - 1 )
194+ #define XSprePUSH (sp = PL_stack_base + ax - 1 )
195195
196- #define XSANY CvXSUBANY (cv)
196+ #define XSANY CvXSUBANY (cv)
197197
198- #define dXSI32 I32 ix = XSANY.any_i32
198+ #define dXSI32 I32 ix = XSANY.any_i32
199199
200200#ifdef __cplusplus
201- # define XSINTERFACE_CVT (ret,name ) ret (*name)(...)
202- # define XSINTERFACE_CVT_ANON (ret ) ret (*)(...)
201+ # define XSINTERFACE_CVT (ret,name ) ret (*name)(...)
202+ # define XSINTERFACE_CVT_ANON (ret ) ret (*)(...)
203203#else
204- # define XSINTERFACE_CVT (ret,name ) ret (*name)()
205- # define XSINTERFACE_CVT_ANON (ret ) ret (*)()
204+ # define XSINTERFACE_CVT (ret,name ) ret (*name)()
205+ # define XSINTERFACE_CVT_ANON (ret ) ret (*)()
206206#endif
207- #define dXSFUNCTION (ret ) XSINTERFACE_CVT(ret,XSFUNCTION)
208- #define XSINTERFACE_FUNC (ret,cv,f ) ((XSINTERFACE_CVT_ANON(ret))(f))
207+ #define dXSFUNCTION (ret ) XSINTERFACE_CVT(ret,XSFUNCTION)
208+ #define XSINTERFACE_FUNC (ret,cv,f ) ((XSINTERFACE_CVT_ANON(ret))(f))
209209#define XSINTERFACE_FUNC_SET (cv,f ) \
210210 CvXSUBANY (cv).any_dxptr = (void (*) (pTHX_ void *))(f)
211211
212- #define dUNDERBAR dNOOP
213- #define UNDERBAR find_rundefsv ()
212+ #define dUNDERBAR dNOOP
213+ #define UNDERBAR find_rundefsv ()
214214
215215/* Simple macros to put new mortal values onto the stack. */
216216/* Typically used to return values from XS functions. */
@@ -313,14 +313,14 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
313313=cut
314314*/
315315
316- #define XST_mIV (i,v ) (ST(i) = sv_2mortal(newSViv(v)) )
317- #define XST_mUV (i,v ) (ST(i) = sv_2mortal(newSVuv(v)) )
318- #define XST_mNV (i,v ) (ST(i) = sv_2mortal(newSVnv(v)) )
319- #define XST_mPV (i,v ) (ST(i) = sv_2mortal(newSVpv(v,0 )))
320- #define XST_mPVN (i,v,n ) (ST(i) = newSVpvn_flags(v,n, SVs_TEMP))
321- #define XST_mNO (i ) (ST(i) = &PL_sv_no )
322- #define XST_mYES (i ) (ST(i) = &PL_sv_yes )
323- #define XST_mUNDEF (i ) (ST(i) = &PL_sv_undef)
316+ #define XST_mIV (i,v ) (ST(i) = sv_2mortal(newSViv(v)) )
317+ #define XST_mUV (i,v ) (ST(i) = sv_2mortal(newSVuv(v)) )
318+ #define XST_mNV (i,v ) (ST(i) = sv_2mortal(newSVnv(v)) )
319+ #define XST_mPV (i,v ) (ST(i) = sv_2mortal(newSVpv(v,0 )))
320+ #define XST_mPVN (i,v,n ) (ST(i) = newSVpvn_flags(v,n, SVs_TEMP))
321+ #define XST_mNO (i ) (ST(i) = &PL_sv_no )
322+ #define XST_mYES (i ) (ST(i) = &PL_sv_yes )
323+ #define XST_mUNDEF (i ) (ST(i) = &PL_sv_undef)
324324
325325#define XSRETURN (off ) \
326326 STMT_START { \
@@ -330,17 +330,17 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
330330 return ; \
331331 } STMT_END
332332
333- #define XSRETURN_IV (v ) STMT_START { XST_mIV (0 ,v); XSRETURN (1 ); } STMT_END
334- #define XSRETURN_UV (v ) STMT_START { XST_mUV (0 ,v); XSRETURN (1 ); } STMT_END
335- #define XSRETURN_NV (v ) STMT_START { XST_mNV (0 ,v); XSRETURN (1 ); } STMT_END
336- #define XSRETURN_PV (v ) STMT_START { XST_mPV (0 ,v); XSRETURN (1 ); } STMT_END
337- #define XSRETURN_PVN (v,n ) STMT_START { XST_mPVN (0 ,v,n); XSRETURN (1 ); } STMT_END
338- #define XSRETURN_NO STMT_START { XST_mNO (0 ); XSRETURN (1 ); } STMT_END
339- #define XSRETURN_YES STMT_START { XST_mYES (0 ); XSRETURN (1 ); } STMT_END
340- #define XSRETURN_UNDEF STMT_START { XST_mUNDEF (0 ); XSRETURN (1 ); } STMT_END
341- #define XSRETURN_EMPTY STMT_START { XSRETURN (0 ); } STMT_END
333+ #define XSRETURN_IV (v ) STMT_START { XST_mIV (0 ,v); XSRETURN (1 ); } STMT_END
334+ #define XSRETURN_UV (v ) STMT_START { XST_mUV (0 ,v); XSRETURN (1 ); } STMT_END
335+ #define XSRETURN_NV (v ) STMT_START { XST_mNV (0 ,v); XSRETURN (1 ); } STMT_END
336+ #define XSRETURN_PV (v ) STMT_START { XST_mPV (0 ,v); XSRETURN (1 ); } STMT_END
337+ #define XSRETURN_PVN (v,n ) STMT_START { XST_mPVN (0 ,v,n); XSRETURN (1 ); } STMT_END
338+ #define XSRETURN_NO STMT_START { XST_mNO (0 ); XSRETURN (1 ); } STMT_END
339+ #define XSRETURN_YES STMT_START { XST_mYES (0 ); XSRETURN (1 ); } STMT_END
340+ #define XSRETURN_UNDEF STMT_START { XST_mUNDEF (0 ); XSRETURN (1 ); } STMT_END
341+ #define XSRETURN_EMPTY STMT_START { XSRETURN (0 ); } STMT_END
342342
343- #define newXSproto (a,b,c,d ) newXS_flags(a,b,c,d,0 )
343+ #define newXSproto (a,b,c,d ) newXS_flags(a,b,c,d,0 )
344344
345345#ifdef XS_VERSION
346346# define XS_VERSION_BOOTCHECK \
@@ -361,7 +361,7 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
361361 HS_CXT, __FILE__, items, ax, "v" PERL_API_VERSION_STRING, XS_VERSION)
362362#else
363363/* should this be a #error? if you want both checked, you better supply XS_VERSION right? */
364- # define XS_BOTHVERSION_BOOTCHECK XS_APIVERSION_BOOTCHECK
364+ # define XS_BOTHVERSION_BOOTCHECK XS_APIVERSION_BOOTCHECK
365365#endif
366366
367367/* private API */
@@ -374,7 +374,7 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
374374 HS_CXT, __FILE__, "v" PERL_API_VERSION_STRING, XS_VERSION)
375375#else
376376/* should this be a #error? if you want both checked, you better supply XS_VERSION right? */
377- # define XS_BOTHVERSION_POPMARK_BOOTCHECK XS_APIVERSION_POPMARK_BOOTCHECK
377+ # define XS_BOTHVERSION_POPMARK_BOOTCHECK XS_APIVERSION_POPMARK_BOOTCHECK
378378#endif
379379
380380#define XS_APIVERSION_SETXSUBFN_POPMARK_BOOTCHECK \
@@ -398,11 +398,11 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
398398 Perl_xs_handshake (HS_KEY(TRUE , TRUE , " " , " " ) | HSf_NOCHK, HS_CXT, __FILE__)
399399
400400#ifdef NO_XSLOCKS
401- # define dXCPT dJMPENV; int rEtV = 0
402- # define XCPT_TRY_START JMPENV_PUSH (rEtV); if (rEtV == 0 )
403- # define XCPT_TRY_END JMPENV_POP;
404- # define XCPT_CATCH if (rEtV != 0 )
405- # define XCPT_RETHROW JMPENV_JUMP (rEtV)
401+ # define dXCPT dJMPENV; int rEtV = 0
402+ # define XCPT_TRY_START JMPENV_PUSH (rEtV); if (rEtV == 0 )
403+ # define XCPT_TRY_END JMPENV_POP;
404+ # define XCPT_CATCH if (rEtV != 0 )
405+ # define XCPT_RETHROW JMPENV_JUMP (rEtV)
406406#endif
407407
408408/*
@@ -456,42 +456,42 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
456456 } STMT_END
457457
458458#if 1 /* for compatibility */
459- # define VTBL_sv &PL_vtbl_sv
460- # define VTBL_env &PL_vtbl_env
461- # define VTBL_envelem &PL_vtbl_envelem
462- # define VTBL_sigelem &PL_vtbl_sigelem
463- # define VTBL_pack &PL_vtbl_pack
464- # define VTBL_packelem &PL_vtbl_packelem
465- # define VTBL_dbline &PL_vtbl_dbline
466- # define VTBL_isa &PL_vtbl_isa
467- # define VTBL_isaelem &PL_vtbl_isaelem
468- # define VTBL_arylen &PL_vtbl_arylen
469- # define VTBL_glob &PL_vtbl_glob
470- # define VTBL_mglob &PL_vtbl_mglob
471- # define VTBL_nkeys &PL_vtbl_nkeys
472- # define VTBL_taint &PL_vtbl_taint
473- # define VTBL_substr &PL_vtbl_substr
474- # define VTBL_vec &PL_vtbl_vec
475- # define VTBL_pos &PL_vtbl_pos
476- # define VTBL_bm &PL_vtbl_bm
477- # define VTBL_fm &PL_vtbl_fm
478- # define VTBL_uvar &PL_vtbl_uvar
479- # define VTBL_defelem &PL_vtbl_defelem
480- # define VTBL_regexp &PL_vtbl_regexp
481- # define VTBL_regdata &PL_vtbl_regdata
482- # define VTBL_regdatum &PL_vtbl_regdatum
459+ # define VTBL_sv &PL_vtbl_sv
460+ # define VTBL_env &PL_vtbl_env
461+ # define VTBL_envelem &PL_vtbl_envelem
462+ # define VTBL_sigelem &PL_vtbl_sigelem
463+ # define VTBL_pack &PL_vtbl_pack
464+ # define VTBL_packelem &PL_vtbl_packelem
465+ # define VTBL_dbline &PL_vtbl_dbline
466+ # define VTBL_isa &PL_vtbl_isa
467+ # define VTBL_isaelem &PL_vtbl_isaelem
468+ # define VTBL_arylen &PL_vtbl_arylen
469+ # define VTBL_glob &PL_vtbl_glob
470+ # define VTBL_mglob &PL_vtbl_mglob
471+ # define VTBL_nkeys &PL_vtbl_nkeys
472+ # define VTBL_taint &PL_vtbl_taint
473+ # define VTBL_substr &PL_vtbl_substr
474+ # define VTBL_vec &PL_vtbl_vec
475+ # define VTBL_pos &PL_vtbl_pos
476+ # define VTBL_bm &PL_vtbl_bm
477+ # define VTBL_fm &PL_vtbl_fm
478+ # define VTBL_uvar &PL_vtbl_uvar
479+ # define VTBL_defelem &PL_vtbl_defelem
480+ # define VTBL_regexp &PL_vtbl_regexp
481+ # define VTBL_regdata &PL_vtbl_regdata
482+ # define VTBL_regdatum &PL_vtbl_regdatum
483483# ifdef USE_LOCALE_COLLATE
484- # define VTBL_collxfrm &PL_vtbl_collxfrm
484+ # define VTBL_collxfrm &PL_vtbl_collxfrm
485485# endif
486- # define VTBL_amagic &PL_vtbl_amagic
487- # define VTBL_amagicelem &PL_vtbl_amagicelem
486+ # define VTBL_amagic &PL_vtbl_amagic
487+ # define VTBL_amagicelem &PL_vtbl_amagicelem
488488#endif
489489
490490#if defined(MULTIPLICITY) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE)
491491# undef aTHX
492492# undef aTHX_
493- # define aTHX PERL_GET_THX
494- # define aTHX_ aTHX,
493+ # define aTHX PERL_GET_THX
494+ # define aTHX_ aTHX,
495495#endif
496496
497497#if defined(PERL_IMPLICIT_SYS) && !defined(PERL_CORE)
0 commit comments