This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid literal 'undef' in $lddlflags under `Configure -Uoptimize`
[perl5.git] / doop.c
diff --git a/doop.c b/doop.c
index 7ed895d..b93223f 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -1,6 +1,6 @@
 /*    doop.c
  *
- *    Copyright (c) 1991-1997, Larry Wall
+ *    Copyright (c) 1991-1999, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -597,7 +597,7 @@ do_trans(SV *sv)
     STRLEN len;
 
     if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL))
-       croak(no_modify);
+       croak(PL_no_modify);
 
     (void)SvPV(sv, len);
     if (!len)
@@ -653,8 +653,7 @@ do_join(register SV *sv, SV *del, register SV **mark, register SV **sp)
 
     mark++;
     len = (items > 0 ? (delimlen * (items - 1) ) : 0);
-    if (SvTYPE(sv) < SVt_PV)
-       sv_upgrade(sv, SVt_PV);
+    (void)SvUPGRADE(sv, SVt_PV);
     if (SvLEN(sv) < len + items) {     /* current length is way too short */
        while (items-- > 0) {
            if (*mark && !SvGMAGICAL(*mark) && SvOK(*mark)) {
@@ -922,7 +921,8 @@ do_vop(I32 optype, SV *sv, SV *left, SV *right)
     len = leftlen < rightlen ? leftlen : rightlen;
     lensave = len;
     if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) {
-       dc = SvPV_force(sv, PL_na);
+       STRLEN n_a;
+       dc = SvPV_force(sv, n_a);
        if (SvCUR(sv) < len) {
            dc = SvGROW(sv, len + 1);
            (void)memzero(dc + SvCUR(sv), len - SvCUR(sv) + 1);
@@ -1061,7 +1061,7 @@ do_kv(ARGSproto)
            RETURN;
        }
 
-       if (!SvRMAGICAL(keys) || !mg_find((SV*)keys,'P'))
+       if (! SvTIED_mg((SV*)keys, 'P'))
            i = HvKEYS(keys);
        else {
            i = 0;