[SCM] Debian packaging of libdate-calc-xs-perl branch, master, updated. 8e965d63b820b053065178d3aa35330b7fffd6b1
Florian Schlichting
fschlich at zedat.fu-berlin.de
Mon Sep 12 23:04:10 UTC 2011
The following commit has been merged in the master branch:
commit a8914b726c86f71acf0c218c55a7867bcb7b1785
Author: Florian Schlichting <fschlich at zedat.fu-berlin.de>
Date: Mon Sep 12 22:58:03 2011 +0000
Add SvPV.patch by Ansgar Burchardt.
diff --git a/debian/changelog b/debian/changelog
index 6e0998a..c861947 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,5 @@
libdate-calc-xs-perl (6.2-1) UNRELEASED; urgency=low
- TODO: Please be aware that #558272 needs to be fixed here as well.
-
[ Jonathan Yu ]
* Initial Release (Closes: #551495)
@@ -16,5 +14,6 @@ libdate-calc-xs-perl (6.2-1) UNRELEASED; urgency=low
* Bump Standards-Version to 3.9.2, debhelper compatibility to 8
with source format "3.0 (quilt)" (no further changes).
* Ship CREDITS.txt instead of README.txt in docs.
+ * Add SvPV.patch by Ansgar Burchardt.
-- Florian Schlichting <fschlich at zedat.fu-berlin.de> Mon, 12 Sep 2011 22:32:31 +0000
diff --git a/debian/patches/SvPV.patch b/debian/patches/SvPV.patch
new file mode 100644
index 0000000..4730837
--- /dev/null
+++ b/debian/patches/SvPV.patch
@@ -0,0 +1,104 @@
+From: Ansgar Burchardt <ansgar at 43-1.org>
+Date: Thu, 26 Aug 2010 17:08:56 +0900
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/558272
+Bug: https://rt.cpan.org/Ticket/Display.html?id=60233
+Subject: Use SvPV to strigify the SV in case it is not already a string
+
+--- libdate-calc-perl.orig/XS.xs
++++ libdate-calc-perl/XS.xs
+@@ -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 && (var = (charptr)SvPV(ref,len)) )
+
+ #define DATECALC_SCALAR(ref,typ,var) \
+ ( ref && !(SvROK(ref)) && ((var = (typ)SvIV(ref)) | 1) )
+@@ -1268,7 +1266,7 @@
+ PPCODE:
+ {
+ charptr string;
+- N_int length;
++ STRLEN length;
+ Z_int lang;
+
+ if ((items == 1) or (items == 2))
+@@ -1295,7 +1293,7 @@
+ PPCODE:
+ {
+ charptr string;
+- N_int length;
++ STRLEN length;
+ Z_int lang;
+
+ if ((items == 1) or (items == 2))
+@@ -1333,7 +1331,7 @@
+ PPCODE:
+ {
+ charptr string;
+- N_int length;
++ STRLEN length;
+ Z_int lang;
+ Z_int year;
+ Z_int month;
+@@ -1369,7 +1367,7 @@
+ PPCODE:
+ {
+ charptr string;
+- N_int length;
++ STRLEN length;
+ Z_int lang;
+ Z_int year;
+ Z_int month;
+@@ -1780,8 +1778,8 @@
+ {
+ charptr string;
+ charptr buffer;
+- N_int length;
+- N_int index;
++ STRLEN length;
++ STRLEN index;
+
+ if ( DATECALC_STRING(scalar,string,length) )
+ {
+@@ -1808,8 +1806,8 @@
+ {
+ charptr string;
+ charptr buffer;
+- N_int length;
+- N_int index;
++ STRLEN length;
++ STRLEN index;
+
+ if ( DATECALC_STRING(scalar,string,length) )
+ {
+--- /dev/null
++++ libdate-calc-perl/t/debian-558272.t
+@@ -0,0 +1,23 @@
++#! /usr/bin/perl
++
++use strict;
++use warnings;
++
++use Test::More 0.88;
++use Test::Exception;
++
++use_ok("Date::Calc");
++
++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();
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1ff5bd8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+SvPV.patch
--
Debian packaging of libdate-calc-xs-perl
More information about the Pkg-perl-cvs-commits
mailing list