1
0
Fork 0
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:
Kenichi Ishigaki 2020-11-23 21:16:26 +09:00
parent 7c01d15368
commit d380158688
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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;