This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix C pre-processor expression in Dumper.xs
authorNicholas Clark <nick@ccl4.org>
Mon, 30 Jul 2012 14:53:52 +0000 (16:53 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 30 Jul 2012 14:53:52 +0000 (16:53 +0200)
Commit 153920a10f425609 added a second condition to an #ifdef in Dumper.xs,
but didn't change the #ifdef to #if defined. Clearly gcc can cope with the
resulting non-conformant pre-processor expression, but pickier compilers
(such as HP's) reject it. Re-write it in a way that everything accepts.

dist/Data-Dumper/Dumper.xs

index f763664..156cba1 100644 (file)
@@ -1009,7 +1009,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
        }
 #ifdef SvVOK
        else if (SvMAGICAL(val) && (mg = mg_find(val, 'V'))) {
-# ifndef PL_vtbl_vstring && PERL_VERSION < 17
+# if !defined(PL_vtbl_vstring) && PERL_VERSION < 17
            SV * const vecsv = sv_newmortal();
 #  if PERL_VERSION < 10
            scan_vstring(mg->mg_ptr, vecsv);