r62056 - /branches/unstable/libdate-calc-perl/debian/patches/SvPV.patch

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Thu Aug 26 13:48:16 UTC 2010


Author: ansgar-guest
Date: Thu Aug 26 13:48:02 2010
New Revision: 62056

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=62056
Log:
update patch so that Decode_Month() works with overload as well

Modified:
    branches/unstable/libdate-calc-perl/debian/patches/SvPV.patch

Modified: branches/unstable/libdate-calc-perl/debian/patches/SvPV.patch
URL: http://svn.debian.org/wsvn/pkg-perl/branches/unstable/libdate-calc-perl/debian/patches/SvPV.patch?rev=62056&op=diff
==============================================================================
--- branches/unstable/libdate-calc-perl/debian/patches/SvPV.patch (original)
+++ branches/unstable/libdate-calc-perl/debian/patches/SvPV.patch Thu Aug 26 13:48:02 2010
@@ -7,19 +7,18 @@
 
 --- libdate-calc-perl.orig/Calc.xs
 +++ libdate-calc-perl/Calc.xs
-@@ -51,9 +51,8 @@
+@@ -51,9 +51,7 @@
  
  
  #define DATECALC_STRING(ref,var,len) \
 -    ( ref && !(SvROK(ref)) && SvPOK(ref) && \
 -    (var = (charptr)SvPV(ref,PL_na)) && \
 -    ((len = (N_int)SvCUR(ref)) | 1) )
-+    ( ref && !(SvROK(ref)) && \
-+    (var = (charptr)SvPV(ref,len)) )
++    ( ref && (var = (charptr)SvPV(ref,len)) )
  
  #define DATECALC_SCALAR(ref,typ,var) \
      ( ref && !(SvROK(ref)) && ((var = (typ)SvIV(ref)) | 1) )
-@@ -1268,7 +1267,7 @@
+@@ -1268,7 +1266,7 @@
  PPCODE:
  {
      charptr string;
@@ -28,7 +27,7 @@
      Z_int   lang;
  
      if ((items == 1) or (items == 2))
-@@ -1295,7 +1294,7 @@
+@@ -1295,7 +1293,7 @@
  PPCODE:
  {
      charptr string;
@@ -37,7 +36,7 @@
      Z_int   lang;
  
      if ((items == 1) or (items == 2))
-@@ -1333,7 +1332,7 @@
+@@ -1333,7 +1331,7 @@
  PPCODE:
  {
      charptr string;
@@ -46,7 +45,7 @@
      Z_int   lang;
      Z_int   year;
      Z_int   month;
-@@ -1369,7 +1368,7 @@
+@@ -1369,7 +1367,7 @@
  PPCODE:
  {
      charptr string;
@@ -55,7 +54,7 @@
      Z_int   lang;
      Z_int   year;
      Z_int   month;
-@@ -1780,8 +1779,8 @@
+@@ -1780,8 +1778,8 @@
  {
      charptr string;
      charptr buffer;
@@ -66,7 +65,7 @@
  
      if ( DATECALC_STRING(scalar,string,length) )
      {
-@@ -1808,8 +1807,8 @@
+@@ -1808,8 +1806,8 @@
  {
      charptr string;
      charptr buffer;
@@ -79,7 +78,7 @@
      {
 --- /dev/null
 +++ libdate-calc-perl/t/debian-558272.t
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,23 @@
 +#! /usr/bin/perl
 +
 +use strict;
@@ -92,7 +91,14 @@
 +
 +my $string = "Oct";
 +$string =~ /(.*)/;
-+
 +lives_and { is Date::Calc::Decode_Month($1), 10 } 'Decode_Month($1) works';
 +
++{
++  package
++    Foo;
++  use overload '""' => sub { "Nov" };
++}
++my $foo = bless {}, 'Foo';
++lives_and { is Date::Calc::Decode_Month($foo), 11 } 'Decode_Month() works with overload';
++
 +done_testing();




More information about the Pkg-perl-cvs-commits mailing list