@@ -158,7 +158,8 @@ required, but is kept for backwards compatibility.
158158 * XXX Should really be a Configure probe, with HAS__FUNCTION__
159159 * and FUNCTION__ as results.
160160 * XXX Similarly, a Configure probe for __FILE__ and __LINE__ is needed. */
161- #if (defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || (defined(__SUNPRO_C )) /* C99 or close enough. */
161+ #if (defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || \
162+ (defined(__SUNPRO_C )) /* C99 or close enough. */
162163# define FUNCTION__ __func__
163164# define SAFE_FUNCTION__ __func__
164165#elif (defined(__DECC_VER )) /* Tru64 or VMS, and strict C89 being used, but not modern enough cc (in Tru64, -c99 not known, only -std1). */
@@ -483,7 +484,8 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used.
483484#define gv_fetchpvn gv_fetchpvn_flags
484485
485486
486- #define lex_stuff_pvs (pv ,flags ) Perl_lex_stuff_pvn(aTHX_ STR_WITH_LEN(pv), flags)
487+ #define lex_stuff_pvs (pv ,flags ) \
488+ Perl_lex_stuff_pvn(aTHX_ STR_WITH_LEN(pv), flags)
487489
488490#define get_cvs (str , flags ) \
489491 Perl_get_cvn_flags(aTHX_ STR_WITH_LEN(str), (flags))
@@ -710,7 +712,8 @@ based on the underlying C library functions):
710712#define strnNE (s1 ,s2 ,l ) (strncmp(s1,s2,l) != 0)
711713#define strnEQ (s1 ,s2 ,l ) (strncmp(s1,s2,l) == 0)
712714
713- #define memEQ (s1 ,s2 ,l ) (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0)
715+ #define memEQ (s1 ,s2 ,l ) \
716+ (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0)
714717#define memNE (s1 ,s2 ,l ) (! memEQ(s1,s2,l))
715718
716719/* memEQ and memNE where second comparand is a string constant */
@@ -742,7 +745,8 @@ based on the underlying C library functions):
742745#define memGT (s1 ,s2 ,l ) (memcmp(s1,s2,l) > 0)
743746#define memGE (s1 ,s2 ,l ) (memcmp(s1,s2,l) >= 0)
744747
745- #define memCHRs (s1 ,c ) ((const char *) memchr(ASSERT_IS_LITERAL(s1) , c, sizeof(s1)-1))
748+ #define memCHRs (s1 ,c ) \
749+ ((const char *) memchr(ASSERT_IS_LITERAL(s1) , c, sizeof(s1)-1))
746750
747751/*
748752 * Character classes.
@@ -1664,7 +1668,8 @@ END_EXTERN_C
16641668# define isPUNCT_A (c ) generic_isCC_A_(c, CC_PUNCT_)
16651669# define isSPACE_A (c ) generic_isCC_A_(c, CC_SPACE_)
16661670# define isWORDCHAR_A (c ) generic_isCC_A_(c, CC_WORDCHAR_)
1667- # define isXDIGIT_A (c ) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII xdigits */
1671+ # define isXDIGIT_A (c ) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII
1672+ xdigits */
16681673# define isIDFIRST_A (c ) generic_isCC_A_(c, CC_IDFIRST_)
16691674# define isALPHA_L1 (c ) generic_isCC_(c, CC_ALPHA_)
16701675# define isALPHANUMERIC_L1 (c ) generic_isCC_(c, CC_ALPHANUMERIC_)
@@ -2202,11 +2207,13 @@ END_EXTERN_C
22022207#define isPRINT_uvchr (c ) generic_invlist_uvchr_(CC_PRINT_, c)
22032208
22042209#define isPUNCT_uvchr (c ) generic_invlist_uvchr_(CC_PUNCT_, c)
2205- #define isSPACE_uvchr (c ) generic_uvchr_(CC_SPACE_, is_XPERLSPACE_cp_high, c)
2210+ #define isSPACE_uvchr (c ) \
2211+ generic_uvchr_(CC_SPACE_, is_XPERLSPACE_cp_high, c)
22062212#define isPSXSPC_uvchr (c ) isSPACE_uvchr(c)
22072213
22082214#define isUPPER_uvchr (c ) generic_invlist_uvchr_(CC_UPPER_, c)
2209- #define isVERTWS_uvchr (c ) generic_uvchr_(CC_VERTSPACE_, is_VERTWS_cp_high, c)
2215+ #define isVERTWS_uvchr (c ) \
2216+ generic_uvchr_(CC_VERTSPACE_, is_VERTWS_cp_high, c)
22102217#define isWORDCHAR_uvchr (c ) generic_invlist_uvchr_(CC_WORDCHAR_, c)
22112218#define isXDIGIT_uvchr (c ) generic_uvchr_(CC_XDIGIT_, is_XDIGIT_cp_high, c)
22122219
@@ -2751,7 +2758,8 @@ PoisonWith(0xEF) for catching access to freed memory.
27512758
27522759#define MEM_SIZE_MAX ((MEM_SIZE)-1)
27532760
2754- #define _PERL_STRLEN_ROUNDUP_UNCHECKED (n ) (((n) - 1 + PERL_STRLEN_ROUNDUP_QUANTUM) & ~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM - 1))
2761+ #define _PERL_STRLEN_ROUNDUP_UNCHECKED (n ) \
2762+ (((n) - 1 + PERL_STRLEN_ROUNDUP_QUANTUM) & ~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM - 1))
27552763
27562764#ifdef PERL_MALLOC_WRAP
27572765
@@ -2805,7 +2813,8 @@ PoisonWith(0xEF) for catching access to freed memory.
28052813
28062814# define MEM_WRAP_CHECK_ (n ,t ) MEM_WRAP_CHECK(n,t),
28072815
2808- # define PERL_STRLEN_ROUNDUP (n ) ((void)(((n) > MEM_SIZE_MAX - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (croak_memory_wrap(),0) : 0), _PERL_STRLEN_ROUNDUP_UNCHECKED(n))
2816+ # define PERL_STRLEN_ROUNDUP (n ) \
2817+ ((void)(((n) > MEM_SIZE_MAX - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (croak_memory_wrap(),0) : 0), _PERL_STRLEN_ROUNDUP_UNCHECKED(n))
28092818#else
28102819
28112820# define MEM_WRAP_CHECK (n ,t )
@@ -2865,9 +2874,12 @@ enum mem_log_type {
28652874#endif
28662875
28672876#ifdef PERL_MEM_LOG
2868- #define MEM_LOG_ALLOC (n ,t ,a ) Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
2869- #define MEM_LOG_REALLOC (n ,t ,v ,a ) Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
2870- #define MEM_LOG_FREE (a ) Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
2877+ #define MEM_LOG_ALLOC (n ,t ,a ) \
2878+ Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
2879+ #define MEM_LOG_REALLOC (n ,t ,v ,a ) \
2880+ Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
2881+ #define MEM_LOG_FREE (a ) \
2882+ Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
28712883#endif
28722884
28732885#ifndef MEM_LOG_ALLOC
@@ -2880,9 +2892,12 @@ enum mem_log_type {
28802892#define MEM_LOG_FREE (a ) (a)
28812893#endif
28822894
2883- #define Newx (v ,n ,t ) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2884- #define Newxc (v ,n ,t ,c ) (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2885- #define Newxz (v ,n ,t ) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
2895+ #define Newx (v ,n ,t ) \
2896+ (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2897+ #define Newxc (v ,n ,t ,c ) \
2898+ (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2899+ #define Newxz (v ,n ,t ) \
2900+ (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
28862901
28872902#ifndef PERL_CORE
28882903/* pre 5.9.x compatibility */
@@ -2909,22 +2924,29 @@ enum mem_log_type {
29092924#define perl_assert_ptr (p ) assert( ((void*)(p)) != 0 )
29102925
29112926
2912- #define Move (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2913- #define Copy (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2914- #define Zero (d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
2927+ #define Move (s ,d ,n ,t ) \
2928+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2929+ #define Copy (s ,d ,n ,t ) \
2930+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2931+ #define Zero (d ,n ,t ) \
2932+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
29152933
29162934/* Like above, but returns a pointer to 'd' */
2917- #define MoveD (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2918- #define CopyD (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2919- #define ZeroD (d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), memzero((char*)(d), (n) * sizeof(t)))
2935+ #define MoveD (s ,d ,n ,t ) \
2936+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2937+ #define CopyD (s ,d ,n ,t ) \
2938+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2939+ #define ZeroD (d ,n ,t ) \
2940+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), memzero((char*)(d), (n) * sizeof(t)))
29202941
29212942#define NewCopy (s ,d ,n ,t ) \
29222943 STMT_START { \
29232944 Newx(d,n,t); \
29242945 Copy(s,d,n,t); \
29252946 } STMT_END
29262947
2927- #define PoisonWith (d ,n ,t ,b ) (MEM_WRAP_CHECK_(n,t) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)))
2948+ #define PoisonWith (d ,n ,t ,b ) \
2949+ (MEM_WRAP_CHECK_(n,t) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)))
29282950#define PoisonNew (d ,n ,t ) PoisonWith(d,n,t,0xAB)
29292951#define PoisonFree (d ,n ,t ) PoisonWith(d,n,t,0xEF)
29302952#define Poison (d ,n ,t ) PoisonFree(d,n,t)
0 commit comments