diff options
author | drh <drh@noemail.net> | 2004-08-20 18:34:20 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2004-08-20 18:34:20 +0000 |
commit | 92febd92ad5558a0c31273b48f32014e8c29e479 (patch) | |
tree | 651da36b62262e0da63be60734cbcc910007ff54 /src/vdbeapi.c | |
parent | 895d7472264d0f406779449f71b12ef2e9aea2fe (diff) | |
download | sqlite-92febd92ad5558a0c31273b48f32014e8c29e479.tar.gz sqlite-92febd92ad5558a0c31273b48f32014e8c29e479.zip |
Tcl interface transfers values directly between SQLite and Tcl_Objs, without
at translation to strings. (CVS 1898)
FossilOrigin-Name: e97c331362545ce21117776c7b61d3488668f2bf
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r-- | src/vdbeapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 09a1006b3..2bc31bd23 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -520,7 +520,8 @@ int sqlite3_bind_text16( ** This routine is added to support DBD::SQLite. */ int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ - return ((Vdbe*)pStmt)->nVar; + Vdbe *p = (Vdbe*)pStmt; + return p ? p->nVar : 0; } /* @@ -531,7 +532,7 @@ int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){ */ const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){ Vdbe *p = (Vdbe*)pStmt; - if( i<1 || i>p->nVar ){ + if( p==0 || i<1 || i>p->nVar ){ return 0; } if( !p->okVar ){ |