aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tclsqlite.c5
-rw-r--r--src/test3.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index 652b2cd2e..fecc6ab58 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -11,7 +11,7 @@
*************************************************************************
** A TCL Interface to SQLite
**
-** $Id: tclsqlite.c,v 1.35 2002/07/06 16:32:15 drh Exp $
+** $Id: tclsqlite.c,v 1.36 2002/07/07 17:12:36 drh Exp $
*/
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
@@ -587,6 +587,9 @@ static int DbMain(void *cd, Tcl_Interp *interp, int argc, char **argv){
/* The return value is the value of the sqlite* pointer
*/
sprintf(zBuf, "%p", p->db);
+ if( strncmp(zBuf,"0x",2) ){
+ sprintf(zBuf, "0x%p", p->db);
+ }
Tcl_AppendResult(interp, zBuf, 0);
/* If compiled with SQLITE_TEST turned on, then register the "md5sum"
diff --git a/src/test3.c b/src/test3.c
index c8bb40d5c..ff447078b 100644
--- a/src/test3.c
+++ b/src/test3.c
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test3.c,v 1.16 2002/07/06 16:32:15 drh Exp $
+** $Id: test3.c,v 1.17 2002/07/07 17:12:36 drh Exp $
*/
#include "sqliteInt.h"
#include "pager.h"
@@ -73,6 +73,9 @@ static int btree_open(
return TCL_ERROR;
}
sprintf(zBuf,"%p", pBt);
+ if( strncmp(zBuf,"0x",2) ){
+ sprintf(zBuf, "0x%p", pBt);
+ }
Tcl_AppendResult(interp, zBuf, 0);
return TCL_OK;
}