/ Check-in [3538beac]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix trivial compiler warnings. (CVS 3295)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3538beace8ece6339fe8aaf40852ce5e5e7da283
User & Date: danielk1977 2006-06-26 11:17:51
Context
2006-06-26
12:50
Fix a file descriptor leak following malloc failure on DROP TABLE IF EXISTS. (CVS 3296) check-in: 6a63f76c user: drh tags: trunk
11:17
Fix trivial compiler warnings. (CVS 3295) check-in: 3538beac user: danielk1977 tags: trunk
10:37
Syntax documentation updates. (CVS 3294) check-in: df601a7b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_tclvar.c.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
132
133
134
135
136
137
138

139
140
141
142
143
144
145
** Code for testing the virtual table interfaces.  This code
** is not included in the SQLite library.  It is used for automated
** testing of the SQLite library.
**
** The emphasis of this file is a virtual table that provides
** access to TCL variables.
**
** $Id: test_tclvar.c,v 1.3 2006/06/15 04:28:13 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
#include "os.h"
#include <stdlib.h>
#include <string.h>

................................................................................
  tclvarBestIndex,
  tclvarDisconnect, 
  tclvarDisconnect,
  tclvarOpen,                  /* xOpen - open a cursor */
  tclvarClose,                 /* xClose - close a cursor */
  tclvarFilter,                /* xFilter - configure scan constraints */
  tclvarNext,                  /* xNext - advance a cursor */

  tclvarColumn,                /* xColumn - read data */
  tclvarRowid                  /* xRowid - read data */
};

/*
** Decode a pointer to an sqlite3 object.
*/







|







 







>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
** Code for testing the virtual table interfaces.  This code
** is not included in the SQLite library.  It is used for automated
** testing of the SQLite library.
**
** The emphasis of this file is a virtual table that provides
** access to TCL variables.
**
** $Id: test_tclvar.c,v 1.4 2006/06/26 11:17:51 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
#include "os.h"
#include <stdlib.h>
#include <string.h>

................................................................................
  tclvarBestIndex,
  tclvarDisconnect, 
  tclvarDisconnect,
  tclvarOpen,                  /* xOpen - open a cursor */
  tclvarClose,                 /* xClose - close a cursor */
  tclvarFilter,                /* xFilter - configure scan constraints */
  tclvarNext,                  /* xNext - advance a cursor */
  0,                           /* xEof - check for end of scan */
  tclvarColumn,                /* xColumn - read data */
  tclvarRowid                  /* xRowid - read data */
};

/*
** Decode a pointer to an sqlite3 object.
*/

Changes to src/vdbeaux.c.

846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
  }
  if( pCx->pBt ){
    sqlite3BtreeClose(pCx->pBt);
  }
#ifndef SQLITE_OMIT_VIRTUALTABLE
  if( pCx->pVtabCursor ){
    sqlite3_vtab_cursor *pVtabCursor = pCx->pVtabCursor;
    sqlite3_vtab *pVtab = pVtabCursor->pVtab;
    const sqlite3_module *pModule = pCx->pModule;
    p->inVtabMethod = 1;
    pModule->xClose(pVtabCursor);
    p->inVtabMethod = 0;
  }
#endif
  sqliteFree(pCx->pData);







<







846
847
848
849
850
851
852

853
854
855
856
857
858
859
  }
  if( pCx->pBt ){
    sqlite3BtreeClose(pCx->pBt);
  }
#ifndef SQLITE_OMIT_VIRTUALTABLE
  if( pCx->pVtabCursor ){
    sqlite3_vtab_cursor *pVtabCursor = pCx->pVtabCursor;

    const sqlite3_module *pModule = pCx->pModule;
    p->inVtabMethod = 1;
    pModule->xClose(pVtabCursor);
    p->inVtabMethod = 0;
  }
#endif
  sqliteFree(pCx->pData);

Changes to src/vtab.c.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to help implement virtual tables.
**
** $Id: vtab.c,v 1.24 2006/06/24 09:34:23 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"

/*
** External API function used to create a new virtual-table module.
*/
................................................................................
/*
** This routine takes the module argument that has been accumulating
** in pParse->zArg[] and appends it to the list of arguments on the
** virtual table currently under construction in pParse->pTable.
*/
static void addArgumentToVtab(Parse *pParse){
  if( pParse->sArg.z && pParse->pNewTable ){
    char *z = pParse->sArg.z;
    int n = pParse->sArg.n;
    addModuleArgument(pParse->pNewTable, sqliteStrNDup(z, n));
  }
}

/*
** The parser calls this routine after the CREATE VIRTUAL TABLE statement







|







 







|







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to help implement virtual tables.
**
** $Id: vtab.c,v 1.25 2006/06/26 11:17:51 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"

/*
** External API function used to create a new virtual-table module.
*/
................................................................................
/*
** This routine takes the module argument that has been accumulating
** in pParse->zArg[] and appends it to the list of arguments on the
** virtual table currently under construction in pParse->pTable.
*/
static void addArgumentToVtab(Parse *pParse){
  if( pParse->sArg.z && pParse->pNewTable ){
    const char *z = pParse->sArg.z;
    int n = pParse->sArg.n;
    addModuleArgument(pParse->pNewTable, sqliteStrNDup(z, n));
  }
}

/*
** The parser calls this routine after the CREATE VIRTUAL TABLE statement