/* Collect default raw/crlf info from the op */
if (PL_op && PL_op->op_type == OP_OPEN) {
/* set up IO layers */
- U8 flags = PL_op->op_private;
+ const U8 flags = PL_op->op_private;
in_raw = (flags & OPpOPEN_IN_RAW);
in_crlf = (flags & OPpOPEN_IN_CRLF);
out_raw = (flags & OPpOPEN_OUT_RAW);
{
SV *astr;
char *a;
- I32 infosize, getinfo;
+ STRLEN infosize;
+ I32 getinfo;
I32 ret = -1;
const I32 id = SvIVx(*++mark);
const I32 n = (optype == OP_SEMCTL) ? SvIVx(*++mark) : 0;
void
Perl_dump_sub(pTHX_ const GV *gv)
{
- SV *sv = sv_newmortal();
+ SV * const sv = sv_newmortal();
gv_fullname3(sv, gv, Nullch);
Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %s = ", SvPVX_const(sv));
void
Perl_dump_form(pTHX_ const GV *gv)
{
- SV *sv = sv_newmortal();
+ SV * const sv = sv_newmortal();
gv_fullname3(sv, gv, Nullch);
Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nFORMAT %s = ", SvPVX_const(sv));
CV *cv = deb_curcv(cxstack_ix);
SV *sv;
if (cv) {
- AV *padlist = CvPADLIST(cv);
- AV *comppad = (AV*)(*av_fetch(padlist, 0, FALSE));
+ AV * const padlist = CvPADLIST(cv);
+ AV * const comppad = (AV*)(*av_fetch(padlist, 0, FALSE));
sv = *av_fetch(comppad, o->op_targ, FALSE);
} else
sv = Nullsv;
: b binary backward compatibility; function is a macro
: but has also Perl_ implementation (which is exported)
: U suppress usage example in autogenerated documentation
-: a allocates memory a la malloc/calloc
-: R Return value must not be ignored. All "a" functions
-: get this automatically.
+: a allocates memory a la malloc/calloc. Is also "R".
+: R Return value must not be ignored.
: P pure function: no effects except the return value;
: return value depends only on parms and/or globals
:
Aanop |Malloc_t|realloc |Malloc_t where|MEM_SIZE nbytes
Anop |Free_t |mfree |Malloc_t where
#if defined(MYMALLOC)
-np |MEM_SIZE|malloced_size |void *p
+npR |MEM_SIZE|malloced_size |void *p
#endif
Anp |void* |get_context
Ap |void |init_stacks
Ap |void |init_tm |struct tm *ptm
pd |U32 |intro_my
-ApP |char* |instr |NN const char* big|NN const char* little
-p |bool |io_close |IO* io|bool not_implicit
-p |OP* |invert |OP* cmd
+ApPR |char* |instr |NN const char* big|NN const char* little
+pR |bool |io_close |NN IO* io|bool not_implicit
+pR |OP* |invert |OP* cmd
dpR |bool |is_gv_magical |const char *name|STRLEN len|U32 flags
ApR |I32 |is_lvalue_sub
ApPR |U32 |to_uni_upper_lc|U32 c
ApdR |SV* |sv_newmortal
Apd |SV* |sv_newref |SV* sv
Ap |char* |sv_peek |SV* sv
-Apd |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp
-Apd |void |sv_pos_b2u |SV* sv|I32* offsetp
+Apd |void |sv_pos_u2b |SV* sv|NN I32* offsetp|I32* lenp
+Apd |void |sv_pos_b2u |SV* sv|NN I32* offsetp
Amdb |char* |sv_pvn_force |SV* sv|STRLEN* lp
Apd |char* |sv_pvutf8n_force|SV* sv|STRLEN* lp
Apd |char* |sv_pvbyten_force|SV* sv|STRLEN* lp
s |void |del_he |NN HE *p
sR |HEK* |save_hek_flags |NN const char *str|I32 len|U32 hash|int flags
s |void |hv_magic_check |NN HV *hv|NN bool *needs_copy|NN bool *needs_store
-s |void |unshare_hek_or_pvn|HEK* hek|NN const char* sv|I32 len|U32 hash
+s |void |unshare_hek_or_pvn|HEK* hek|const char* str|I32 len|U32 hash
sR |HE* |share_hek_flags|const char* sv|I32 len|U32 hash|int flags
rs |void |hv_notallowed |int flags|NN const char *key|I32 klen|NN const char *msg
+asR |struct xpvhv_aux*|hv_auxinit|HV *hv
#endif
#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
#endif
#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
-s |OP* |doform |CV *cv|GV *gv|OP *retop
-s |int |emulate_eaccess|const char* path|Mode_t mode
+s |OP* |doform |NN CV *cv|NN GV *gv|NN OP *retop
+sr |int |emulate_eaccess|NN const char* path|Mode_t mode
# if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
-s |int |dooneliner |char *cmd|char *filename
+sR |int |dooneliner |NN const char *cmd|NN const char *filename
# endif
#endif
sM |HE* |hv_fetch_common|HV* tb|SV* key_sv|const char* key|STRLEN klen|int flags|int action|SV* val|U32 hash
#endif
-Apd |void |hv_clear_placeholders|HV* hb
-
-Apd |SV* |hv_scalar |HV* hv|
-Apo |I32* |hv_riter_p |HV* hv
-Apo |HE** |hv_eiter_p |HV* hv
-Apo |void |hv_riter_set |HV* hv|I32 riter
-Apo |void |hv_eiter_set |HV* hv|HE* eiter
-Apo |void |hv_name_set |HV* hv|const char *|I32 len|int flags
-Apo |I32* |hv_placeholders_p |HV* hv
-Apo |I32 |hv_placeholders_get |HV* hv
-Apo |void |hv_placeholders_set |HV* hv|I32 ph
+ApdR |SV* |hv_scalar |NN HV* hv
+ApoR |I32* |hv_riter_p |NN HV* hv
+ApoR |HE** |hv_eiter_p |NN HV* hv
+Apo |void |hv_riter_set |NN HV* hv|I32 riter
+Apo |void |hv_eiter_set |NN HV* hv|NN HE* eiter
+Apo |void |hv_name_set |NN HV* hv|const char *name|I32 len|int flags
+Apd |void |hv_clear_placeholders |NN HV* hb
+ApoR |I32* |hv_placeholders_p |NN HV* hv
+ApoR |I32 |hv_placeholders_get |NN HV* hv
+ApoR |void |hv_placeholders_set |NN HV* hv|I32 ph
p |SV* |magic_scalarpack|HV* hv|MAGIC* mg
#ifdef PERL_IN_SV_C
#define unshare_hek_or_pvn S_unshare_hek_or_pvn
#define share_hek_flags S_share_hek_flags
#define hv_notallowed S_hv_notallowed
+#define hv_auxinit S_hv_auxinit
#endif
#endif
#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
#define hv_fetch_common S_hv_fetch_common
#endif
#endif
-#define hv_clear_placeholders Perl_hv_clear_placeholders
#define hv_scalar Perl_hv_scalar
+#define hv_clear_placeholders Perl_hv_clear_placeholders
#ifdef PERL_CORE
#define magic_scalarpack Perl_magic_scalarpack
#endif
#define unshare_hek_or_pvn(a,b,c,d) S_unshare_hek_or_pvn(aTHX_ a,b,c,d)
#define share_hek_flags(a,b,c,d) S_share_hek_flags(aTHX_ a,b,c,d)
#define hv_notallowed(a,b,c,d) S_hv_notallowed(aTHX_ a,b,c,d)
+#define hv_auxinit(a) S_hv_auxinit(aTHX_ a)
#endif
#endif
#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
#define hv_fetch_common(a,b,c,d,e,f,g,h) S_hv_fetch_common(aTHX_ a,b,c,d,e,f,g,h)
#endif
#endif
-#define hv_clear_placeholders(a) Perl_hv_clear_placeholders(aTHX_ a)
#define hv_scalar(a) Perl_hv_scalar(aTHX_ a)
+#define hv_clear_placeholders(a) Perl_hv_clear_placeholders(aTHX_ a)
#ifdef PERL_CORE
#define magic_scalarpack(a,b) Perl_magic_scalarpack(aTHX_ a,b)
#endif
Perl_PerlIO_stderr
Perl_save_set_svflags
Perl_hv_assert
-Perl_hv_clear_placeholders
Perl_hv_scalar
Perl_hv_riter_p
Perl_hv_eiter_p
Perl_hv_riter_set
Perl_hv_eiter_set
Perl_hv_name_set
+Perl_hv_clear_placeholders
Perl_hv_placeholders_p
Perl_hv_placeholders_get
Perl_hv_placeholders_set
} else
#endif
{
- const char *name2 = name + 1;
+ const char * const name2 = name + 1;
switch (*name) {
case 'A':
if (strEQ(name2, "RGV")) {
sv_upgrade((SV *)io,SVt_PVIO);
SvREFCNT(io) = 1;
SvOBJECT_on(io);
- /* Clear the stashcache because a new IO could overrule a
- package name */
+ /* Clear the stashcache because a new IO could overrule a package name */
hv_clear(PL_stashcache);
iogv = gv_fetchpv("FileHandle::", FALSE, SVt_PVHV);
/* unless exists($main::{FileHandle}) and defined(%main::FileHandle::) */
{
/* Can be an import stub (created by "can"). */
SV *gvsv = GvSV(gv);
- const char *name = SvPOK(gvsv) ? SvPVX_const(gvsv) : "???";
+ const char * const name = SvPOK(gvsv) ? SvPVX_const(gvsv) : "???";
Perl_croak(aTHX_ "%s method \"%.256s\" overloading \"%s\" "\
"in package \"%.256s\"",
(GvCVGEN(gv) ? "Stub found while resolving"
}
cv = GvCV(gv = ngv);
}
- DEBUG_o( Perl_deb(aTHX_ "Overloading \"%s\" in package \"%.256s\" "\
- "via \"%.256s::%.256s\"\n",
+ DEBUG_o( Perl_deb(aTHX_ "Overloading \"%s\" in package \"%.256s\" via \"%.256s::%.256s\"\n",
cp, HvNAME_get(stash), HvNAME_get(GvSTASH(CvGV(cv))),
GvNAME(CvGV(cv))) );
filled = 1;
CV *cv=NULL;
CV **cvp=NULL, **ocvp=NULL;
AMT *amtp=NULL, *oamtp=NULL;
- int off=0, off1, lr=0, assign=AMGf_assign & flags, notfound=0;
- int postpr = 0, force_cpy = 0, assignshift = assign ? 1 : 0;
+ int off = 0, off1, lr = 0, notfound = 0;
+ int postpr = 0, force_cpy = 0;
+ int assign = AMGf_assign & flags;
+ const int assignshift = assign ? 1 : 0;
#ifdef DEBUGGING
int fl=0;
#endif
{
(void)flags;
if (len > 1) {
- const char *name1 = name + 1;
+ const char * const name1 = name + 1;
switch (*name) {
case 'I':
if (len == 3 && name1[1] == 'S' && name[2] == 'A')
Perl_hek_dup(pTHX_ HEK *source, CLONE_PARAMS* param)
{
HE *shared = (HE*)ptr_table_fetch(PL_shared_hek_table, source);
+ (void)param;
if (shared) {
/* We already shared this hash key. */
return Nullsv;
if (is_utf8) {
- const char *keysave = key;
- key = (char*)bytes_from_utf8((U8*)key, &klen, &is_utf8);
+ const char *keysave = key;
+ key = (char*)bytes_from_utf8((U8*)key, &klen, &is_utf8);
if (is_utf8)
k_flags |= HVhek_UTF8;
if (SvREADONLY(hv) && HvARRAY(hv) != NULL) {
/* restricted hash: convert all keys to placeholders */
- I32 i;
- for (i = 0; i <= (I32) xhv->xhv_max; i++) {
+ STRLEN i;
+ for (i = 0; i <= xhv->xhv_max; i++) {
HE *entry = (HvARRAY(hv))[i];
for (; entry; entry = HeNEXT(entry)) {
/* not already placeholder */
{
dVAR;
I32 items = (I32)HvPLACEHOLDERS_get(hv);
- I32 i = HvMAX(hv);
+ I32 i;
if (items == 0)
return;
+ i = HvMAX(hv);
do {
/* Loop down the linked list heads */
bool first = 1;
mg_clear((SV*)hv);
}
-struct xpvhv_aux*
+static struct xpvhv_aux*
S_hv_auxinit(pTHX_ HV *hv) {
struct xpvhv_aux *iter;
char *array;
{
struct xpvhv_aux *iter;
U32 hash;
+ (void)flags;
if (SvOOK(hv)) {
iter = HvAUX(hv);
Perl_hv_placeholders_get(pTHX_ HV *hv)
{
dVAR;
- MAGIC *mg = mg_find((SV*)hv, PERL_MAGIC_rhash);
+ MAGIC * const mg = mg_find((SV*)hv, PERL_MAGIC_rhash);
return mg ? mg->mg_len : 0;
}
Perl_hv_placeholders_set(pTHX_ HV *hv, I32 ph)
{
dVAR;
- MAGIC *mg = mg_find((SV*)hv, PERL_MAGIC_rhash);
+ MAGIC * const mg = mg_find((SV*)hv, PERL_MAGIC_rhash);
if (mg) {
mg->mg_len = ph;
{
unsigned char *e = s + nbytes;
long *lp;
- long lfill = *(long*)fill;
+ const long lfill = *(long*)fill;
if (PTR2UV(s) & (sizeof(long)-1)) { /* Align the pattern */
int shift = sizeof(long) - (PTR2UV(s) & (sizeof(long)-1));
{
unsigned char *e = s + nbytes;
long *lp;
- long lfill = *(long*)fill;
+ const long lfill = *(long*)fill;
if (PTR2UV(s) & (sizeof(long)-1)) { /* Align the pattern */
int shift = sizeof(long) - (PTR2UV(s) & (sizeof(long)-1));
{
union overhead *ovp = (union overhead *)
((caddr_t)p - sizeof (union overhead) * CHUNK_SHIFT);
- int bucket = OV_INDEX(ovp);
+ const int bucket = OV_INDEX(ovp);
#ifdef RCHECK
/* The caller wants to have a complete control over the chunk,
disable the memory checking inside the chunk. */
if (bucket <= MAX_SHORT_BUCKET) {
- MEM_SIZE size = BUCKET_SIZE_REAL(bucket);
+ const MEM_SIZE size = BUCKET_SIZE_REAL(bucket);
ovp->ov_size = size + M_OVERHEAD - 1;
*((u_int *)((caddr_t)ovp + size + M_OVERHEAD - RMAGIC_SZ)) = RMAGIC;
}
UNOP myop; /* fake syntax tree node */
volatile I32 oldmark = SP - PL_stack_base;
volatile I32 retval = 0;
- I32 oldscope;
int ret;
OP* oldop = PL_op;
dJMPENV;
Zero(PL_op, 1, UNOP);
EXTEND(PL_stack_sp, 1);
*++PL_stack_sp = sv;
- oldscope = PL_scopestack_ix;
if (!(flags & G_NOARGS))
myop.op_flags = OPf_STACKED;
Perl_croak(aTHX_ "Layer does not match this perl");
}
if (tab->size) {
- PerlIOl *l = NULL;
+ PerlIOl *l;
if (tab->size < sizeof(PerlIOl)) {
goto mismatch;
}
return 0;
}
while (1) {
- SSize_t len = PerlLIO_read(fd, vbuf, count);
+ const SSize_t len = PerlLIO_read(fd, vbuf, count);
if (len >= 0 || errno != EINTR) {
if (len < 0) {
if (errno != EAGAIN) {
}
PERL_ASYNC_CHECK();
}
+ /*NOTREACHED*/
}
SSize_t
lex_end();
LEAVE;
if (optype == OP_REQUIRE) {
- const char* msg = SvPVx(ERRSV, n_a);
- SV *nsv = cx->blk_eval.old_namesv;
+ const char* const msg = SvPVx(ERRSV, n_a);
+ const SV * const nsv = cx->blk_eval.old_namesv;
(void)hv_store(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv),
&PL_sv_undef, 0);
DIE(aTHX_ "%sCompilation failed in require",
{
if (*relem) {
SV *tmpstr;
- HE *didstore;
+ const HE *didstore;
if (ckWARN(WARN_MISC)) {
const char *err;
if (gimme == G_ARRAY) {
const I32 nparens = rx->nparens;
I32 i = (global && !nparens) ? 1 : 0;
- I32 len;
SPAGAIN; /* EVAL blocks could move the stack. */
EXTEND(SP, nparens + i);
PUSHs(sv_newmortal());
/*SUPPRESS 560*/
if ((rx->startp[i] != -1) && rx->endp[i] != -1 ) {
- len = rx->endp[i] - rx->startp[i];
+ const I32 len = rx->endp[i] - rx->startp[i];
s = rx->startp[i] + truebase;
if (rx->endp[i] < 0 || rx->startp[i] < 0 ||
len < 0 || len > strend - s)
packname = Nullch;
if(SvOK(sv) && (packname = SvPV(sv, packlen))) {
- HE* he;
- he = hv_fetch_ent(PL_stashcache, sv, 0, 0);
+ const HE* const he = hv_fetch_ent(PL_stashcache, sv, 0, 0);
if (he) {
stash = INT2PTR(HV*,SvIV(HeVAL(he)));
goto fetch;
/* shortcut for simple names */
if (hashp) {
- HE* he = hv_fetch_ent(stash, meth, 0, *hashp);
+ const HE* const he = hv_fetch_ent(stash, meth, 0, *hashp);
if (he) {
gv = (GV*)HeVAL(he);
if (isGV(gv) && GvCV(gv) &&
cv = GvFORM(fgv);
if (!cv) {
SV * const sv = sv_newmortal();
- char *name;
+ const char *name;
gv_efullname4(sv, fgv, Nullch, FALSE);
name = SvPV_nolen(sv);
if (name && *name)
#if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
STATIC int
-S_dooneliner(pTHX_ char *cmd, char *filename)
+S_dooneliner(pTHX_ const char *cmd, const char *filename)
{
- char *save_filename = filename;
+ char * const save_filename = filename;
char *cmdline;
char *s;
PerlIO *myfp;
PERL_CALLCONV Free_t Perl_mfree(Malloc_t where);
#if defined(MYMALLOC)
-PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p);
+PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p)
+ __attribute__warn_unused_result__;
+
#endif
PERL_CALLCONV void* Perl_get_context(void);
PERL_CALLCONV void Perl_init_tm(pTHX_ struct tm *ptm);
PERL_CALLCONV U32 Perl_intro_my(pTHX);
PERL_CALLCONV char* Perl_instr(pTHX_ const char* big, const char* little)
+ __attribute__warn_unused_result__
__attribute__pure__
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
-PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, bool not_implicit);
-PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd);
+PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, bool not_implicit)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd)
+ __attribute__warn_unused_result__;
+
PERL_CALLCONV bool Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
__attribute__warn_unused_result__;
PERL_CALLCONV SV* Perl_sv_newref(pTHX_ SV* sv);
PERL_CALLCONV char* Perl_sv_peek(pTHX_ SV* sv);
-PERL_CALLCONV void Perl_sv_pos_u2b(pTHX_ SV* sv, I32* offsetp, I32* lenp);
-PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV* sv, I32* offsetp);
+PERL_CALLCONV void Perl_sv_pos_u2b(pTHX_ SV* sv, I32* offsetp, I32* lenp)
+ __attribute__nonnull__(pTHX_2);
+
+PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV* sv, I32* offsetp)
+ __attribute__nonnull__(pTHX_2);
+
/* PERL_CALLCONV char* sv_pvn_force(pTHX_ SV* sv, STRLEN* lp); */
PERL_CALLCONV char* Perl_sv_pvutf8n_force(pTHX_ SV* sv, STRLEN* lp);
PERL_CALLCONV char* Perl_sv_pvbyten_force(pTHX_ SV* sv, STRLEN* lp);
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
-STATIC void S_unshare_hek_or_pvn(pTHX_ HEK* hek, const char* sv, I32 len, U32 hash)
- __attribute__nonnull__(pTHX_2);
-
+STATIC void S_unshare_hek_or_pvn(pTHX_ HEK* hek, const char* str, I32 len, U32 hash);
STATIC HE* S_share_hek_flags(pTHX_ const char* sv, I32 len, U32 hash, int flags)
__attribute__warn_unused_result__;
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_4);
+STATIC struct xpvhv_aux* S_hv_auxinit(pTHX_ HV *hv)
+ __attribute__malloc__
+ __attribute__warn_unused_result__;
+
#endif
#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
#endif
#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
-STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop);
-STATIC int S_emulate_eaccess(pTHX_ const char* path, Mode_t mode);
+STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2)
+ __attribute__nonnull__(pTHX_3);
+
+STATIC int S_emulate_eaccess(pTHX_ const char* path, Mode_t mode)
+ __attribute__noreturn__
+ __attribute__nonnull__(pTHX_1);
+
# if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
-STATIC int S_dooneliner(pTHX_ char *cmd, char *filename);
+STATIC int S_dooneliner(pTHX_ const char *cmd, const char *filename)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+
# endif
#endif
STATIC HE* S_hv_fetch_common(pTHX_ HV* tb, SV* key_sv, const char* key, STRLEN klen, int flags, int action, SV* val, U32 hash);
#endif
-PERL_CALLCONV void Perl_hv_clear_placeholders(pTHX_ HV* hb);
+PERL_CALLCONV SV* Perl_hv_scalar(pTHX_ HV* hv)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV I32* Perl_hv_riter_p(pTHX_ HV* hv)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV HE** Perl_hv_eiter_p(pTHX_ HV* hv)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void Perl_hv_riter_set(pTHX_ HV* hv, I32 riter)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void Perl_hv_eiter_set(pTHX_ HV* hv, HE* eiter)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+
+PERL_CALLCONV void Perl_hv_name_set(pTHX_ HV* hv, const char *name, I32 len, int flags)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void Perl_hv_clear_placeholders(pTHX_ HV* hb)
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV I32* Perl_hv_placeholders_p(pTHX_ HV* hv)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ HV* hv)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
+
+PERL_CALLCONV void Perl_hv_placeholders_set(pTHX_ HV* hv, I32 ph)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(pTHX_1);
-PERL_CALLCONV SV* Perl_hv_scalar(pTHX_ HV* hv);
-PERL_CALLCONV I32* Perl_hv_riter_p(pTHX_ HV* hv);
-PERL_CALLCONV HE** Perl_hv_eiter_p(pTHX_ HV* hv);
-PERL_CALLCONV void Perl_hv_riter_set(pTHX_ HV* hv, I32 riter);
-PERL_CALLCONV void Perl_hv_eiter_set(pTHX_ HV* hv, HE* eiter);
-PERL_CALLCONV void Perl_hv_name_set(pTHX_ HV* hv, const char *, I32 len, int flags);
-PERL_CALLCONV I32* Perl_hv_placeholders_p(pTHX_ HV* hv);
-PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ HV* hv);
-PERL_CALLCONV void Perl_hv_placeholders_set(pTHX_ HV* hv, I32 ph);
PERL_CALLCONV SV* Perl_magic_scalarpack(pTHX_ HV* hv, MAGIC* mg);
#ifdef PERL_IN_SV_C
dsv->sv_flags doesn't have that bit set.
Andy Dougherty 12 Oct 2001
*/
- I32 sutf8 = DO_UTF8(ssv);
+ const I32 sutf8 = DO_UTF8(ssv);
I32 dutf8;
if (SvGMAGICAL(dsv) && (flags & SV_GMAGIC))
if (SvOBJECT(sv)) {
if (PL_defstash) { /* Still have a symbol table? */
dSP;
- CV* destructor;
-
-
-
do {
+ CV* destructor;
stash = SvSTASH(sv);
destructor = StashHANDLER(stash,DESTROY);
if (destructor) {
Perl_sv_pos_u2b(pTHX_ register SV *sv, I32* offsetp, I32* lenp)
{
U8 *start;
- U8 *s;
STRLEN len;
- STRLEN *cache = 0;
- STRLEN boffset = 0;
if (!sv)
return;
- start = s = (U8*)SvPV(sv, len);
+ start = (U8*)SvPV(sv, len);
if (len) {
+ STRLEN boffset = 0;
+ STRLEN *cache = 0;
+ U8 *s = start;
I32 uoffset = *offsetp;
U8 *send = s + len;
MAGIC *mg = 0;
Perl_sv_reset(pTHX_ register const char *s, HV *stash)
{
dVAR;
- register HE *entry;
- register GV *gv;
- register SV *sv;
- register I32 i;
- register I32 max;
char todo[PERL_UCHAR_MAX+1];
if (!stash)
Zero(todo, 256, char);
while (*s) {
- i = (unsigned char)*s;
+ I32 max;
+ I32 i = (unsigned char)*s;
if (s[1] == '-') {
s += 2;
}
todo[i] = 1;
}
for (i = 0; i <= (I32) HvMAX(stash); i++) {
+ HE *entry;
for (entry = HvARRAY(stash)[i];
entry;
entry = HeNEXT(entry))
{
+ register GV *gv;
+ register SV *sv;
+
if (!todo[(U8)*HeKEY(entry)])
continue;
gv = (GV*)HeVAL(entry);
{
const int neg = nv < 0;
UV uv;
- char *p = endbuf;
if (neg)
nv = -nv;
if (nv < UV_MAX) {
+ char *p = endbuf;
nv += 0.5;
uv = (UV)nv;
if (uv & 1 && uv == nv)
I32 svix = 0;
static const char nullstr[] = "(null)";
SV *argsv = Nullsv;
- bool has_utf8; /* has the result utf8? */
- bool pat_utf8; /* the pattern is in utf8? */
+ bool has_utf8 = DO_UTF8(sv); /* has the result utf8? */
+ const bool pat_utf8 = has_utf8; /* the pattern is in utf8? */
SV *nsv = Nullsv;
/* Times 4: a decimal digit takes more than 3 binary digits.
* NV_DIG: mantissa takes than many decimal digits.
/* large enough for "%#.#f" --chip */
/* what about long double NVs? --jhi */
- has_utf8 = pat_utf8 = DO_UTF8(sv);
-
/* no matter what, this is a string now */
(void)SvPV_force(sv, origlen);
long longval;
GP *gp;
IV iv;
- I32 i;
char *c = NULL;
void (*dptr) (void*);
void (*dxptr) (pTHX_ void*);
Newz(54, nss, max, ANY);
while (ix > 0) {
- i = POPINT(ss,ix);
+ I32 i = POPINT(ss,ix);
TOPINT(nss,ix) = i;
switch (i) {
case SAVEt_ITEM: /* normal string */
* constants; they need to be allocated as common memory and just
* their pointers copied. */
- IV i;
CLONE_PARAMS clone_params;
CLONE_PARAMS* param = &clone_params;
{
const I32 len = av_len((AV*)proto_perl->Iregex_padav);
SV** regexen = AvARRAY((AV*)proto_perl->Iregex_padav);
+ IV i;
av_push(PL_regex_padav,
sv_dup_inc(regexen[0],param));
for(i = 1; i <= len; i++) {
#ifndef PERL_STRICT_CR
d = strchr(s, '\r');
if (d) {
- char *olds = s;
+ char * const olds = s;
s = d;
while (s < PL_bufend) {
if (*s == '\r') {
if (PL_lex_inwhat == OP_SUBST && PL_in_eval && !PL_rsfp) {
char *bufptr = PL_sublex_info.super_bufptr;
char *bufend = PL_sublex_info.super_bufend;
- char *olds = s - SvCUR(herewas);
+ char * const olds = s - SvCUR(herewas);
s = strchr(bufptr, '\n');
if (!s)
s = bufend;
if (pthread_setspecific(PL_thr_key, t))
Perl_croak_nocontext("panic: pthread_setspecific");
# endif
+#else
+ (void)t;
#endif
}