mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Change the signature of sqlite3PagerPagecount() so that it can return an error code. (CVS 5195)
FossilOrigin-Name: e9f01c01866d302d81bf9ebc484ea6351cbc0f60
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test2.c,v 1.57 2008/03/21 16:45:48 drh Exp $
|
||||
** $Id: test2.c,v 1.58 2008/06/07 08:58:22 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@@ -305,13 +305,15 @@ static int pager_pagecount(
|
||||
){
|
||||
Pager *pPager;
|
||||
char zBuf[100];
|
||||
int nPage;
|
||||
if( argc!=2 ){
|
||||
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
|
||||
" ID\"", 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
pPager = sqlite3TextToPtr(argv[1]);
|
||||
sqlite3_snprintf(sizeof(zBuf),zBuf,"%d",sqlite3PagerPagecount(pPager));
|
||||
sqlite3PagerPagecount(pPager, &nPage);
|
||||
sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", nPage);
|
||||
Tcl_AppendResult(interp, zBuf, 0);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user