This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Merge UNI2 and UNIBRACK
[perl5.git] / util.c
diff --git a/util.c b/util.c
index acde398..5e69cb9 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1458,7 +1458,7 @@ Perl_die_sv(pTHX_ SV *baseex)
 {
     PERL_ARGS_ASSERT_DIE_SV;
     croak_sv(baseex);
-    /* NOTREACHED */
+    assert(0); /* NOTREACHED */
     return NULL;
 }
 
@@ -1480,7 +1480,7 @@ Perl_die_nocontext(const char* pat, ...)
     va_list args;
     va_start(args, pat);
     vcroak(pat, &args);
-    /* NOTREACHED */
+    assert(0); /* NOTREACHED */
     va_end(args);
     return NULL;
 }
@@ -1492,7 +1492,7 @@ Perl_die(pTHX_ const char* pat, ...)
     va_list args;
     va_start(args, pat);
     vcroak(pat, &args);
-    /* NOTREACHED */
+    assert(0); /* NOTREACHED */
     va_end(args);
     return NULL;
 }
@@ -1592,7 +1592,7 @@ Perl_croak_nocontext(const char *pat, ...)
     va_list args;
     va_start(args, pat);
     vcroak(pat, &args);
-    /* NOTREACHED */
+    assert(0); /* NOTREACHED */
     va_end(args);
 }
 #endif /* PERL_IMPLICIT_CONTEXT */
@@ -1603,7 +1603,7 @@ Perl_croak(pTHX_ const char *pat, ...)
     va_list args;
     va_start(args, pat);
     vcroak(pat, &args);
-    /* NOTREACHED */
+    assert(0); /* NOTREACHED */
     va_end(args);
 }
 
@@ -3716,15 +3716,15 @@ void
 Perl_report_wrongway_fh(pTHX_ const GV *gv, const char have)
 {
     if (ckWARN(WARN_IO)) {
-        SV * const name
+        HEK * const name
            = gv && (isGV_with_GP(gv))
-                ? sv_2mortal(newSVhek(GvENAME_HEK((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),
@@ -3751,7 +3751,7 @@ Perl_report_evil_fh(pTHX_ const GV *gv)
 
     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) ? "" : "()");
@@ -3764,7 +3764,7 @@ Perl_report_evil_fh(pTHX_ const GV *gv)
            (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 ? " " : "",
@@ -6443,7 +6443,7 @@ Perl_my_dirfd(pTHX_ DIR * dir) {
     return dir->dd_fd;
 #else
     Perl_die(aTHX_ PL_no_func, "dirfd");
-   /* NOT REACHED */
+    assert(0); /* NOT REACHED */
     return 0;
 #endif 
 }