#include "perl.h"
#include "XSUB.h"
+bool
+_runops_debug(int flag)
+{
+ dTHX;
+ bool d = PL_runops == MEMBER_TO_FPTR(Perl_runops_debug);
+
+ if (flag >= 0)
+ PL_runops
+ = MEMBER_TO_FPTR(flag ? Perl_runops_debug : Perl_runops_standard);
+ return d;
+}
+
SV *
DeadCode(pTHX)
{
#endif /* !PURIFY */
}
-#if defined(PERL_DEBUGGING_MSTATS) || defined(DEBUGGING_MSTATS) \
- || (defined(MYMALLOC) && !defined(PLAIN_MALLOC))
+#if (defined(PERL_DEBUGGING_MSTATS) || defined(DEBUGGING_MSTATS)) \
+ && (defined(MYMALLOC) && !defined(PLAIN_MALLOC))
# define mstat(str) dump_mstats(str)
#else
# define mstat(str) \
PerlIO_printf(Perl_debug_log, "%s: perl not compiled with DEBUGGING_MSTATS\n",str);
#endif
-#if defined(PERL_DEBUGGING_MSTATS) || defined(DEBUGGING_MSTATS) \
- || (defined(MYMALLOC) && !defined(PLAIN_MALLOC))
+#if (defined(PERL_DEBUGGING_MSTATS) || defined(DEBUGGING_MSTATS)) \
+ && (defined(MYMALLOC) && !defined(PLAIN_MALLOC))
/* Very coarse overestimate, 2-per-power-of-2, one more to determine NBUCKETS. */
# define _NBUCKETS (2*8*IVSIZE+1)
SV *
_CvGV(cv)
SV *cv
+
+bool
+_runops_debug(int flag = -1)