Skip to content

Commit c502b73

Browse files
committed
Cleanup Perl_assert definition
PERL_DEB2 is too obscure for me. Simply use #ifdef DEBUGGING
1 parent 1d94fb1 commit c502b73

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

perl.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5113,11 +5113,16 @@ Gid_t getegid (void);
51135113
/* Keep the old croak based assert for those who want it, and as a fallback if
51145114
the platform is so heretically non-ANSI that it can't assert. */
51155115

5116-
#define Perl_assert(what) PERL_DEB2( \
5117-
((what) ? ((void) 0) : \
5118-
(Perl_croak_nocontext("Assertion %s failed: file \"" __FILE__ \
5119-
"\", line %d", STRINGIFY(what), __LINE__), \
5120-
(void) 0)), ((void)0))
5116+
#ifdef DEBUGGING
5117+
# define Perl_assert(what) \
5118+
((what) \
5119+
? ((void) 0) \
5120+
: (Perl_croak_nocontext("Assertion %s failed: file \"" __FILE__ \
5121+
"\", line %d", STRINGIFY(what), __LINE__), \
5122+
(void) 0))
5123+
#else
5124+
# define Perl_assert(what) ((void) 0)
5125+
#endif
51215126

51225127
#ifndef assert
51235128
# define assert(what) Perl_assert(what)

0 commit comments

Comments
 (0)