summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2005-07-14 14:31:00 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-07-18 12:37:02 +0000
commitd8839a5915f271c95470b32c12f18be3c54e6fea (patch)
treee6ffeac4fb734adfbb253bcfb056402896869d8b /perl.h
parent7daccf6c563ef0821b93306c0bc24478e98681ac (diff)
downloadperl-d8839a5915f271c95470b32c12f18be3c54e6fea.tar.gz
RE: blead: no longer supports %vd format
Message-ID: <533D273D4014D411AB1D00062938C4D90849C730@hotel.npl.co.uk> p4raw-id: //depot/perl@25171
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h42
1 files changed, 33 insertions, 9 deletions
diff --git a/perl.h b/perl.h
index b573c71113..dbe2b3dae6 100644
--- a/perl.h
+++ b/perl.h
@@ -2615,25 +2615,49 @@ typedef pthread_key_t perl_key;
# define PERL_SET_THX(t) PERL_SET_CONTEXT(t)
#endif
-/* This replaces the previous %_ "hack" by the "%-p" hack
+/*
+ This replaces the previous %_ "hack" by the "%p" hacks.
All that is required is that the perl source does not
- use "%-p" or "%-<number>p" format. These format will
- still work in perl code. RMB 2005/05/17
+ use "%-p" or "%-<number>p" or "%<number>p" formats.
+ These formats will still work in perl code.
+ See comments in sv.c for futher details.
+
+ -DvdNUMBER=<number> can be used to redefine VDf
+
+ -DvdNUMBER=0 reverts VDf to "vd", as in perl5.8.7,
+ which works properly but gives compiler warnings
+
+ Robin Barker 2005-07-14
*/
-#ifndef SVf
-# define SVf "-p"
+
+#ifndef SVf_
+# define SVf_(n) "-" #n "p"
#endif
-#ifndef SVf_precision
-# define SVf_precision(n) "-" n "p"
+#ifndef SVf
+# define SVf SVf_()
#endif
#ifndef SVf32
-# define SVf32 SVf_precision("32")
+# define SVf32 SVf_(32)
#endif
#ifndef SVf256
-# define SVf256 SVf_precision("256")
+# define SVf256 SVf_(256)
+#endif
+
+#ifndef vdNUMBER
+# define vdNUMBER 1
+#endif
+
+#ifndef VDf
+# if vdNUMBER
+# define vdFORMAT(n) #n "p"
+# define VDf_(n) vdFORMAT(n)
+# define VDf VDf_(vdNUMBER)
+# else
+# define VDf "vd"
+# endif
#endif
#ifndef UVf