This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Module::Pluggable::Object::search_paths portability update prompted by
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index 9cdb6e4..e03521e 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -716,7 +716,7 @@ S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const char *methp
 =for apidoc gv_stashpv
 
 Returns a pointer to the stash for a specified package.  Uses C<strlen> to
-determine the length of C<name, then calls C<gv_stashpvn()>.
+determine the length of C<name>, then calls C<gv_stashpvn()>.
 
 =cut
 */
@@ -1354,9 +1354,7 @@ Perl_newIO(pTHX)
 {
     dVAR;
     GV *iogv;
-    IO * const io = (IO*)newSV(0);
-
-    sv_upgrade((SV *)io,SVt_PVIO);
+    IO * const io = (IO*)newSV_type(SVt_PVIO);
     /* This used to read SvREFCNT(io) = 1;
        It's not clear why the reference count needed an explicit reset. NWC
     */
@@ -1873,6 +1871,19 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
     } else {
     not_found:                 /* No method found, either report or croak */
       switch (method) {
+        case lt_amg:
+        case le_amg:
+        case gt_amg:
+        case ge_amg:
+        case eq_amg:
+        case ne_amg:
+        case slt_amg:
+        case sle_amg:
+        case sgt_amg:
+        case sge_amg:
+        case seq_amg:
+        case sne_amg:
+          postpr = 0; break;
         case to_sv_amg:
         case to_av_amg:
         case to_hv_amg: