Ref change 26676.
p4raw-id: //depot/perl@26795
/* Remember old disposition if desired. */
if (oldaction) {
- svp = hv_fetch(oldaction, "HANDLER", 7, TRUE);
+ svp = hv_fetchs(oldaction, "HANDLER", TRUE);
if(!svp)
croak("Can't supply an oldaction without a HANDLER");
if(SvTRUE(*sigsvp)) { /* TBD: what if "0"? */
if(RETVAL == -1)
XSRETURN_UNDEF;
/* Get back the mask. */
- svp = hv_fetch(oldaction, "MASK", 4, TRUE);
+ svp = hv_fetchs(oldaction, "MASK", TRUE);
if (sv_isa(*svp, "POSIX::SigSet")) {
IV tmp = SvIV((SV*)SvRV(*svp));
sigset = INT2PTR(sigset_t*, tmp);
*sigset = oact.sa_mask;
/* Get back the flags. */
- svp = hv_fetch(oldaction, "FLAGS", 5, TRUE);
+ svp = hv_fetchs(oldaction, "FLAGS", TRUE);
sv_setiv(*svp, oact.sa_flags);
/* Get back whether the old handler used safe signals. */
- svp = hv_fetch(oldaction, "SAFE", 4, TRUE);
+ svp = hv_fetchs(oldaction, "SAFE", TRUE);
sv_setiv(*svp,
/* compare incompatible pointers by casting to integer */
PTR2nat(oact.sa_handler) == PTR2nat(PL_csighandlerp));
/* Safe signals use "csighandler", which vectors through the
PL_sighandlerp pointer when it's safe to do so.
(BTW, "csighandler" is very different from "sighandler".) */
- svp = hv_fetch(action, "SAFE", 4, FALSE);
+ svp = hv_fetchs(action, "SAFE", FALSE);
act.sa_handler =
DPTR2FPTR(
void (*)(),
/* Vector new Perl handler through %SIG.
(The core signal handlers read %SIG to dispatch.) */
- svp = hv_fetch(action, "HANDLER", 7, FALSE);
+ svp = hv_fetchs(action, "HANDLER", FALSE);
if (!svp)
croak("Can't supply an action without a HANDLER");
sv_setsv(*sigsvp, *svp);
}
/* Set up any desired mask. */
- svp = hv_fetch(action, "MASK", 4, FALSE);
+ svp = hv_fetchs(action, "MASK", FALSE);
if (svp && sv_isa(*svp, "POSIX::SigSet")) {
IV tmp = SvIV((SV*)SvRV(*svp));
sigset = INT2PTR(sigset_t*, tmp);
sigemptyset(& act.sa_mask);
/* Set up any desired flags. */
- svp = hv_fetch(action, "FLAGS", 5, FALSE);
+ svp = hv_fetchs(action, "FLAGS", FALSE);
act.sa_flags = svp ? SvIV(*svp) : 0;
/* Don't worry about cleaning up *sigsvp if this fails,
return 0; /* cache indicates sub doesn't exist */
}
- gvp = (GV**)hv_fetch(stash, "ISA", 3, FALSE);
+ gvp = (GV**)hv_fetchs(stash, "ISA", FALSE);
av = (gvp && (gv = *gvp) && gv != (GV*)&PL_sv_undef) ? GvAV(gv) : NULL;
/* create and re-create @.*::SUPER::ISA on demand */
packlen -= 7;
basestash = gv_stashpvn(hvname, packlen, TRUE);
- gvp = (GV**)hv_fetch(basestash, "ISA", 3, FALSE);
+ gvp = (GV**)hv_fetchs(basestash, "ISA", FALSE);
if (gvp && (gv = *gvp) != (GV*)&PL_sv_undef && (av = GvAV(gv))) {
- gvp = (GV**)hv_fetch(stash, "ISA", 3, TRUE);
+ gvp = (GV**)hv_fetchs(stash, "ISA", TRUE);
if (!gvp || !(gv = *gvp))
Perl_croak(aTHX_ "Cannot create %s::ISA", hvname);
if (SvTYPE(gv) != SVt_PVGV)
namend++;
name = namend;
if (!*name)
- return gv ? gv : (GV*)*hv_fetch(PL_defstash, "main::", 6, TRUE);
+ return gv ? gv : (GV*)*hv_fetchs(PL_defstash, "main::", TRUE);
}
}
len = namend - name;
* it could have been extended by warnings::register */
SV **bits_all;
HV * const bits=get_hv("warnings::Bits", FALSE);
- if (bits && (bits_all=hv_fetch(bits, "all", 3, FALSE))) {
+ if (bits && (bits_all=hv_fetchs(bits, "all", FALSE))) {
sv_setsv(sv, *bits_all);
}
else {
* it could have been extended by warnings::register */
SV **bits_all;
HV * const bits = get_hv("warnings::Bits", FALSE);
- if (bits && (bits_all=hv_fetch(bits, "all", 3, FALSE))) {
+ if (bits && (bits_all=hv_fetchs(bits, "all", FALSE))) {
mask = newSVsv(*bits_all);
}
else {
else if (gv && !gvp
&& -tmp==KEY_lock /* XXX generalizable kludge */
&& GvCVu(gv)
- && !hv_fetch(GvHVn(PL_incgv), "Thread.pm", 9, FALSE))
+ && !hv_fetchs(GvHVn(PL_incgv), "Thread.pm", FALSE))
{
tmp = 0; /* any sub overrides "weak" keyword */
}
if ((gv_readline
&& GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline))
||
- ((gvp = (GV**)hv_fetch(PL_globalstash, "readline", 8, FALSE))
+ ((gvp = (GV**)hv_fetchs(PL_globalstash, "readline", FALSE))
&& (gv_readline = *gvp) != (GV*)&PL_sv_undef
&& GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline)))
readline_overriden = TRUE;
Perl_croak(aTHX_ "Recursive inheritance detected in package '%s'",
hvname);
- gvp = (GV**)hv_fetch(stash, "::ISA::CACHE::", 14, FALSE);
+ gvp = (GV**)hv_fetchs(stash, "::ISA::CACHE::", FALSE);
if (gvp && (gv = *gvp) != (GV*)&PL_sv_undef && (subgen = GvSV(gv))
&& (hv = GvHV(gv)))
}
}
- gvp = (GV**)hv_fetch(stash,"ISA",3,FALSE);
+ gvp = (GV**)hv_fetchs(stash, "ISA", FALSE);
if (gvp && (gv = *gvp) != (GV*)&PL_sv_undef && (av = GvAV(gv))) {
if (!hv || !subgen) {
- gvp = (GV**)hv_fetch(stash, "::ISA::CACHE::", 14, TRUE);
+ gvp = (GV**)hv_fetchs(stash, "::ISA::CACHE::", TRUE);
gv = *gvp;
pkg = gv_stashsv(ST(0), FALSE);
}
- gvp = pkg ? (GV**)hv_fetch(pkg,"VERSION",7,FALSE) : Null(GV**);
+ gvp = pkg ? (GV**)hv_fetchs(pkg, "VERSION", FALSE) : Null(GV**);
if (gvp && isGV(gv = *gvp) && (sv = GvSV(gv)) && SvOK(sv)) {
SV * const nsv = sv_newmortal();
STRLEN lcur, xcur, scur;
HV* const hv = (HV*)SvRV(swash);
- SV** const listsvp = hv_fetch(hv, "LIST", 4, FALSE);
- SV** const typesvp = hv_fetch(hv, "TYPE", 4, FALSE);
- SV** const bitssvp = hv_fetch(hv, "BITS", 4, FALSE);
- SV** const nonesvp = hv_fetch(hv, "NONE", 4, FALSE);
- SV** const extssvp = hv_fetch(hv, "EXTRAS", 6, FALSE);
+ SV** const listsvp = hv_fetchs(hv, "LIST", FALSE);
+ SV** const typesvp = hv_fetchs(hv, "TYPE", FALSE);
+ SV** const bitssvp = hv_fetchs(hv, "BITS", FALSE);
+ SV** const nonesvp = hv_fetchs(hv, "NONE", FALSE);
+ SV** const extssvp = hv_fetchs(hv, "EXTRAS", FALSE);
const U8* const typestr = (U8*)SvPV_nolen(*typesvp);
const int typeto = typestr[0] == 'T' && typestr[1] == 'o';
const STRLEN bits = SvUV(*bitssvp);
othersvp = hv_fetch(hv, (char *)namestr, namelen, FALSE);
otherhv = (HV*)SvRV(*othersvp);
- otherbitssvp = hv_fetch(otherhv, "BITS", 4, FALSE);
+ otherbitssvp = hv_fetchs(otherhv, "BITS", FALSE);
otherbits = (STRLEN)SvUV(*otherbitssvp);
if (bits < otherbits)
Perl_croak(aTHX_ "panic: swash_get found swatch size mismatch");
if ( hv_exists((HV*)ver, "width", 5 ) )
{
- const I32 width = SvIV(*hv_fetch((HV*)ver, "width", 5, FALSE));
+ const I32 width = SvIV(*hv_fetchs((HV*)ver, "width", FALSE));
hv_store((HV *)hv, "width", 5, newSViv(width), 0);
}
- sav = (AV *)SvRV(*hv_fetch((HV*)ver, "version", 7, FALSE));
+ sav = (AV *)SvRV(*hv_fetchs((HV*)ver, "version", FALSE));
/* This will get reblessed later if a derived class*/
for ( key = 0; key <= av_len(sav); key++ )
{
/* see if the appropriate elements exist */
if ( SvTYPE(vs) == SVt_PVHV
&& hv_exists((HV*)vs, "version", 7)
- && (sv = SvRV(*hv_fetch((HV*)vs, "version", 7, FALSE)))
+ && (sv = SvRV(*hv_fetchs((HV*)vs, "version", FALSE)))
&& SvTYPE(sv) == SVt_PVAV )
return TRUE;
else
if ( hv_exists((HV*)vs, "alpha", 5 ) )
alpha = TRUE;
if ( hv_exists((HV*)vs, "width", 5 ) )
- width = SvIV(*hv_fetch((HV*)vs, "width", 5, FALSE));
+ width = SvIV(*hv_fetchs((HV*)vs, "width", FALSE));
else
width = 3;
/* attempt to retrieve the version array */
- if ( !(av = (AV *)SvRV(*hv_fetch((HV*)vs, "version", 7, FALSE)) ) ) {
+ if ( !(av = (AV *)SvRV(*hv_fetchs((HV*)vs, "version", FALSE)) ) ) {
sv_catpvs(sv,"0");
return sv;
}
if ( hv_exists((HV*)vs, "alpha", 5 ) )
alpha = TRUE;
- av = (AV *)SvRV(*hv_fetch((HV*)vs, "version", 7, FALSE));
+ av = (AV *)SvRV(*hv_fetchs((HV*)vs, "version", FALSE));
len = av_len(av);
if ( len == -1 )
Perl_croak(aTHX_ "Invalid version object");
/* get the left hand term */
- lav = (AV *)SvRV(*hv_fetch((HV*)lhv, "version", 7, FALSE));
+ lav = (AV *)SvRV(*hv_fetchs((HV*)lhv, "version", FALSE));
if ( hv_exists((HV*)lhv, "alpha", 5 ) )
lalpha = TRUE;
/* and the right hand term */
- rav = (AV *)SvRV(*hv_fetch((HV*)rhv, "version", 7, FALSE));
+ rav = (AV *)SvRV(*hv_fetchs((HV*)rhv, "version", FALSE));
if ( hv_exists((HV*)rhv, "alpha", 5 ) )
ralpha = TRUE;