summaryrefslogtreecommitdiff
path: root/chromium/third_party/sqlite/src/ext/fts3/fts3.c
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-08-01 11:44:21 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-08-01 09:49:25 +0000
commit9a05d0e4db172168e429f30bc8ed62b695006490 (patch)
tree6a7a6b2f7e3410bb9ddc3ef9a200156f2bf623e1 /chromium/third_party/sqlite/src/ext/fts3/fts3.c
parent6ec7b8da05d21a3878bd21c691b41e675d74bb1c (diff)
downloadqtwebengine-chromium-9a05d0e4db172168e429f30bc8ed62b695006490.tar.gz
BASELINE: Update Chromium to 60.0.3112.78
Change-Id: I58f9d14bddb9104a666b6ef869944111ee7eadb8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/sqlite/src/ext/fts3/fts3.c')
-rw-r--r--chromium/third_party/sqlite/src/ext/fts3/fts3.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/chromium/third_party/sqlite/src/ext/fts3/fts3.c b/chromium/third_party/sqlite/src/ext/fts3/fts3.c
index 82776988161..5d2f21d2937 100644
--- a/chromium/third_party/sqlite/src/ext/fts3/fts3.c
+++ b/chromium/third_party/sqlite/src/ext/fts3/fts3.c
@@ -3347,9 +3347,8 @@ static int fts3ColumnMethod(
sqlite3_result_int64(pCtx, pCsr->iPrevId);
}else if( iCol==p->nColumn ){
/* The extra column whose name is the same as the table.
- ** Return a blob which is a pointer to the cursor. */
- sqlite3_result_blob(pCtx, &pCsr, sizeof(pCsr), SQLITE_TRANSIENT);
- sqlite3_result_subtype(pCtx, '3');
+ ** Return a pointer to the cursor. */
+ sqlite3_result_pointer(pCtx, pCsr);
}else if( iCol==p->nColumn+2 && pCsr->pExpr ){
sqlite3_result_int64(pCtx, pCsr->iLangid);
}else{
@@ -3561,17 +3560,13 @@ static int fts3FunctionArg(
sqlite3_value *pVal, /* argv[0] passed to function */
Fts3Cursor **ppCsr /* OUT: Store cursor handle here */
){
- Fts3Cursor *pRet;
- if( sqlite3_value_type(pVal)!=SQLITE_BLOB
- || sqlite3_value_subtype(pVal)!='3'
- || sqlite3_value_bytes(pVal)!=sizeof(Fts3Cursor *)
- ){
+ Fts3Cursor *pRet = (Fts3Cursor*)sqlite3_value_pointer(pVal);
+ if( pRet==0 ){
char *zErr = sqlite3_mprintf("illegal first argument to %s", zFunc);
sqlite3_result_error(pContext, zErr, -1);
sqlite3_free(zErr);
return SQLITE_ERROR;
}
- memcpy(&pRet, sqlite3_value_blob(pVal), sizeof(Fts3Cursor *));
*ppCsr = pRet;
return SQLITE_OK;
}