projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0ddbfb
)
Fix bad pointer size in has_trailing_nul
author
Eric Brine
<ikegami@adaelis.com>
Tue, 24 Jan 2012 02:55:52 +0000
(18:55 -0800)
committer
Karl Williamson
<public@khwilliamson.com>
Tue, 24 Jan 2012 03:20:07 +0000
(20:20 -0700)
ext/PerlIO-scalar/t/scalar.t
patch
|
blob
|
history
diff --git
a/ext/PerlIO-scalar/t/scalar.t
b/ext/PerlIO-scalar/t/scalar.t
index
ccf66dd
..
3a8fca1
100644
(file)
--- a/
ext/PerlIO-scalar/t/scalar.t
+++ b/
ext/PerlIO-scalar/t/scalar.t
@@
-328,8
+328,9
@@
sub has_trailing_nul(\$) {
my $len = $sv->LEN;
return 0 if $cur >= $len;
- my $pv_addr = unpack 'J', pack 'P', $$ref;
- my $trailing = unpack 'P', pack 'J', $pv_addr+$cur;
+ my $ptrfmt = $Config::Config{ptrsize} == $Config::Config{intsize} ? "I" : "J";
+ my $pv_addr = unpack $ptrfmt, pack 'P', $$ref;
+ my $trailing = unpack 'P', pack $ptrfmt, $pv_addr+$cur;
return $trailing eq "\0";
}
SKIP: {