#include "perl.h"
#include "XSUB.h"
-bool
+static bool
_runops_debug(int flag)
{
dTHX;
- bool d = PL_runops == MEMBER_TO_FPTR(Perl_runops_debug);
+ const bool d = PL_runops == MEMBER_TO_FPTR(Perl_runops_debug);
if (flag >= 0)
PL_runops
return d;
}
-SV *
+static SV *
DeadCode(pTHX)
{
#ifdef PURIFY
int levels, tots = 0, levela, tota = 0, levelas, totas = 0;
int dumpit = 0;
- if (CvXSUB(sv)) {
+ if (CvISXSUB(sv)) {
continue; /* XSUB */
}
if (!CvGV(sv)) {
UV buf[_NBUCKETS*4];
};
-void
+static void
_fill_mstats(struct mstats_buffer *b, int level)
{
dTHX;
get_mstats(&(b->buffer), _NBUCKETS, level);
}
-void
+static void
fill_mstats(SV *sv, int level)
{
dTHX;
SvPOK_only(sv);
}
-void
-_mstats_to_hv(HV *hv, struct mstats_buffer *b, int level)
+static void
+_mstats_to_hv(HV *hv, const struct mstats_buffer *b, int level)
{
dTHX;
SV **svp;
}
}
}
-void
+
+static void
mstats_fillhash(SV *sv, int level)
{
struct mstats_buffer buf;
_fill_mstats(&buf, level);
_mstats_to_hv((HV *)SvRV(sv), &buf, level);
}
-void
+
+static void
mstats2hash(SV *sv, SV *rv, int level)
{
if (!(SvROK(rv) && SvTYPE(SvRV(rv)) == SVt_PVHV))
_mstats_to_hv((HV *)SvRV(rv), (struct mstats_buffer*)SvPVX(sv), level);
}
#else /* !( defined(PERL_DEBUGGING_MSTATS) || defined(DEBUGGING_MSTATS) \ ) */
-void
+static void
fill_mstats(SV *sv, int level)
{
croak("Cannot report mstats without Perl malloc");
}
-void
+
+static void
mstats_fillhash(SV *sv, int level)
{
croak("Cannot report mstats without Perl malloc");
}
-void
+
+static void
mstats2hash(SV *sv, SV *rv, int level)
{
croak("Cannot report mstats without Perl malloc");
PPCODE:
{
SV *pv_lim_sv = perl_get_sv("Devel::Peek::pv_limit", FALSE);
- STRLEN pv_lim = pv_lim_sv ? SvIV(pv_lim_sv) : 0;
+ const STRLEN pv_lim = pv_lim_sv ? SvIV(pv_lim_sv) : 0;
SV *dumpop = perl_get_sv("Devel::Peek::dump_ops", FALSE);
- I32 save_dumpindent = PL_dumpindent;
+ const I32 save_dumpindent = PL_dumpindent;
PL_dumpindent = 2;
do_sv_dump(0, Perl_debug_log, sv, 0, lim,
(bool)(dumpop && SvTRUE(dumpop)), pv_lim);
{
long i;
SV *pv_lim_sv = perl_get_sv("Devel::Peek::pv_limit", FALSE);
- STRLEN pv_lim = pv_lim_sv ? SvIV(pv_lim_sv) : 0;
+ const STRLEN pv_lim = pv_lim_sv ? SvIV(pv_lim_sv) : 0;
SV *dumpop = perl_get_sv("Devel::Peek::dump_ops", FALSE);
- I32 save_dumpindent = PL_dumpindent;
+ const I32 save_dumpindent = PL_dumpindent;
PL_dumpindent = 2;
for (i=1; i<items; i++) {