1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

Test functions tolerate an "0x" before a pointer value. Ticket #452. (CVS 1145)

FossilOrigin-Name: c6c5e07b65ae1c30117f0276a1002d5036697cf1
This commit is contained in:
drh
2003-12-23 03:06:23 +00:00
parent 93a5c6bdf4
commit 90f405e3ba
3 changed files with 13 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
C Use\sa\sbuilt-in\satof()\sfunction\sinstead\sof\sthe\sone\sfrom\sthe\slibrary\sto\navoid\sproblems\swith\slocale.\s\sTicket\s#305.\s(CVS\s1144)
D 2003-12-23T02:17:35
C Test\sfunctions\stolerate\san\s"0x"\sbefore\sa\spointer\svalue.\s\sTicket\s#452.\s(CVS\s1145)
D 2003-12-23T03:06:23
F Makefile.in 0515ff9218ad8d5a8f6220f0494b8ef94c67013b
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -53,7 +53,7 @@ F src/sqlite.h.in e6cfff01fafc8a82ce82cd8c932af421dc9adb54
F src/sqliteInt.h a70744a84caec6d48017143ea5b9f945867e539e
F src/table.c d845cb101b5afc1f7fea083c99e3d2fa7998d895
F src/tclsqlite.c dcd18d1f0d51ac4863d1f9059f614f903bc1fffe
F src/test1.c ba47a3e50379a1356acbc9a3388ad5eced85b740
F src/test1.c 169f662965e1130b4119e4b68ca7fb19fb3be993
F src/test2.c 5014337d8576b731cce5b5a14bec4f0daf432700
F src/test3.c 30985ebdfaf3ee1462a9b0652d3efbdc8d9798f5
F src/test4.c dcbbbb382626fd466a7c46907f74db35fc8bad64
@@ -179,7 +179,7 @@ F www/speed.tcl 2f6b1155b99d39adb185f900456d1d592c4832b3
F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
P 06db29df8f0c1cd29e696537e622f0c5456056f5
R 9d798a5665b47753acb63650cff0e583
P 4d9edbc50f7dee64edbadad2e2dc4f93d8248b3b
R e78cc5676ccc4eae1ef13e1cbefdf7e8
U drh
Z 5b1d9472f20aec057f316ff1b43aed10
Z 2c02f4b435e2dadedef60f34ed1da32e

View File

@@ -1 +1 @@
4d9edbc50f7dee64edbadad2e2dc4f93d8248b3b
c6c5e07b65ae1c30117f0276a1002d5036697cf1

View File

@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
** $Id: test1.c,v 1.29 2003/12/23 02:17:35 drh Exp $
** $Id: test1.c,v 1.30 2003/12/23 03:06:23 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -30,9 +30,11 @@
/*
** Decode a pointer to an sqlite object.
*/
static int getDbPointer(Tcl_Interp *interp, const char *zArg, sqlite **ppDb){
if( sscanf(zArg, PTR_FMT, (void**)ppDb)!=1 ){
Tcl_AppendResult(interp, "\"", zArg, "\" is not a valid pointer value", 0);
static int getDbPointer(Tcl_Interp *interp, const char *zA, sqlite **ppDb){
if( sscanf(zA, PTR_FMT, (void**)ppDb)!=1 &&
(zA[0]!='0' || zA[1]!='x' || sscanf(&zA[2], PTR_FMT, (void**)ppDb)!=1)
){
Tcl_AppendResult(interp, "\"", zA, "\" is not a valid pointer value", 0);
return TCL_ERROR;
}
return TCL_OK;