You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/03/27 18:51:59 UTC
[lucy-commits] svn commit: r1085986 -
/incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/TypeMap.pm
Author: marvin
Date: Sun Mar 27 16:51:59 2011
New Revision: 1085986
URL: http://svn.apache.org/viewvc?rev=1085986&view=rev
Log:
Add casts to quiet some MSVC loss-of-precision warnings.
Modified:
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/TypeMap.pm
Modified: incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/TypeMap.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/TypeMap.pm?rev=1085986&r1=1085985&r2=1085986&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/TypeMap.pm (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/TypeMap.pm Sun Mar 27 16:51:59 2011
@@ -54,17 +54,17 @@ my %primitives_to_perl = (
short => sub {"newSViv( $_[0] )"},
long => sub {
"((sizeof(long) <= sizeof(IV)) ? "
- . "newSViv($_[0]) : newSVnv((NV)$_[0]))";
+ . "newSViv((IV)$_[0]) : newSVnv((NV)$_[0]))";
},
size_t => sub {"newSViv( $_[0] )"},
uint64_t => sub {
- "sizeof(UV) == 8 ? newSVuv($_[0]) : newSVnv((NV)$_[0])";
+ "sizeof(UV) == 8 ? newSVuv((UV)$_[0]) : newSVnv((NV)$_[0])";
},
uint32_t => sub {"newSVuv( $_[0] )"},
uint16_t => sub {"newSVuv( $_[0] )"},
uint8_t => sub {"newSVuv( $_[0] )"},
int64_t => sub {
- "sizeof(IV) == 8 ? newSViv($_[0]) : newSVnv((NV)$_[0])";
+ "sizeof(IV) == 8 ? newSViv((IV)$_[0]) : newSVnv((NV)$_[0])";
},
int32_t => sub {"newSViv( $_[0] )"},
int16_t => sub {"newSViv( $_[0] )"},