Fix a possible mis-unpack on int64

This commit is contained in:
gfx 2010-09-15 13:09:14 +09:00
parent 10bf3ee9de
commit 6981234736

View File

@ -111,7 +111,11 @@ STATIC_INLINE int template_callback_int32(unpack_user* u PERL_UNUSED_DECL, int32
STATIC_INLINE int template_callback_int64(unpack_user* u PERL_UNUSED_DECL, int64_t d, SV** o)
{
dTHX;
#if IVSIZE==4
*o = sv_2mortal(newSVnv(d));
#else
*o = sv_2mortal(newSViv(d));
#endif
return 0;
}