aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2005-06-25 18:42:14 +0000
committerdrh <drh@noemail.net>2005-06-25 18:42:14 +0000
commit487e262f44a6919e7bbac75af4dc8306e382b30b (patch)
treeed1177ea8c14d24bf311848182fce9ec96cb8307 /src/util.c
parent7f057c9166a1c8e13bda74b3db7ee488659ae7fb (diff)
downloadsqlite-487e262f44a6919e7bbac75af4dc8306e382b30b.tar.gz
sqlite-487e262f44a6919e7bbac75af4dc8306e382b30b.zip
Remove the blob(), text() and numeric() functions added in (2524) and
replace them with the standard CAST operator. Ticket #1287. (CVS 2527) FossilOrigin-Name: 17631785f9ee8ab280c82677eb53886912e085bc
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index 23794123e..80fc41da2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
-** $Id: util.c,v 1.137 2005/06/14 16:04:06 drh Exp $
+** $Id: util.c,v 1.138 2005/06/25 18:42:15 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -565,8 +565,9 @@ int sqlite3IsNumber(const char *z, int *realnum, u8 enc){
** of "." depending on how locale is set. But that would cause problems
** for SQL. So this routine always uses "." regardless of locale.
*/
-double sqlite3AtoF(const char *z, const char **pzEnd){
+int sqlite3AtoF(const char *z, double *pResult){
int sign = 1;
+ const char *zBegin = z;
LONGDOUBLE_TYPE v1 = 0.0;
if( *z=='-' ){
sign = -1;
@@ -613,8 +614,8 @@ double sqlite3AtoF(const char *z, const char **pzEnd){
v1 *= scale;
}
}
- if( pzEnd ) *pzEnd = z;
- return sign<0 ? -v1 : v1;
+ *pResult = sign<0 ? -v1 : v1;
+ return z - zBegin;
}
/*