mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
Use quadmath_snprintf if USE_QUADMATH is defined
This commit is contained in:
parent
7c01d15368
commit
d380158688
2 changed files with 6 additions and 1 deletions
1
Changes
1
Changes
|
@ -2,6 +2,7 @@ Changes for Perl extension DBD-SQLite
|
|||
|
||||
1.67_01 to be released
|
||||
- Switched to XSLoader (GH#63; toddr++)
|
||||
- Use quadmath_snprintf if USE_QUADMATH is defined
|
||||
|
||||
1.66 2020-08-30
|
||||
- Switched to a production version
|
||||
|
|
6
dbdimp.c
6
dbdimp.c
|
@ -404,7 +404,11 @@ sqlite_is_number(pTHX_ const char *v, int sql_type)
|
|||
if (!_sqlite_atoi64(v, &iv)) return 1;
|
||||
}
|
||||
if (sql_type != SQLITE_INTEGER) {
|
||||
sprintf(format, (has_plus ? "+%%.%df" : "%%.%df"), precision);
|
||||
#ifdef USE_QUADMATH
|
||||
quadmath_snprintf(format, (has_plus ? 7 : 6), (has_plus ? "+%%.%df" : "%%.%df"), precision);
|
||||
#else
|
||||
sprintf(format, (has_plus ? "+%%.%dF" : "%%.%dF"), precision);
|
||||
#endif
|
||||
if (strEQ(form(format, atof(v)), v)) return 2;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue