tag 615571 patch
thanks

On Sun, Feb 27, 2011 at 01:37:54PM +0000, Dominic Hargreaves wrote:
> Package: libclone-fast-perl
> Version: 0.93-1
> Severity: important
> User: [email protected]
> Usertags: perl-5.12-transition
> 
> This package fails to build with Perl 5.12.3:

> t/03scalar.t ... 
> Failed 1/10 subtests 

The attached patch fixes this for me and works on both 5.10.1 and 5.12.3.
-- 
Niko Tyni   [email protected]
>From f35f6e19700b9f0680484fd44c656ad971059c08 Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
Date: Wed, 4 May 2011 21:38:23 +0300
Subject: [PATCH] Use clone_sv() instead of clone_rv() for cloning references
 on newer perls

As of Perl 5.11, SVt_RV is gone and replaced by SVt_IV.

Using clone_sv() instead fixes test 5 of t/03scalar.t failing on 5.12.
---
 Fast.xs |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Fast.xs b/Fast.xs
index 870d1ab..9261717 100644
--- a/Fast.xs
+++ b/Fast.xs
@@ -129,7 +129,11 @@ static sv_clone_t sv_clone_table[] = {
 #endif
 	(sv_clone_t)clone_sv,   // SVt_IV
 	(sv_clone_t)clone_sv,   // SVt_NV
+#if PERL_VERSION < 11
 	(sv_clone_t)clone_rv,   // SVt_RV
+#else
+	(sv_clone_t)clone_sv,   // SVt_IV
+#endif
 	(sv_clone_t)clone_sv,   // SVt_PV
 	(sv_clone_t)clone_sv,   // SVt_PVIV
 	(sv_clone_t)clone_sv,   // SVt_PVNV
-- 
1.7.4.4

Reply via email to