Rework the text to numeric conversion routines so that they work with either

UTF8 or UTF16 and do not require a NULL terminator.  This allowed text to
numeric conversion without reallocating the string.

FossilOrigin-Name: 14eed3a0e0a45c6f2904a3a134aa27c159916f7b
This commit is contained in:
drh
2010-09-30 00:50:49 +00:00
parent fac2bd452a
commit 9339da1f22
11 changed files with 134 additions and 161 deletions
+1 -1
View File
@@ -285,7 +285,7 @@ static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
sqlite3_result_error_nomem(context);
return;
}
sqlite3AtoF(zBuf, &r);
sqlite3AtoF(zBuf, &r, sqlite3Strlen30(zBuf), SQLITE_UTF8);
sqlite3_free(zBuf);
}
sqlite3_result_double(context, r);