2 perlxs.h - Standard XS header file
3 Copyright (c) Fuji, Goro (gfx)
10 #define PERL_NO_GET_CONTEXT /* we want efficiency */
14 #define NO_XSLOCKS /* for exceptions */
23 /* portability stuff not supported by ppport.h yet */
25 #ifndef STATIC_INLINE /* from 5.13.4 */
26 # if defined(__GNUC__) || defined(__cplusplus__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
27 # define STATIC_INLINE static inline
29 # define STATIC_INLINE static
31 #endif /* STATIC_INLINE */
33 #ifndef __attribute__format__
34 #define __attribute__format__(a,b,c) /* nothing */
37 #ifndef LIKELY /* they are just a compiler's hint */
39 #define UNLIKELY(x) (x)
42 #ifndef newSVpvs_share
43 #define newSVpvs_share(s) Perl_newSVpvn_share(aTHX_ STR_WITH_LEN(s), 0U)
47 #define get_cvs(name, flags) get_cv(name, flags)
51 #define GvNAME_get GvNAME
54 #define GvNAMELEN_get GvNAMELEN
58 #define CvGV_set(cv, gv) (CvGV(cv) = (gv))
63 #if PERL_BCDVERSION >= 0x5008005
64 #define LooksLikeNumber(x) looks_like_number(x)
66 #define LooksLikeNumber(x) (SvPOKp(x) ? looks_like_number(x) : (I32)SvNIOKp(x))
69 #define newAV_mortal() (AV*)sv_2mortal((SV*)newAV())
70 #define newHV_mortal() (HV*)sv_2mortal((SV*)newHV())
72 #define DECL_BOOT(name) EXTERN_C XS(CAT2(boot_, name))
73 #define CALL_BOOT(name) STMT_START { \
75 CALL_FPTR(CAT2(boot_, name))(aTHX_ cv); \