diff options
author | drh <drh@noemail.net> | 2002-02-27 19:00:20 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2002-02-27 19:00:20 +0000 |
commit | 1350b030c146486e58ab3bc0ca825650eaf0ab97 (patch) | |
tree | 50ac025f19fcd6306851b5023e11f1f716210819 /src/expr.c | |
parent | 4e0f995347be40b66bdd8ab14c52367d891173df (diff) | |
download | sqlite-1350b030c146486e58ab3bc0ca825650eaf0ab97.tar.gz sqlite-1350b030c146486e58ab3bc0ca825650eaf0ab97.zip |
Revise the API for user-defined functions. (CVS 398)
FossilOrigin-Name: 633951f0fa11c91f93aa2862df84691750c01e73
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/expr.c b/src/expr.c index 4be07e5f8..563291c98 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.47 2002/02/27 01:53:13 drh Exp $ +** $Id: expr.c,v 1.48 2002/02/27 19:00:21 drh Exp $ */ #include "sqliteInt.h" @@ -1003,7 +1003,7 @@ void sqliteExprCode(Parse *pParse, Expr *pExpr){ sqliteExprCode(pParse, pList->a[i].pExpr); } sqliteVdbeAddOp(v, OP_UserFunc, pList->nExpr, 0); - sqliteVdbeChangeP3(v, -1, (char*)pUser->xFunc, P3_POINTER); + sqliteVdbeChangeP3(v, -1, (char*)pUser, P3_POINTER); break; } default: { @@ -1396,8 +1396,7 @@ UserFunc *sqliteFindUserFunction( ){ UserFunc *pFirst, *p, *pMaybe; pFirst = p = (UserFunc*)sqliteHashFind(&db->userFunc, zName, nName); - if( p==0 ) return 0; - if( !createFlag && nArg<0 ){ + if( p && !createFlag && nArg<0 ){ while( p && p->xFunc==0 && p->xStep==0 ){ p = p->pNext; } return p; } |