_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
}
void
-_mstats_to_hv(HV *hv, struct mstats_buffer *b, int level)
+_mstats_to_hv(HV *hv, const struct mstats_buffer *b, int level)
{
dTHX;
SV **svp;
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++) {
#define gv_stashpvn(str,len,flags) gv_stashpv(str,flags)
#endif
+static int not_here(const char *s) __attribute__noreturn__;
static int
-not_here(char *s)
+not_here(const char *s)
{
croak("%s not implemented on this architecture", s);
- return -1;
+ NORETURN_FUNCTION_END
}
}
#endif
if (newmode != mode) {
- int ret;
- ret = fcntl(PerlIO_fileno(f),F_SETFL,newmode);
+ const int ret = fcntl(PerlIO_fileno(f),F_SETFL,newmode);
if (ret < 0)
RETVAL = ret;
}
void
new_tmpfile(packname = "IO::File")
- char * packname
+ const char * packname
PREINIT:
OutputStream fp;
GV *gv;
PPCODE:
{
#ifdef HAS_POLL
- int nfd = (items - 1) / 2;
+ const int nfd = (items - 1) / 2;
SV *tmpsv = NEWSV(999,nfd * sizeof(struct pollfd));
struct pollfd *fds = (struct pollfd *)SvPVX(tmpsv);
int i,j,ret;
PROTOTYPE: $;$
CODE:
{
- int ret = io_blocking(aTHX_ handle, items == 1 ? -1 : blk ? 1 : 0);
+ const int ret = io_blocking(aTHX_ handle, items == 1 ? -1 : blk ? 1 : 0);
if(ret >= 0)
XSRETURN_IV(ret);
else