@@ -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). */
@@ -485,7 +486,8 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used.
485486 Perl_sv_catxmlpvn(aTHX_ dsv, STR_WITH_LEN(str), utf8)
486487
487488
488- #define lex_stuff_pvs (pv ,flags ) Perl_lex_stuff_pvn(aTHX_ STR_WITH_LEN(pv), flags)
489+ #define lex_stuff_pvs (pv ,flags ) \
490+ Perl_lex_stuff_pvn(aTHX_ STR_WITH_LEN(pv), flags)
489491
490492#define get_cvs (str , flags ) \
491493 Perl_get_cvn_flags(aTHX_ STR_WITH_LEN(str), (flags))
@@ -712,7 +714,8 @@ based on the underlying C library functions):
712714#define strnNE (s1 ,s2 ,l ) (strncmp(s1,s2,l) != 0)
713715#define strnEQ (s1 ,s2 ,l ) (strncmp(s1,s2,l) == 0)
714716
715- #define memEQ (s1 ,s2 ,l ) (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0)
717+ #define memEQ (s1 ,s2 ,l ) \
718+ (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0)
716719#define memNE (s1 ,s2 ,l ) (! memEQ(s1,s2,l))
717720
718721/* memEQ and memNE where second comparand is a string constant */
@@ -744,7 +747,8 @@ based on the underlying C library functions):
744747#define memGT (s1 ,s2 ,l ) (memcmp(s1,s2,l) > 0)
745748#define memGE (s1 ,s2 ,l ) (memcmp(s1,s2,l) >= 0)
746749
747- #define memCHRs (s1 ,c ) ((const char *) memchr(ASSERT_IS_LITERAL(s1) , c, sizeof(s1)-1))
750+ #define memCHRs (s1 ,c ) \
751+ ((const char *) memchr(ASSERT_IS_LITERAL(s1) , c, sizeof(s1)-1))
748752
749753/*
750754 * Character classes.
@@ -1666,7 +1670,8 @@ END_EXTERN_C
16661670# define isPUNCT_A (c ) generic_isCC_A_(c, CC_PUNCT_)
16671671# define isSPACE_A (c ) generic_isCC_A_(c, CC_SPACE_)
16681672# define isWORDCHAR_A (c ) generic_isCC_A_(c, CC_WORDCHAR_)
1669- # define isXDIGIT_A (c ) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII xdigits */
1673+ # define isXDIGIT_A (c ) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII
1674+ xdigits */
16701675# define isIDFIRST_A (c ) generic_isCC_A_(c, CC_IDFIRST_)
16711676# define isALPHA_L1 (c ) generic_isCC_(c, CC_ALPHA_)
16721677# define isALPHANUMERIC_L1 (c ) generic_isCC_(c, CC_ALPHANUMERIC_)
@@ -2204,11 +2209,13 @@ END_EXTERN_C
22042209#define isPRINT_uvchr (c ) generic_invlist_uvchr_(CC_PRINT_, c)
22052210
22062211#define isPUNCT_uvchr (c ) generic_invlist_uvchr_(CC_PUNCT_, c)
2207- #define isSPACE_uvchr (c ) generic_uvchr_(CC_SPACE_, is_XPERLSPACE_cp_high, c)
2212+ #define isSPACE_uvchr (c ) \
2213+ generic_uvchr_(CC_SPACE_, is_XPERLSPACE_cp_high, c)
22082214#define isPSXSPC_uvchr (c ) isSPACE_uvchr(c)
22092215
22102216#define isUPPER_uvchr (c ) generic_invlist_uvchr_(CC_UPPER_, c)
2211- #define isVERTWS_uvchr (c ) generic_uvchr_(CC_VERTSPACE_, is_VERTWS_cp_high, c)
2217+ #define isVERTWS_uvchr (c ) \
2218+ generic_uvchr_(CC_VERTSPACE_, is_VERTWS_cp_high, c)
22122219#define isWORDCHAR_uvchr (c ) generic_invlist_uvchr_(CC_WORDCHAR_, c)
22132220#define isXDIGIT_uvchr (c ) generic_uvchr_(CC_XDIGIT_, is_XDIGIT_cp_high, c)
22142221
@@ -2753,7 +2760,8 @@ PoisonWith(0xEF) for catching access to freed memory.
27532760
27542761#define MEM_SIZE_MAX ((MEM_SIZE)-1)
27552762
2756- #define _PERL_STRLEN_ROUNDUP_UNCHECKED (n ) (((n) - 1 + PERL_STRLEN_ROUNDUP_QUANTUM) & ~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM - 1))
2763+ #define _PERL_STRLEN_ROUNDUP_UNCHECKED (n ) \
2764+ (((n) - 1 + PERL_STRLEN_ROUNDUP_QUANTUM) & ~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM - 1))
27572765
27582766#ifdef PERL_MALLOC_WRAP
27592767
@@ -2807,7 +2815,8 @@ PoisonWith(0xEF) for catching access to freed memory.
28072815
28082816# define MEM_WRAP_CHECK_ (n ,t ) MEM_WRAP_CHECK(n,t),
28092817
2810- # 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))
2818+ # define PERL_STRLEN_ROUNDUP (n ) \
2819+ ((void)(((n) > MEM_SIZE_MAX - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (croak_memory_wrap(),0) : 0), _PERL_STRLEN_ROUNDUP_UNCHECKED(n))
28112820#else
28122821
28132822# define MEM_WRAP_CHECK (n ,t )
@@ -2867,9 +2876,12 @@ enum mem_log_type {
28672876#endif
28682877
28692878#ifdef PERL_MEM_LOG
2870- #define MEM_LOG_ALLOC (n ,t ,a ) Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
2871- #define MEM_LOG_REALLOC (n ,t ,v ,a ) Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
2872- #define MEM_LOG_FREE (a ) Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
2879+ #define MEM_LOG_ALLOC (n ,t ,a ) \
2880+ Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
2881+ #define MEM_LOG_REALLOC (n ,t ,v ,a ) \
2882+ Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
2883+ #define MEM_LOG_FREE (a ) \
2884+ Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
28732885#endif
28742886
28752887#ifndef MEM_LOG_ALLOC
@@ -2882,9 +2894,12 @@ enum mem_log_type {
28822894#define MEM_LOG_FREE (a ) (a)
28832895#endif
28842896
2885- #define Newx (v ,n ,t ) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2886- #define Newxc (v ,n ,t ,c ) (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2887- #define Newxz (v ,n ,t ) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
2897+ #define Newx (v ,n ,t ) \
2898+ (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2899+ #define Newxc (v ,n ,t ,c ) \
2900+ (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2901+ #define Newxz (v ,n ,t ) \
2902+ (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
28882903
28892904#ifndef PERL_CORE
28902905/* pre 5.9.x compatibility */
@@ -2911,22 +2926,29 @@ enum mem_log_type {
29112926#define perl_assert_ptr (p ) assert( ((void*)(p)) != 0 )
29122927
29132928
2914- #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)))
2915- #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)))
2916- #define Zero (d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
2929+ #define Move (s ,d ,n ,t ) \
2930+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2931+ #define Copy (s ,d ,n ,t ) \
2932+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2933+ #define Zero (d ,n ,t ) \
2934+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
29172935
29182936/* Like above, but returns a pointer to 'd' */
2919- #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)))
2920- #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)))
2921- #define ZeroD (d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), memzero((char*)(d), (n) * sizeof(t)))
2937+ #define MoveD (s ,d ,n ,t ) \
2938+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2939+ #define CopyD (s ,d ,n ,t ) \
2940+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2941+ #define ZeroD (d ,n ,t ) \
2942+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), memzero((char*)(d), (n) * sizeof(t)))
29222943
29232944#define NewCopy (s ,d ,n ,t ) \
29242945 STMT_START { \
29252946 Newx(d,n,t); \
29262947 Copy(s,d,n,t); \
29272948 } STMT_END
29282949
2929- #define PoisonWith (d ,n ,t ,b ) (MEM_WRAP_CHECK_(n,t) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)))
2950+ #define PoisonWith (d ,n ,t ,b ) \
2951+ (MEM_WRAP_CHECK_(n,t) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)))
29302952#define PoisonNew (d ,n ,t ) PoisonWith(d,n,t,0xAB)
29312953#define PoisonFree (d ,n ,t ) PoisonWith(d,n,t,0xEF)
29322954#define Poison (d ,n ,t ) PoisonFree(d,n,t)
0 commit comments