aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authorshane <shane@noemail.net>2009-02-04 03:59:25 +0000
committershane <shane@noemail.net>2009-02-04 03:59:25 +0000
commitfbd60f826d0276401c6dd3d085ce4ebb7843836e (patch)
treed841324093c9e0c02e0268fcb52baab06a5e48a3 /src/expr.c
parent63207ab2623be80c0a63c777f71e86d81d732f1d (diff)
downloadsqlite-fbd60f826d0276401c6dd3d085ce4ebb7843836e.tar.gz
sqlite-fbd60f826d0276401c6dd3d085ce4ebb7843836e.zip
Changes to completely remove all floating point ops if SQLITE_OMIT_FLOATING_POINT defined. Note that w/o fp, date/time, round, nan, etc. are all gone or limited in functionality. Updated some of the test scripts to support missing fp and 64-bit functionality. Ticket #3029. (CVS 6250)
FossilOrigin-Name: 5cef400023205b55152b91441acc78f9cd8d58a9
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/expr.c b/src/expr.c
index 746b598a8..8960a7ad9 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.410 2009/01/20 16:53:40 danielk1977 Exp $
+** $Id: expr.c,v 1.411 2009/02/04 03:59:25 shane Exp $
*/
#include "sqliteInt.h"
@@ -1932,12 +1932,10 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
case TK_UMINUS: {
Expr *pLeft = pExpr->pLeft;
assert( pLeft );
- if( pLeft->op==TK_FLOAT || pLeft->op==TK_INTEGER ){
- if( pLeft->op==TK_FLOAT ){
- codeReal(v, (char*)pLeft->token.z, pLeft->token.n, 1, target);
- }else{
- codeInteger(v, pLeft, 1, target);
- }
+ if( pLeft->op==TK_FLOAT ){
+ codeReal(v, (char*)pLeft->token.z, pLeft->token.n, 1, target);
+ }else if( pLeft->op==TK_INTEGER ){
+ codeInteger(v, pLeft, 1, target);
}else{
regFree1 = r1 = sqlite3GetTempReg(pParse);
sqlite3VdbeAddOp2(v, OP_Integer, 0, r1);