further Symbian/S90 fixes from alexander smishlajev
[p5sagit/p5-mst-13.2.git] / ext / Data / Dumper / Dumper.xs
index 0e60f6f..b09a023 100644 (file)
@@ -279,7 +279,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
        *1.1 was slower, *2.0 was the same, so the first guess of 1.5 is
        deemed to be good enough.  */
     if (SvTYPE(retval) >= SVt_PV && (SvLEN(retval) - SvCUR(retval)) < 42) {
-       sv_grow(retval, SvCUR(retval) * 1.5);
+       sv_grow(retval, SvCUR(retval) * 3 / 2);
     }
 
     realtype = SvTYPE(val);
@@ -439,7 +439,13 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
        (*levelp)++;
        ipad = sv_x(aTHX_ Nullsv, SvPVX_const(xpad), SvCUR(xpad), *levelp);
 
-       if (realtype <= SVt_PVBM) {                          /* scalar ref */
+       if (
+#if PERL_VERSION < 9
+               realtype <= SVt_PVBM
+#else
+               realtype <= SVt_PVMG
+#endif
+       ) {                          /* scalar ref */
            SV * const namesv = newSVpvn("${", 2);
            sv_catpvn(namesv, name, namelen);
            sv_catpvn(namesv, "}", 1);