mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 06:38:12 -04:00
another patch from Yuriy Kaminskiy to fix truncated integer
This commit is contained in:
parent
0970b639ba
commit
aeb99721d1
1 changed files with 4 additions and 0 deletions
4
dbdimp.c
4
dbdimp.c
|
@ -146,7 +146,11 @@ sqlite_set_result(pTHX_ sqlite3_context *context, SV *result, int is_error)
|
||||||
sqlite3_result_text( context, s, len, SQLITE_TRANSIENT );
|
sqlite3_result_text( context, s, len, SQLITE_TRANSIENT );
|
||||||
}
|
}
|
||||||
else if ( SvIOK(result) ) {
|
else if ( SvIOK(result) ) {
|
||||||
|
#if defined(USE_64_BIT_INT)
|
||||||
|
sqlite3_result_int64( context, SvIV(result));
|
||||||
|
#else
|
||||||
sqlite3_result_int( context, SvIV(result));
|
sqlite3_result_int( context, SvIV(result));
|
||||||
|
#endif
|
||||||
} else if ( SvNOK(result) && ( sizeof(NV) == sizeof(double) || SvNVX(result) == (double) SvNVX(result) ) ) {
|
} else if ( SvNOK(result) && ( sizeof(NV) == sizeof(double) || SvNVX(result) == (double) SvNVX(result) ) ) {
|
||||||
sqlite3_result_double( context, SvNV(result));
|
sqlite3_result_double( context, SvNV(result));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue