aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2013-03-13 06:48:05 +0000
committermistachkin <mistachkin@noemail.net>2013-03-13 06:48:05 +0000
commitbc3ec28b885654d28add23a8552dfbc3ed28b467 (patch)
tree958982cfa882d7e291537243124a391ba746ff75 /src/func.c
parentee1c64ed25e9f4823327f18bb7e36d4d796606d5 (diff)
downloadsqlite-bc3ec28b885654d28add23a8552dfbc3ed28b467.tar.gz
sqlite-bc3ec28b885654d28add23a8552dfbc3ed28b467.zip
Rename the experimental todouble() function to toreal(), update comments.
FossilOrigin-Name: 12c318ef1b674d1ef347458ce149398885f5ba10
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/func.c b/src/func.c
index 82eba542c..4f0760b37 100644
--- a/src/func.c
+++ b/src/func.c
@@ -970,11 +970,11 @@ static void quoteFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
** change. This function may disappear. Do not write code that depends
** on this function.
**
-** Implementation of the TOINTEGER() function. This function takes a
+** Implementation of the tointeger() function. This function takes a
** single argument. If the argument is an integer or is a double that
** can be losslessly converted to an integer, the return value is the
** same as the argument. If the argument is a double that cannot be
-** losslessly represented as an integer, the return value is undefined.
+** losslessly represented as an integer, the return value is NULL.
** If the argument is NULL, the return value is NULL. Otherwise, an
** attempt is made to convert the argument to an integer. If the
** conversion is successful, the integer value is returned; otherwise,
@@ -1035,18 +1035,18 @@ static void tointegerFunc(
** change. This function may disappear. Do not write code that depends
** on this function.
**
-** Implementation of the TODOUBLE() function. This function takes a
+** Implementation of the toreal() function. This function takes a
** single argument. If the argument is a double or is an integer that
** can be losslessly converted to a double, the return value is the
** same as the argument. If the argument is an integer that cannot be
-** losslessly represented as a double, the return value is undefined.
+** losslessly represented as a double, the return value is NULL.
** If the argument is NULL, the return value is NULL. Otherwise, an
** attempt is made to convert the argument to a double. If the
** conversion is successful, the double value is returned; otherwise,
** NULL is returned.
*/
#ifndef SQLITE_OMIT_FLOATING_POINT
-static void todoubleFunc(
+static void torealFunc(
sqlite3_context *context,
int argc,
sqlite3_value **argv
@@ -1803,7 +1803,7 @@ void sqlite3RegisterGlobalFunctions(void){
FUNCTION(quote, 1, 0, 0, quoteFunc ),
FUNCTION(tointeger, 1, 0, 0, tointegerFunc ),
#ifndef SQLITE_OMIT_FLOATING_POINT
- FUNCTION(todouble, 1, 0, 0, todoubleFunc ),
+ FUNCTION(toreal, 1, 0, 0, torealFunc ),
#endif
FUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid),
FUNCTION(changes, 0, 0, 0, changes ),