1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

another patch from Yuriy Kaminskiy to fix truncated integer

This commit is contained in:
Kenichi Ishigaki 2012-03-24 13:51:25 +00:00
parent 0970b639ba
commit aeb99721d1

View file

@ -146,7 +146,11 @@ sqlite_set_result(pTHX_ sqlite3_context *context, SV *result, int is_error)
sqlite3_result_text( context, s, len, SQLITE_TRANSIENT );
}
else if ( SvIOK(result) ) {
#if defined(USE_64_BIT_INT)
sqlite3_result_int64( context, SvIV(result));
#else
sqlite3_result_int( context, SvIV(result));
#endif
} else if ( SvNOK(result) && ( sizeof(NV) == sizeof(double) || SvNVX(result) == (double) SvNVX(result) ) ) {
sqlite3_result_double( context, SvNV(result));
} else {