if (GvIO(PL_last_in_gv) && (SvTYPE(GvIOp(PL_last_in_gv)) == SVt_PVIO)
&& IoLINES(GvIOp(PL_last_in_gv)))
{
+ STRLEN l;
const bool line_mode = (RsSIMPLE(PL_rs) &&
- SvCUR(PL_rs) == 1 && *SvPVX_const(PL_rs) == '\n');
+ *SvPV_const(PL_rs,l) == '\n' && l == 1);
Perl_sv_catpvf(aTHX_ sv, ", <%"SVf"> %s %"IVdf,
SVfARG(PL_last_in_gv == PL_argvgv
? &PL_sv_no
{
PERL_ARGS_ASSERT_DIE_SV;
croak_sv(baseex);
- /* NOTREACHED */
+ assert(0); /* NOTREACHED */
return NULL;
}
va_list args;
va_start(args, pat);
vcroak(pat, &args);
- /* NOTREACHED */
+ assert(0); /* NOTREACHED */
va_end(args);
return NULL;
}
va_list args;
va_start(args, pat);
vcroak(pat, &args);
- /* NOTREACHED */
+ assert(0); /* NOTREACHED */
va_end(args);
return NULL;
}
va_list args;
va_start(args, pat);
vcroak(pat, &args);
- /* NOTREACHED */
+ assert(0); /* NOTREACHED */
va_end(args);
}
#endif /* PERL_IMPLICIT_CONTEXT */
va_list args;
va_start(args, pat);
vcroak(pat, &args);
- /* NOTREACHED */
+ assert(0); /* NOTREACHED */
va_end(args);
}
Perl_report_wrongway_fh(pTHX_ const GV *gv, const char have)
{
if (ckWARN(WARN_IO)) {
- SV * const name
- = gv && (isGV(gv) || isGV_with_GP(gv))
- ? sv_2mortal(newSVhek(GvENAME_HEK((gv))))
+ HEK * const name
+ = gv && (isGV_with_GP(gv))
+ ? GvENAME_HEK((gv))
: NULL;
const char * const direction = have == '>' ? "out" : "in";
- if (name && SvPOK(name) && *SvPV_nolen(name))
+ if (name && HEK_LEN(name))
Perl_warner(aTHX_ packWARN(WARN_IO),
- "Filehandle %"SVf" opened only for %sput",
+ "Filehandle %"HEKf" opened only for %sput",
name, direction);
else
Perl_warner(aTHX_ packWARN(WARN_IO),
if (ckWARN(warn_type)) {
SV * const name
- = gv && (isGV(gv) || isGV_with_GP(gv)) && GvENAMELEN(gv) ?
+ = gv && isGV_with_GP(gv) && GvENAMELEN(gv) ?
sv_2mortal(newSVhek(GvENAME_HEK(gv))) : NULL;
const char * const pars =
(const char *)(OP_IS_FILETEST(op) ? "" : "()");
(const char *)
(OP_IS_SOCKET(op) || (io && IoTYPE(io) == IoTYPE_SOCKET)
? "socket" : "filehandle");
- const bool have_name = name && SvPOK(name) && *SvPV_nolen(name);
+ const bool have_name = name && SvCUR(name);
Perl_warner(aTHX_ packWARN(warn_type),
"%s%s on %s %s%s%"SVf, func, pars, vile, type,
have_name ? " " : "",
return myseed;
}
-#ifdef USE_ITHREADS
-bool
-Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv)
-{
- const char * stashpv = CopSTASHPV(c);
- const char * name = HvNAME_get(hv);
- const bool utf8 = CopSTASH_len(c) < 0;
- const I32 len = utf8 ? -CopSTASH_len(c) : CopSTASH_len(c);
- PERL_UNUSED_CONTEXT;
- PERL_ARGS_ASSERT_STASHPV_HVNAME_MATCH;
-
- if (!stashpv || !name)
- return stashpv == name;
- if ( !HvNAMEUTF8(hv) != !utf8 ) {
- if (utf8) {
- return (bytes_cmp_utf8(
- (const U8*)stashpv, len,
- (const U8*)name, HEK_LEN(HvNAME_HEK(hv))) == 0);
- } else {
- return (bytes_cmp_utf8(
- (const U8*)name, HEK_LEN(HvNAME_HEK(hv)),
- (const U8*)stashpv, len) == 0);
- }
- }
- else
- return (stashpv == name
- || (HEK_LEN(HvNAME_HEK(hv)) == len
- && memEQ(stashpv, name, len)));
- /*NOTREACHED*/
- return FALSE;
-}
-#endif
-
-
#ifdef PERL_GLOBAL_STRUCT
#define PERL_GLOBAL_STRUCT_INIT
return dir->dd_fd;
#else
Perl_die(aTHX_ PL_no_func, "dirfd");
- /* NOT REACHED */
+ assert(0); /* NOT REACHED */
return 0;
#endif
}