/ Check-in [e9e76e12]
Login

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

Overview
Comment:Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amalg-json1-fts5
Files: files | file ages | folders
SHA1: e9e76e12812b9b42b1142246b71cea98e26903aa
User & Date: dan 2015-10-08 20:11:42
Context
2015-10-08
20:28
Fix two more warnings in fts5 code. check-in: 5343e601 user: dan tags: amalg-json1-fts5
20:11
Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror. check-in: e9e76e12 user: dan tags: amalg-json1-fts5
19:29
First attempt to add json1 and fts5 to the amalgamation. This check-in does not compile. check-in: d820a1bd user: drh tags: amalg-json1-fts5
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/fts5_main.c.

  2460   2460   int sqlite3_fts_init(
  2461   2461     sqlite3 *db,
  2462   2462     char **pzErrMsg,
  2463   2463     const sqlite3_api_routines *pApi
  2464   2464   ){
  2465   2465     SQLITE_EXTENSION_INIT2(pApi);
  2466   2466     (void)pzErrMsg;  /* Unused parameter */
  2467         -  return sqlite3FtsInit(db);
         2467  +  return sqlite3Fts5Init(db);
  2468   2468   }
  2469   2469   
  2470   2470   #ifdef _WIN32
  2471   2471   __declspec(dllexport)
  2472   2472   #endif
  2473   2473   int sqlite3_fts5_init(
  2474   2474     sqlite3 *db,
  2475   2475     char **pzErrMsg,
  2476   2476     const sqlite3_api_routines *pApi
  2477   2477   ){
  2478   2478     SQLITE_EXTENSION_INIT2(pApi);
  2479   2479     (void)pzErrMsg;  /* Unused parameter */
  2480         -  return sqlite3FtsInit(db);
         2480  +  return sqlite3Fts5Init(db);
  2481   2481   }

Changes to ext/fts5/fts5_tcl.c.

   972    972   
   973    973   static int f5tTokenHash(
   974    974     void * clientData,
   975    975     Tcl_Interp *interp,
   976    976     int objc,
   977    977     Tcl_Obj *CONST objv[]
   978    978   ){
   979         -  int bOld = sqlite3_fts5_may_be_corrupt;
   980    979     char *z;
   981    980     int n;
   982    981     unsigned int iVal;
   983    982     int nSlot;
   984    983   
   985    984     if( objc!=3 ){
   986    985       Tcl_WrongNumArgs(interp, 1, objv, "NSLOT TOKEN");

Changes to src/main.c.

  2634   2634       zFile = 0;
  2635   2635     }
  2636   2636     *pFlags = flags;
  2637   2637     *pzFile = zFile;
  2638   2638     return rc;
  2639   2639   }
  2640   2640   
         2641  +#ifdef SQLITE_ENABLE_FTS5
         2642  +#ifdef SQLITE_AMALGAMATION
         2643  +static int sqlite3Fts5Init(sqlite3*);
         2644  +#else
         2645  +extern int sqlite3Fts5Init(sqlite3*);
         2646  +#endif
         2647  +#endif
  2641   2648   
  2642   2649   /*
  2643   2650   ** This routine does the work of opening a database on behalf of
  2644   2651   ** sqlite3_open() and sqlite3_open16(). The database filename "zFilename"  
  2645   2652   ** is UTF-8 encoded.
  2646   2653   */
  2647   2654   static int openDatabase(
................................................................................
  2876   2883     if( !db->mallocFailed && rc==SQLITE_OK ){
  2877   2884       rc = sqlite3Fts3Init(db);
  2878   2885     }
  2879   2886   #endif
  2880   2887   
  2881   2888   #ifdef SQLITE_ENABLE_FTS5
  2882   2889     if( !db->mallocFailed && rc==SQLITE_OK ){
  2883         -    extern int sqlite3Fts5Init(sqlite3*);
  2884   2890       rc = sqlite3Fts5Init(db);
  2885   2891     }
  2886   2892   #endif
  2887   2893   
  2888   2894   #ifdef SQLITE_ENABLE_ICU
  2889   2895     if( !db->mallocFailed && rc==SQLITE_OK ){
  2890   2896       rc = sqlite3IcuInit(db);