vdeb(pat, &args);
va_end(args);
#else
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(pat);
#endif /* DEBUGGING */
}
(long)CopLINE(PL_curcop));
(void) PerlIO_vprintf(Perl_debug_log, pat, *args);
#else
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(pat);
PERL_UNUSED_ARG(args);
#endif /* DEBUGGING */
while (1);
PerlIO_printf(Perl_debug_log, "\n");
#else
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(stack_base);
PERL_UNUSED_ARG(stack_min);
PERL_UNUSED_ARG(stack_max);
} /* next stackinfo */
PerlIO_printf(Perl_debug_log, "\n");
+#else
+ PERL_UNUSED_CONTEXT;
#endif /* DEBUGGING */
}
#undef PERLVARISC
#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(aTHX->v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(aTHX->v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
#define PERLVARI(v,t,i) PERLVAR(v,t)
#define PERLVARIC(v,t,i) PERLVAR(v, const t)
#define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(aTHX->v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
#include "thrdvar.h"
#include "intrpvar.h"
#undef PERLVAR
#undef PERLVARA
#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(PL_##v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(PL_##v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
#undef PERLVARIC
#undef PERLVARISC
#define PERLVARIC(v,t,i) \
const t* Perl_##v##_ptr(pTHX) \
- { return (const t *)&(PL_##v); }
+ { PERL_UNUSED_CONTEXT; return (const t *)&(PL_##v); }
#define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(PL_##v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
#include "perlvars.h"
#undef PERLVAR
#undef PL_check
#undef PL_fold_locale
Perl_ppaddr_t** Perl_Gppaddr_ptr(pTHX) {
- static const Perl_ppaddr_t* ppaddr_ptr = PL_ppaddr;
+ static const Perl_ppaddr_t* const ppaddr_ptr = PL_ppaddr;
+ PERL_UNUSED_CONTEXT;
return (Perl_ppaddr_t**)&ppaddr_ptr;
}
Perl_check_t** Perl_Gcheck_ptr(pTHX) {
- static const Perl_check_t* check_ptr = PL_check;
+ static const Perl_check_t* const check_ptr = PL_check;
+ PERL_UNUSED_CONTEXT;
return (Perl_check_t**)&check_ptr;
}
unsigned char** Perl_Gfold_locale_ptr(pTHX) {
- static const unsigned char* fold_locale_ptr = PL_fold_locale;
+ static const unsigned char* const fold_locale_ptr = PL_fold_locale;
+ PERL_UNUSED_CONTEXT;
return (unsigned char**)&fold_locale_ptr;
}
#endif
AV **
Perl_hv_backreferences_p(pTHX_ HV *hv) {
struct xpvhv_aux * const iter = SvOOK(hv) ? HvAUX(hv) : hv_auxinit(hv);
+ PERL_UNUSED_CONTEXT;
return &(iter->xhv_backreferences);
}
#endif /* USE_LOCALE_CTYPE */
PERL_UNUSED_ARG(newctype);
+ PERL_UNUSED_CONTEXT;
}
/*
void
Perl_sv_nolocking(pTHX_ SV *sv)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(sv);
}
void
Perl_sv_nounlocking(pTHX_ SV *sv)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(sv);
}
Perl_mg_magical(pTHX_ SV *sv)
{
const MAGIC* mg;
+ PERL_UNUSED_CONTEXT;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
const MGVTBL* const vtbl = mg->mg_virtual;
if (vtbl) {
MAGIC*
Perl_mg_find(pTHX_ const SV *sv, int type)
{
+ PERL_UNUSED_CONTEXT;
if (sv) {
MAGIC *mg;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
int
Perl_magic_setmglob(pTHX_ SV *sv, MAGIC *mg)
{
+ PERL_UNUSED_CONTEXT;
mg->mg_len = -1;
SvSCREAM_off(sv);
return 0;
* RenE<eacute> Descartes said "I think not."
* and vanished with a faint plop.
*/
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(sv);
if (mg->mg_ptr) {
Safefree(mg->mg_ptr);
int
Perl_magic_setutf8(pTHX_ SV *sv, MAGIC *mg)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(sv);
Safefree(mg->mg_ptr); /* The mg_ptr holds the pos cache. */
mg->mg_ptr = 0;
Perl_whichsig(pTHX_ const char *sig)
{
register char* const* sigv;
+ PERL_UNUSED_CONTEXT;
for (sigv = (char* const*)PL_sig_name; *sigv; sigv++)
if (strEQ(sig,*sigv))
static void
xs_init(pTHX)
{
+ PERL_UNUSED_CONTEXT;
dXSUB_SYS;
}
U32
Perl_cast_ulong(pTHX_ NV f)
{
+ PERL_UNUSED_CONTEXT;
if (f < 0.0)
return f < I32_MIN ? (U32) I32_MIN : (U32)(I32) f;
if (f < U32_MAX_P1) {
I32
Perl_cast_i32(pTHX_ NV f)
{
+ PERL_UNUSED_CONTEXT;
if (f < I32_MAX_P1)
return f < I32_MIN ? I32_MIN : (I32) f;
if (f < U32_MAX_P1) {
IV
Perl_cast_iv(pTHX_ NV f)
{
+ PERL_UNUSED_CONTEXT;
if (f < IV_MAX_P1)
return f < IV_MIN ? IV_MIN : (IV) f;
if (f < UV_MAX_P1) {
UV
Perl_cast_uv(pTHX_ NV f)
{
+ PERL_UNUSED_CONTEXT;
if (f < 0.0)
return f < IV_MIN ? (UV) IV_MIN : (UV)(IV) f;
if (f < UV_MAX_P1) {
Perl_op_refcnt_lock(pTHX)
{
dVAR;
+ PERL_UNUSED_CONTEXT;
OP_REFCNT_LOCK;
}
Perl_op_refcnt_unlock(pTHX)
{
dVAR;
+ PERL_UNUSED_CONTEXT;
OP_REFCNT_UNLOCK;
}
OP *
Perl_sawparens(pTHX_ OP *o)
{
+ PERL_UNUSED_CONTEXT;
if (o)
o->op_flags |= OPf_PARENS;
return o;
CvCONST_off(cv);
}
if (CvISXSUB(cv) && CvXSUB(cv)) {
- CvXSUB(cv) = 0;
+ CvXSUB(cv) = NULL;
}
/* delete all flags except WEAKOUTSIDE */
CvFLAGS(cv) &= CVf_WEAKOUTSIDE;
SV *
Perl_cv_const_sv(pTHX_ CV *cv)
{
+ PERL_UNUSED_CONTEXT;
if (!cv)
return NULL;
if (!(SvTYPE(cv) == SVt_PVCV || SvTYPE(cv) == SVt_PVFM))
Perl_ck_concat(pTHX_ OP *o)
{
const OP * const kid = cUNOPo->op_first;
+ PERL_UNUSED_CONTEXT;
if (kid->op_type == OP_CONCAT && !(kid->op_private & OPpTARGET_MY) &&
!(kUNOP->op_first->op_flags & OPf_MOD))
o->op_flags |= OPf_STACKED;
OP *
Perl_ck_null(pTHX_ OP *o)
{
+ PERL_UNUSED_CONTEXT;
return o;
}
OP *
Perl_ck_svconst(pTHX_ OP *o)
{
+ PERL_UNUSED_CONTEXT;
SvREADONLY_on(cSVOPo->op_sv);
return o;
}
perl_construct(pTHXx)
{
dVAR;
- PERL_UNUSED_ARG(my_perl);
+ PERL_UNUSED_CONTEXT;
#ifdef MULTIPLICITY
init_interp();
PL_perl_destruct_level = 1;
int
Perl_nothreadhook(pTHX)
{
+ PERL_UNUSED_CONTEXT;
return 0;
}
pid_t child;
#endif
- PERL_UNUSED_ARG(my_perl);
+ PERL_UNUSED_CONTEXT;
/* wait for all pseudo-forked children to finish */
PERL_WAIT_FOR_CHILDREN;
int ret = 0;
dJMPENV;
- PERL_UNUSED_ARG(my_perl);
+ PERL_UNUSED_CONTEXT;
oldscope = PL_scopestack_ix;
#ifdef VMS
# endif
#endif
-#define pVAR register struct perl_vars* my_vars PERL_UNUSED_DECL
+#define pVAR register struct perl_vars* const my_vars PERL_UNUSED_DECL
#ifdef PERL_GLOBAL_STRUCT
# define dVAR pVAR = (struct perl_vars*)PERL_GET_VARS()
# define PERL_UNUSED_VAR(x) ((void)x)
#endif
+#ifdef USE_ITHREADS
+# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
+#else
+# define PERL_UNUSED_CONTEXT
+#endif
+
#define NOOP (void)0
#define dNOOP extern int Perl___notused PERL_UNUSED_DECL
#undef PERLVARISC
#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(aTHX->v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(aTHX->v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
#define PERLVARI(v,t,i) PERLVAR(v,t)
#define PERLVARIC(v,t,i) PERLVAR(v, const t)
#define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(aTHX->v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
#include "thrdvar.h"
#include "intrpvar.h"
#undef PERLVAR
#undef PERLVARA
#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(PL_##v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(PL_##v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
#undef PERLVARIC
#undef PERLVARISC
#define PERLVARIC(v,t,i) \
const t* Perl_##v##_ptr(pTHX) \
- { return (const t *)&(PL_##v); }
+ { PERL_UNUSED_CONTEXT; return (const t *)&(PL_##v); }
#define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \
- { dVAR; return &(PL_##v); }
+ { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
#include "perlvars.h"
#undef PERLVAR
#undef PL_check
#undef PL_fold_locale
Perl_ppaddr_t** Perl_Gppaddr_ptr(pTHX) {
- static const Perl_ppaddr_t* ppaddr_ptr = PL_ppaddr;
+ static const Perl_ppaddr_t* const ppaddr_ptr = PL_ppaddr;
+ PERL_UNUSED_CONTEXT;
return (Perl_ppaddr_t**)&ppaddr_ptr;
}
Perl_check_t** Perl_Gcheck_ptr(pTHX) {
- static const Perl_check_t* check_ptr = PL_check;
+ static const Perl_check_t* const check_ptr = PL_check;
+ PERL_UNUSED_CONTEXT;
return (Perl_check_t**)&check_ptr;
}
unsigned char** Perl_Gfold_locale_ptr(pTHX) {
- static const unsigned char* fold_locale_ptr = PL_fold_locale;
+ static const unsigned char* const fold_locale_ptr = PL_fold_locale;
+ PERL_UNUSED_CONTEXT;
return (unsigned char**)&fold_locale_ptr;
}
#endif
void
PerlIO_init(pTHX)
{
+ PERL_UNUSED_CONTEXT;
/*
* Does nothing (yet) except force this file to be included in perl
* binary. That allows this file to force inclusion of other functions
void
PerlIO_init(pTHX)
{
+ PERL_UNUSED_CONTEXT;
/*
* Force this file to be included in perl binary. Which allows this
* file to force inclusion of other functions that may be required by
PerlIO_list_alloc(pTHX)
{
PerlIO_list_t *list;
+ PERL_UNUSED_CONTEXT;
Newxz(list, 1, PerlIO_list_t);
list->refcnt = 1;
return list;
IV
PerlIOUtf8_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(mode);
PERL_UNUSED_ARG(arg);
if (PerlIOValid(f)) {
PerlIOBase_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab)
{
PerlIOl * const l = PerlIOBase(f);
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(arg);
l->flags &= ~(PERLIO_F_CANREAD | PERLIO_F_CANWRITE |
IV
PerlIOBase_popped(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(f);
return 0;
}
IV
PerlIOBase_noop_ok(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(f);
return 0;
}
IV
PerlIOBase_noop_fail(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(f);
return -1;
}
IV
PerlIOBase_eof(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
if (PerlIOValid(f)) {
return (PerlIOBase(f)->flags & PERLIO_F_EOF) != 0;
}
IV
PerlIOBase_error(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
if (PerlIOValid(f)) {
return (PerlIOBase(f)->flags & PERLIO_F_ERROR) != 0;
}
void
PerlIOBase_setlinebuf(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
if (PerlIOValid(f)) {
PerlIOBase(f)->flags |= PERLIO_F_LINEBUF;
}
/* Place holder for stdstreams call ??? */
#ifdef USE_THREADS
MUTEX_INIT(&PerlIO_mutex);
+#else
+ PERL_UNUSED_CONTEXT;
#endif
}
IV
PerlIOUnix_fileno(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
return PerlIOSelf(f, PerlIOUnix)->fd;
}
s->fd = fd;
s->oflags = imode;
PerlIOUnix_refcnt_inc(fd);
+ PERL_UNUSED_CONTEXT;
}
IV
{
const int fd = PerlIOSelf(f, PerlIOUnix)->fd;
Off_t new_loc;
+ PERL_UNUSED_CONTEXT;
if (PerlIOBase(f)->flags & PERLIO_F_NOTREG) {
#ifdef ESPIPE
SETERRNO(ESPIPE, LIB_INVARG);
Off_t
PerlIOUnix_tell(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
+
return PerlLIO_lseek(PerlIOSelf(f, PerlIOUnix)->fd, 0, SEEK_CUR);
}
IV
PerlIOStdio_fileno(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
+
if (PerlIOValid(f)) {
FILE * const s = PerlIOSelf(f, PerlIOStdio)->stdio;
if (s)
static int
PerlIOStdio_invalidate_fileno(pTHX_ FILE *f)
{
+ PERL_UNUSED_CONTEXT;
+
/* XXX this could use PerlIO_canset_fileno() and
* PerlIO_set_fileno() support from Configure
*/
PerlIOStdio_seek(pTHX_ PerlIO *f, Off_t offset, int whence)
{
FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio;
+ PERL_UNUSED_CONTEXT;
+
return PerlSIO_fseek(stdio, offset, whence);
}
PerlIOStdio_tell(pTHX_ PerlIO *f)
{
FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio;
+ PERL_UNUSED_CONTEXT;
+
return PerlSIO_ftell(stdio);
}
PerlIOStdio_flush(pTHX_ PerlIO *f)
{
FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio;
+ PERL_UNUSED_CONTEXT;
+
if (PerlIOBase(f)->flags & PERLIO_F_CANWRITE) {
return PerlSIO_fflush(stdio);
}
IV
PerlIOStdio_eof(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
+
return PerlSIO_feof(PerlIOSelf(f, PerlIOStdio)->stdio);
}
IV
PerlIOStdio_error(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
+
return PerlSIO_ferror(PerlIOSelf(f, PerlIOStdio)->stdio);
}
void
PerlIOStdio_clearerr(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
+
PerlSIO_clearerr(PerlIOSelf(f, PerlIOStdio)->stdio);
}
void
PerlIOStdio_setlinebuf(pTHX_ PerlIO *f)
{
+ PERL_UNUSED_CONTEXT;
+
#ifdef HAS_SETLINEBUF
PerlSIO_setlinebuf(PerlIOSelf(f, PerlIOStdio)->stdio);
#else
{
FILE * const stdio = PerlIOSelf(f, PerlIOStdio)->stdio;
int c;
+ PERL_UNUSED_CONTEXT;
+
/*
* fflush()ing read-only streams can cause trouble on some stdio-s
*/
PerlIOBuf_get_base(pTHX_ PerlIO *f)
{
PerlIOBuf * const b = PerlIOSelf(f, PerlIOBuf);
+ PERL_UNUSED_CONTEXT;
+
if (!b->buf) {
if (!b->bufsiz)
b->bufsiz = 4096;
{
UV *p = (UV*)*rsp;
U32 i;
+ PERL_UNUSED_CONTEXT;
if (!p || p[1] < rx->nparens) {
#ifdef PERL_OLD_COPY_ON_WRITE
{
UV *p = (UV*)*rsp;
U32 i;
+ PERL_UNUSED_CONTEXT;
RX_MATCH_COPY_FREE(rx);
RX_MATCH_COPIED_set(rx, *p);
Perl_rxres_free(pTHX_ void **rsp)
{
UV * const p = (UV*)*rsp;
+ PERL_UNUSED_CONTEXT;
if (p) {
#ifdef PERL_POISON
I32 gimme;
SV **newsp;
PMOP *newpm;
- SV **mark;
+ PERL_UNUSED_CONTEXT;
POPBLOCK(cx,newpm);
assert(CxTYPE(cx) == CXt_GIVEN);
- mark = newsp;
SP = newsp;
PUTBACK;
});
}
#else
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(r);
#endif /* DEBUGGING */
}
else if (k == BRANCHJ && (OP(o) == UNLESSM || OP(o) == IFMATCH))
Perl_sv_catpvf(aTHX_ sv, "[-%d]", o->flags);
#else
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(sv);
PERL_UNUSED_ARG(o);
#endif /* DEBUGGING */
{ /* Assume that RE_INTUIT is set */
dVAR;
GET_RE_DEBUG_FLAGS_DECL;
+ PERL_UNUSED_CONTEXT;
+
DEBUG_COMPILE_r(
{
const char * const s = SvPV_nolen_const(prog->check_substr
break;
}
#else
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(cx);
#endif /* DEBUGGING */
}
{
#ifdef DEBUGGING
visit(do_report_used, 0, 0);
+#else
+ PERL_UNUSED_CONTEXT;
#endif
}
struct arena_set *next, *aroot = (struct arena_set*) PL_body_arenas;
for (; aroot; aroot = next) {
- int max = aroot->curr;
+ const int max = aroot->curr;
for (i=0; i<max; i++) {
assert(aroot->set[i].arena);
Safefree(aroot->set[i].arena);
{
dVAR;
void ** const root = &PL_body_roots[sv_type];
- const struct body_details *bdp = &bodies_by_type[sv_type];
+ const struct body_details * const bdp = &bodies_by_type[sv_type];
const size_t body_size = bdp->body_size;
char *start;
const char *end;
int
Perl_sv_backoff(pTHX_ register SV *sv)
{
+ PERL_UNUSED_CONTEXT;
assert(SvOOK(sv));
assert(SvTYPE(sv) != SVt_PVHV);
assert(SvTYPE(sv) != SVt_PVAV);
SV *
Perl_sv_newref(pTHX_ SV *sv)
{
+ PERL_UNUSED_CONTEXT;
if (sv)
(SvREFCNT(sv))++;
return sv;
DIR *
Perl_dirp_dup(pTHX_ DIR *dp)
{
+ PERL_UNUSED_CONTEXT;
if (!dp)
return (DIR*)NULL;
/* XXX TODO */
Perl_ptr_table_new(pTHX)
{
PTR_TBL_t *tbl;
+ PERL_UNUSED_CONTEXT;
+
Newxz(tbl, 1, PTR_TBL_t);
tbl->tbl_max = 511;
tbl->tbl_items = 0;
Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, const void *sv)
{
PTR_TBL_ENT_t const *const tblent = ptr_table_find(tbl, sv);
+ PERL_UNUSED_CONTEXT;
return tblent ? tblent->newval : (void *) 0;
}
Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, const void *oldsv, void *newsv)
{
PTR_TBL_ENT_t *tblent = S_ptr_table_find(tbl, oldsv);
+ PERL_UNUSED_CONTEXT;
if (tblent) {
tblent->newval = newsv;
const UV oldsize = tbl->tbl_max + 1;
UV newsize = oldsize * 2;
UV i;
+ PERL_UNUSED_CONTEXT;
Renew(ary, newsize, PTR_TBL_ENT_t*);
Zero(&ary[oldsize], newsize-oldsize, PTR_TBL_ENT_t*);
if (SvTYPE(sv) == SVt_PVIV) {
/* Overloaded constants, nothing fancy: Convert to SVt_PV: */
STRLEN len;
- const char *p = SvPV_const(sv, len);
+ const char * const p = SvPV_const(sv, len);
SV * const nsv = newSVpvn(p, len);
if (SvUTF8(sv))
SvUTF8_on(nsv);
void
Perl_pmflag(pTHX_ U32* pmfl, int ch)
{
+ PERL_UNUSED_CONTEXT;
if (ch == 'i')
*pmfl |= PMf_FOLD;
else if (ch == 'g')
PL_cshlen = strlen(PL_cshname);
#else
#if defined(USE_ITHREADS)
- PERL_UNUSED_ARG(my_perl);
+ PERL_UNUSED_CONTEXT;
#endif
#endif
}
XS(XS_Regexp_DESTROY)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(cv);
}
Perl_is_utf8_char(pTHX_ const U8 *s)
{
const STRLEN len = UTF8SKIP(s);
+ PERL_UNUSED_CONTEXT;
#ifdef IS_UTF8_CHAR
if (IS_UTF8_CHAR_FAST(len))
return IS_UTF8_CHAR(s, len) ? len : 0;
const U8* x = s;
const U8* send;
+ PERL_UNUSED_CONTEXT;
if (!len)
len = strlen((const char *)s);
send = s + len;
const U8* x = s;
const U8* send;
STRLEN c;
+ PERL_UNUSED_CONTEXT;
if (!len)
len = strlen((const char *)s);
U8 *
Perl_utf8_hop(pTHX_ const U8 *s, I32 off)
{
+ PERL_UNUSED_CONTEXT;
/* Note: cannot use UTF8_IS_...() too eagerly here since e.g
* the bitops (especially ~) can create illegal UTF-8.
* In other words: in Perl UTF-8 is not just for Unicode. */
const U8 *send;
I32 count = 0;
+ PERL_UNUSED_CONTEXT;
if (!*is_utf8)
return (U8 *)start;
const U8 * const send = s + (*len);
U8 *d;
U8 *dst;
+ PERL_UNUSED_CONTEXT;
Newx(d, (*len) * 2 + 1, U8);
dst = d;
Perl_delimcpy(pTHX_ register char *to, register const char *toend, register const char *from, register const char *fromend, register int delim, I32 *retlen)
{
register I32 tolen;
+ PERL_UNUSED_CONTEXT;
for (tolen = 0; from < fromend; from++, tolen++) {
if (*from == '\\') {
if (from[1] == delim)
Perl_instr(pTHX_ register const char *big, register const char *little)
{
register I32 first;
+ PERL_UNUSED_CONTEXT;
if (!little)
return (char*)big;
char *
Perl_ninstr(pTHX_ const char *big, const char *bigend, const char *little, const char *lend)
{
+ PERL_UNUSED_CONTEXT;
if (little >= lend)
return (char*)big;
{
register const char *bigbeg;
register const I32 first = *little;
register const char * const littleend = lend;
+ PERL_UNUSED_CONTEXT;
if (little >= littleend)
return (char*)bigend;
{
register const U8 *a = (const U8 *)s1;
register const U8 *b = (const U8 *)s2;
+ PERL_UNUSED_CONTEXT;
+
while (len--) {
if (*a != *b && *a != PL_fold[*b])
return 1;
dVAR;
register const U8 *a = (const U8 *)s1;
register const U8 *b = (const U8 *)s2;
+ PERL_UNUSED_CONTEXT;
+
while (len--) {
if (*a != *b && *a != PL_fold_locale[*b])
return 1;
char *
Perl_savepv(pTHX_ const char *pv)
{
+ PERL_UNUSED_CONTEXT;
if (!pv)
return NULL;
else {
Newx(newaddr,pvlen,char);
return memcpy(newaddr,pv,pvlen);
}
-
}
/* same thing but with a known length */
Perl_savepvn(pTHX_ const char *pv, register I32 len)
{
register char *newaddr;
+ PERL_UNUSED_CONTEXT;
Newx(newaddr,len+1,char);
/* Give a meaning to NULL pointer mainly for the use in sv_magic() */
{
register I32 i;
register const I32 len = strlen(nam);
+ PERL_UNUSED_CONTEXT;
for (i = 0; environ[i]; i++) {
if (
Perl_rsignal_state(pTHX_ int signo)
{
struct sigaction oact;
+ PERL_UNUSED_CONTEXT;
if (sigaction(signo, (struct sigaction *)NULL, &oact) == -1)
return (Sighandler_t) SIG_ERR;
{
register I32 todo;
register const char * const frombase = from;
+ PERL_UNUSED_CONTEXT;
if (len == 1) {
register const char c = *from;
char **
Perl_get_op_names(pTHX)
{
- return (char **)PL_op_name;
+ PERL_UNUSED_CONTEXT;
+ return (char **)PL_op_name;
}
char **
Perl_get_op_descs(pTHX)
{
- return (char **)PL_op_desc;
+ PERL_UNUSED_CONTEXT;
+ return (char **)PL_op_desc;
}
const char *
Perl_get_no_modify(pTHX)
{
- return PL_no_modify;
+ PERL_UNUSED_CONTEXT;
+ return PL_no_modify;
}
U32 *
Perl_get_opargs(pTHX)
{
- return (U32 *)PL_opargs;
+ PERL_UNUSED_CONTEXT;
+ return (U32 *)PL_opargs;
}
PPADDR_t*
Perl_get_ppaddr(pTHX)
{
- dVAR;
- return (PPADDR_t*)PL_ppaddr;
+ dVAR;
+ PERL_UNUSED_CONTEXT;
+ return (PPADDR_t*)PL_ppaddr;
}
#ifndef HAS_GETENV_LEN
Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len)
{
char * const env_trans = PerlEnv_getenv(env_elem);
+ PERL_UNUSED_CONTEXT;
if (env_trans)
*len = strlen(env_trans);
return env_trans;
Perl_get_vtbl(pTHX_ int vtbl_id)
{
const MGVTBL* result;
+ PERL_UNUSED_CONTEXT;
switch(vtbl_id) {
case want_vtbl_sv:
int secs;
int month, mday, year, jday;
int odd_cent, odd_year;
+ PERL_UNUSED_CONTEXT;
#define DAYS_PER_YEAR 365
#define DAYS_PER_QYEAR (4*DAYS_PER_YEAR+1)
void
Perl_sv_nosharing(pTHX_ SV *sv)
{
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(sv);
}
{
const char * const stashpv = CopSTASHPV(c);
const char * const name = HvNAME_get(hv);
+ PERL_UNUSED_CONTEXT;
if (stashpv == name)
return TRUE;