Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: third_party/sqlite/src/ext/misc/vtshim.c

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/ext/misc/vfsstat.c ('k') | third_party/sqlite/src/ext/rbu/rbu.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** 2013-06-12 2 ** 2013-06-12
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 pNew = sqlite3_malloc( sizeof(*pNew) ); 89 pNew = sqlite3_malloc( sizeof(*pNew) );
90 *ppVtab = (sqlite3_vtab*)pNew; 90 *ppVtab = (sqlite3_vtab*)pNew;
91 if( pNew==0 ) return SQLITE_NOMEM; 91 if( pNew==0 ) return SQLITE_NOMEM;
92 memset(pNew, 0, sizeof(*pNew)); 92 memset(pNew, 0, sizeof(*pNew));
93 rc = pAux->pMod->xCreate(db, pAux->pChildAux, argc, argv, 93 rc = pAux->pMod->xCreate(db, pAux->pChildAux, argc, argv,
94 &pNew->pChild, pzErr); 94 &pNew->pChild, pzErr);
95 if( rc ){ 95 if( rc ){
96 sqlite3_free(pNew); 96 sqlite3_free(pNew);
97 *ppVtab = 0; 97 *ppVtab = 0;
98 return rc;
98 } 99 }
99 pNew->pAux = pAux; 100 pNew->pAux = pAux;
100 pNew->ppPrev = &pAux->pAllVtab; 101 pNew->ppPrev = &pAux->pAllVtab;
101 pNew->pNext = pAux->pAllVtab; 102 pNew->pNext = pAux->pAllVtab;
102 if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext; 103 if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext;
103 pAux->pAllVtab = pNew; 104 pAux->pAllVtab = pNew;
104 return rc; 105 return rc;
105 } 106 }
106 107
107 static int vtshimConnect( 108 static int vtshimConnect(
(...skipping 18 matching lines...) Expand all
126 } 127 }
127 pNew = sqlite3_malloc( sizeof(*pNew) ); 128 pNew = sqlite3_malloc( sizeof(*pNew) );
128 *ppVtab = (sqlite3_vtab*)pNew; 129 *ppVtab = (sqlite3_vtab*)pNew;
129 if( pNew==0 ) return SQLITE_NOMEM; 130 if( pNew==0 ) return SQLITE_NOMEM;
130 memset(pNew, 0, sizeof(*pNew)); 131 memset(pNew, 0, sizeof(*pNew));
131 rc = pAux->pMod->xConnect(db, pAux->pChildAux, argc, argv, 132 rc = pAux->pMod->xConnect(db, pAux->pChildAux, argc, argv,
132 &pNew->pChild, pzErr); 133 &pNew->pChild, pzErr);
133 if( rc ){ 134 if( rc ){
134 sqlite3_free(pNew); 135 sqlite3_free(pNew);
135 *ppVtab = 0; 136 *ppVtab = 0;
137 return rc;
136 } 138 }
137 pNew->pAux = pAux; 139 pNew->pAux = pAux;
138 pNew->ppPrev = &pAux->pAllVtab; 140 pNew->ppPrev = &pAux->pAllVtab;
139 pNew->pNext = pAux->pAllVtab; 141 pNew->pNext = pAux->pAllVtab;
140 if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext; 142 if( pAux->pAllVtab ) pAux->pAllVtab->ppPrev = &pNew->pNext;
141 pAux->pAllVtab = pNew; 143 pAux->pAllVtab = pNew;
142 return rc; 144 return rc;
143 } 145 }
144 146
145 static int vtshimBestIndex( 147 static int vtshimBestIndex(
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 __declspec(dllexport) 544 __declspec(dllexport)
543 #endif 545 #endif
544 int sqlite3_vtshim_init( 546 int sqlite3_vtshim_init(
545 sqlite3 *db, 547 sqlite3 *db,
546 char **pzErrMsg, 548 char **pzErrMsg,
547 const sqlite3_api_routines *pApi 549 const sqlite3_api_routines *pApi
548 ){ 550 ){
549 SQLITE_EXTENSION_INIT2(pApi); 551 SQLITE_EXTENSION_INIT2(pApi);
550 return SQLITE_OK; 552 return SQLITE_OK;
551 } 553 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/ext/misc/vfsstat.c ('k') | third_party/sqlite/src/ext/rbu/rbu.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698