The vtshim xCreate and xConnect functions need to store the pAux pointer into the newly created vtable object. Style fixes.
FossilOrigin-Name: 43913c7bd5409791916dfa268258d22f34731273
This commit is contained in:
parent
919aa1af40
commit
aafcef69e2
@ -61,14 +61,15 @@ struct vtshim_cursor {
|
||||
/* Methods for the vtshim module */
|
||||
static int vtshimCreate(
|
||||
sqlite3 *db,
|
||||
void *pPAux,
|
||||
int argc, const char *const*argv,
|
||||
void *ppAux,
|
||||
int argc,
|
||||
const char *const*argv,
|
||||
sqlite3_vtab **ppVtab,
|
||||
char **pzErr
|
||||
){
|
||||
vtshim_aux *pAux = (vtshim_aux*)pPAux;
|
||||
vtshim_aux *pAux = (vtshim_aux*)ppAux;
|
||||
vtshim_vtab *pNew;
|
||||
int rc;
|
||||
int rc;
|
||||
|
||||
assert( db==pAux->db );
|
||||
pNew = sqlite3_malloc( sizeof(*pNew) );
|
||||
@ -81,6 +82,7 @@ static int vtshimCreate(
|
||||
sqlite3_free(pNew);
|
||||
*ppVtab = 0;
|
||||
}
|
||||
pNew->pAux = pAux;
|
||||
pNew->ppPrev = &pAux->pAllVtab;
|
||||
pNew->pNext = pAux->pAllVtab;
|
||||
if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext;
|
||||
@ -90,14 +92,15 @@ static int vtshimCreate(
|
||||
|
||||
static int vtshimConnect(
|
||||
sqlite3 *db,
|
||||
void *pPAux,
|
||||
int argc, const char *const*argv,
|
||||
void *ppAux,
|
||||
int argc,
|
||||
const char *const*argv,
|
||||
sqlite3_vtab **ppVtab,
|
||||
char **pzErr
|
||||
){
|
||||
vtshim_aux *pAux = (vtshim_aux*)pPAux;
|
||||
vtshim_aux *pAux = (vtshim_aux*)ppAux;
|
||||
vtshim_vtab *pNew;
|
||||
int rc;
|
||||
int rc;
|
||||
|
||||
assert( db==pAux->db );
|
||||
pNew = sqlite3_malloc( sizeof(*pNew) );
|
||||
@ -110,6 +113,7 @@ static int vtshimConnect(
|
||||
sqlite3_free(pNew);
|
||||
*ppVtab = 0;
|
||||
}
|
||||
pNew->pAux = pAux;
|
||||
pNew->ppPrev = &pAux->pAllVtab;
|
||||
pNew->pNext = pAux->pAllVtab;
|
||||
if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext;
|
||||
@ -194,8 +198,10 @@ static int vtshimClose(sqlite3_vtab_cursor *pX){
|
||||
|
||||
static int vtshimFilter(
|
||||
sqlite3_vtab_cursor *pX,
|
||||
int idxNum, const char *idxStr,
|
||||
int argc, sqlite3_value **argv
|
||||
int idxNum,
|
||||
const char *idxStr,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
vtshim_cursor *pCur = (vtshim_cursor*)pX;
|
||||
vtshim_vtab *pVtab = (vtshim_vtab*)pCur->base.pVtab;
|
||||
@ -432,8 +438,8 @@ void sqlite3_dispose_module(void *pX){
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
int sqlite3_vtshim_init(
|
||||
sqlite3 *db,
|
||||
char **pzErrMsg,
|
||||
sqlite3 *db,
|
||||
char **pzErrMsg,
|
||||
const sqlite3_api_routines *pApi
|
||||
){
|
||||
SQLITE_EXTENSION_INIT2(pApi);
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Integration\sadjustments\sfor\sthe\svtshim\smodule.
|
||||
D 2013-06-20T00:20:39.235
|
||||
C The\svtshim\sxCreate\sand\sxConnect\sfunctions\sneed\sto\sstore\sthe\spAux\spointer\sinto\sthe\snewly\screated\svtable\sobject.\s\sStyle\sfixes.
|
||||
D 2013-06-20T01:27:51.651
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -115,7 +115,7 @@ F ext/misc/percentile.c 4fb5e46c4312b0be74e8e497ac18f805f0e3e6c5
|
||||
F ext/misc/regexp.c c25c65fe775f5d9801fb8573e36ebe73f2c0c2e0
|
||||
F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a
|
||||
F ext/misc/spellfix.c 6d7ce6105a4b7729f6c44ccdf1ab7e80d9707c02
|
||||
F ext/misc/vtshim.c 5cf883f9c728bdd10aa30c8d1c1be63d0b62fba7
|
||||
F ext/misc/vtshim.c fe8f6f7d8b83a631b95b3cfb9a04dc985812d9da
|
||||
F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212
|
||||
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
|
||||
F ext/rtree/rtree.c 757abea591d4ff67c0ff4e8f9776aeda86b18c14
|
||||
@ -1096,7 +1096,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
F tool/wherecosttest.c 4d0393bdbe7230adb712e925863744dd2b7ffc5b
|
||||
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
|
||||
P 10bba8d0821159a45c6a0d6c3cef897cb4d4e9a6
|
||||
R 24de2c5f1d52b8803f44f37f1161bbcd
|
||||
P bf2e28ddb292ef0b9a1262ec249aed3243dcfb20
|
||||
R 704132a94aa348b6d1fcd7a610d55eca
|
||||
U mistachkin
|
||||
Z adcba7194ddb7aa8bcd6f83d9da3034b
|
||||
Z e214b512264b6021b2a0d7dd8f81d237
|
||||
|
@ -1 +1 @@
|
||||
bf2e28ddb292ef0b9a1262ec249aed3243dcfb20
|
||||
43913c7bd5409791916dfa268258d22f34731273
|
Loading…
Reference in New Issue
Block a user