summaryrefslogblamecommitdiff
path: root/user/perl-type-tiny/fix-32-bit-regression.patch
blob: 4819b1b5ff90cdbac4df3fd10436e69d4c51137a (plain) (tree)


































                                                                             
Upstream: https://github.com/tobyink/p5-type-tiny/issues/128

From 98304a7a34bff67c2b3d36b089f31f3585cc7455 Mon Sep 17 00:00:00 2001
From: Toby Inkster <mail@tobyinkster.co.uk>
Date: Fri, 20 Jan 2023 11:14:37 +0000
Subject: [PATCH] Bug fix

---
 lib/Type/Tie.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/Type/Tie.pm b/lib/Type/Tie.pm
index 45b5ec35..61291503 100644
--- a/lib/Type/Tie.pm
+++ b/lib/Type/Tie.pm
@@ -144,17 +144,16 @@ use Scalar::Util ();
 		$tmp_clone_types{$refaddr} ||= [ $type, 0 ];
 		++$tmp_clone_types{$refaddr}[1];
 		
-		return ( pack( 'j', $refaddr ), $o->_REF );
+		return ( $refaddr, $o->_REF );
 	}
 	
 	sub STORABLE_thaw {
-		my ( $o, $cloning, $packedRefaddr, $o2 ) = @_;
+		my ( $o, $cloning, $refaddr, $o2 ) = @_;
 		Carp::croak( "Storable::thaw only supported for dclone-ing" )
 			unless $cloning;
 		
 		$o->_THAW( $o2 ); # implement in child classes
 		
-		my $refaddr = unpack( 'j', $packedRefaddr );
 		my $type = $tmp_clone_types{$refaddr}[0];
 		--$tmp_clone_types{$refaddr}[1]
 			or delete $tmp_clone_types{$refaddr};