/ Check-in [a21d1dde]
Login

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

Overview
Comment:Add some static to the 'regexp' extension.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a21d1dde73f811244b5b43f9fed5877263a9c5061470221f417e501f5530edfa
User & Date: mistachkin 2019-08-13 20:34:35
Context
2019-08-14
15:17
Always check for reads past the end of the file on the in-memory journal driver. This used to be an assert(). check-in: 4d41ca7d user: drh tags: trunk
2019-08-13
20:34
Add some static to the 'regexp' extension. check-in: a21d1dde user: mistachkin tags: trunk
17:56
Update test cases so that they work with ICU enabled. check-in: 408144a1 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/regexp.c.

   606    606     return 0;
   607    607   }
   608    608   
   609    609   /* Free and reclaim all the memory used by a previously compiled
   610    610   ** regular expression.  Applications should invoke this routine once
   611    611   ** for every call to re_compile() to avoid memory leaks.
   612    612   */
   613         -void re_free(ReCompiled *pRe){
          613  +static void re_free(ReCompiled *pRe){
   614    614     if( pRe ){
   615    615       sqlite3_free(pRe->aOp);
   616    616       sqlite3_free(pRe->aArg);
   617    617       sqlite3_free(pRe);
   618    618     }
   619    619   }
   620    620   
   621    621   /*
   622    622   ** Compile a textual regular expression in zIn[] into a compiled regular
   623    623   ** expression suitable for us by re_match() and return a pointer to the
   624    624   ** compiled regular expression in *ppRe.  Return NULL on success or an
   625    625   ** error message if something goes wrong.
   626    626   */
   627         -const char *re_compile(ReCompiled **ppRe, const char *zIn, int noCase){
          627  +static const char *re_compile(ReCompiled **ppRe, const char *zIn, int noCase){
   628    628     ReCompiled *pRe;
   629    629     const char *zErr;
   630    630     int i, j;
   631    631   
   632    632     *ppRe = 0;
   633    633     pRe = sqlite3_malloc( sizeof(*pRe) );
   634    634     if( pRe==0 ){