List Info

Thread: VDf no longer in PERL_CORE




VDf no longer in PERL_CORE
user name
2007-10-19 07:33:50

Following from the 'undef UVf' patch, another set of macros related to printf formatting are not used in PERL_CORE.
This is a similar but longer patch for VDf (and friends) - not just macro definition but removing code and comments.

Robin Barker

--- perl.h.orig 2007-10-19 12:07:45.000000000 +0100
+++ perl.h      2007-10-19 12:12:18.000000000 +0100
-3072,12 +3072,9
     These formats will still work in perl code. 
     See comments in sv.c for futher details.
 
- &nbsp; &nbsp; &nbsp; -DvdNUMBER=<number> can be used to redefine VDf
-
- &nbsp; &nbsp; &nbsp; -DvdNUMBER=0 reverts VDf to "vd&quot;, as in perl5.8.7,
- &nbsp; &nbsp; &nbsp;  &nbsp;  which works properly but gives compiler warnings
-
 &nbsp; &nbsp; Robin Barker 2005-07-14
+
+ &nbsp;  No longer use %1p for VDf = %vd.  RMB 2007-10-19
 */
 
 #ifndef SVf_
-3098,14 +3095,11
 
 #define SVfARG(p) ((void*)(p))
 
-#ifndef vdNUMBER
-#  define vdNUMBER 1
-#endif
-
-#ifndef VDf
-#  if vdNUMBER
-# &nbsp;  define VDf STRINGIFY(vdNUMBER) "p&quot;
-#  else
+#ifdef PERL_CORE
+/* not used; but needed for backward compatibilty with XS code? - RMB */
+#  undef VDf
+#else
+#  ifndef VDf
 #&nbsp; &nbsp; define VDf "vd&quot;
 #&nbsp; endif
 #endif
--- sv.c.orig&nbsp;  2007-10-17 09:24:32.000000000 +0100
+++ sv.c   ; &nbsp; &nbsp; 2007-10-19 13:27:45.000000000 +0100
-8603,10 +8603,11
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  %p &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  include pointer address (standard)  ; &nbsp; 
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  %-p &nbsp;   (SVf) ;  include an SV (previously %_)
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  %-<num&gt;p &nbsp;   ; &nbsp; include an SV with precision <num>; &nbsp; &nbsp; 
- &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;  %1p &nbsp;   (VDf) ;  include a v-string (as %vd)
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  %<num&gt;p  &nbsp; &nbsp; &nbsp;  reserved for future extensions
 
 &nbsp; &nbsp; &nbsp;  Robin Barker 2005-07-14
+
+ &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;  %1p &nbsp;   (VDf) ;  removed.&nbsp; RMB 2007-10-19
 */
   &nbsp; &nbsp;   &nbsp;  char* r = q;
 &nbsp; &nbsp; &nbsp;   &nbsp;  bool sv = FALSE;&nbsp; &nbsp;
-8626,13 +8627,6
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  is_utf8 = TRUE;
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp;  goto string;
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  }
-#if vdNUMBER
- &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;  else if (n == vdNUMBER) { &nbsp; &nbsp; &nbsp; /* VDf */
- &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;   &nbsp;  vectorize = TRUE;
- &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;   &nbsp;  VECTORIZE_ARGS
- &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;   &nbsp;  goto format_vd;
- &nbsp; &nbsp; &nbsp;    &nbsp; &nbsp;  }
-#endif
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  else if (n) {
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp;  if (ckWARN_d(WARN_INTERNAL))
 &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp;  Perl_warner(aTHX_ packWARN(WARN_INTERNAL),
End of patch


<<undefVDf.patch>>

  
Re: VDf no longer in PERL_CORE
user name
2007-10-20 11:27:00
On 19/10/2007, Robin Barker <Robin.Barkernpl.co.uk> wrote:
> Following from the 'undef UVf' patch, another set of
macros related to printf
> formatting are not used in PERL_CORE.
> This is a similar but longer patch for VDf (and
friends) - not just macro
> definition but removing code and comments.

Thanks, applied.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )