diff options
author | danielk1977 <danielk1977@noemail.net> | 2004-05-27 13:35:19 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2004-05-27 13:35:19 +0000 |
commit | 3fd0a736bfa81524e7bba6152e5b868c5925aba8 (patch) | |
tree | a185ccc46aeaa11fda65ee85f6073ff6a147481e /src/tclsqlite.c | |
parent | 30ccda10064df7a13249d500c6acc2f789585677 (diff) | |
download | sqlite-3fd0a736bfa81524e7bba6152e5b868c5925aba8.tar.gz sqlite-3fd0a736bfa81524e7bba6152e5b868c5925aba8.zip |
A couple of test cases and fixes for blob literals. (CVS 1474)
FossilOrigin-Name: 6d552af67cf6fa6935373ba39de5c47ebf613eb9
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index a8dc7c09b..29e609303 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.74 2004/05/27 12:11:32 danielk1977 Exp $ +** $Id: tclsqlite.c,v 1.75 2004/05/27 13:35:20 danielk1977 Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -815,10 +815,8 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ if( SQLITE3_BLOB!=sqlite3_column_type(pStmt, i) ){ pVal = Tcl_NewStringObj(sqlite3_column_text(pStmt, i), -1); }else{ - pVal = Tcl_NewByteArrayObj( - sqlite3_column_blob(pStmt, i), - sqlite3_column_bytes(pStmt, i) - ); + int bytes = sqlite3_column_bytes(pStmt, i); + pVal = Tcl_NewByteArrayObj(sqlite3_column_blob(pStmt, i), bytes); } if( objc==5 ){ |