#ifdef DEBUGGING
# undef DEBUG_m
-# define DEBUG_m(a) if (PERL_GET_INTERP && PL_debug & 128) a
+# define DEBUG_m(a) \
+ STMT_START { \
+ if (PERL_GET_INTERP) { dTHX; if (PL_debug & 128) { a; } } \
+ } STMT_END
#endif
/*
if ((p = nextf[bucket]) == NULL) {
MALLOC_UNLOCK;
#ifdef PERL_CORE
- if (!PL_nomemok) {
- PerlIO_puts(PerlIO_stderr(),"Out of memory!\n");
- WITH_THX(my_exit(1));
+ {
+ dTHX;
+ if (!PL_nomemok) {
+ PerlIO_puts(PerlIO_stderr(),"Out of memory!\n");
+ my_exit(1);
+ }
}
#else
return (NULL);
# if defined(PERL_OBJECT)
# define DEBUG_m(a) if (PL_debug & 128) a
# else
-# define DEBUG_m(a) if (PERL_GET_INTERP && PL_debug & 128) a
+# define DEBUG_m(a) \
+ STMT_START { \
+ if (PERL_GET_INTERP) { dTHX; if (PL_debug & 128) { a; } } \
+ } STMT_END
# endif
#define DEBUG_f(a) if (PL_debug & 256) a
#define DEBUG_r(a) if (PL_debug & 512) a
#endif
ptr = PerlMem_realloc(where,size);
- DEBUG_m( {
- PerlIO_printf(Perl_debug_log, "0x%lx: (%05d) rfree\n",where,PL_an++);
- PerlIO_printf(Perl_debug_log, "0x%lx: (%05d) realloc %ld bytes\n",ptr,PL_an++,(long)size);
- } )
+ DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%lx: (%05d) rfree\n",where,PL_an++));
+ DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%lx: (%05d) realloc %ld bytes\n",ptr,PL_an++,(long)size));
if (ptr != Nullch)
return ptr;