]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Revise the amalgamation so that all symbols have file scope except those
authordrh <drh@noemail.net>
Tue, 7 Aug 2007 17:04:59 +0000 (17:04 +0000)
committerdrh <drh@noemail.net>
Tue, 7 Aug 2007 17:04:59 +0000 (17:04 +0000)
that begin with "sqlite3_".  Ticket #2554. (CVS 4197)

FossilOrigin-Name: 73db545289a1a99bd48b22895d2a3ee86540f107

manifest
manifest.uuid
src/expr.c
src/sqliteInt.h
src/utf.c
tool/mksqlite3c.tcl

index a45470b4cce402ea821aa843b6f75be50ede8368..62cc5548f437fabd33d232d05b5fd315a6f78bcb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\ssome\scompiler\swarnings.\s(CVS\s4196)
-D 2007-08-05T23:52:05
+C Revise\sthe\samalgamation\sso\sthat\sall\ssymbols\shave\sfile\sscope\sexcept\sthose\nthat\sbegin\swith\s"sqlite3_".\s\sTicket\s#2554.\s(CVS\s4197)
+D 2007-08-07T17:04:59
 F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -77,7 +77,7 @@ F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675
 F src/date.c 6049db7d5a8fdf2c677ff7d58fa31d4f6593c988
 F src/delete.c 5c0d89b3ef7d48fe1f5124bfe8341f982747fe29
 F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
-F src/expr.c d39d87cf15da59ab87028278d92e3e3064d54605
+F src/expr.c ef4af51136d98c74abf4ff17c2999a7d36519db9
 F src/func.c 28daebcddce30030f167afb3a7ed881a043b98b0
 F src/hash.c 67b23e14f0257b69a3e8aa663e4eeadc1a2b6fd5
 F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
@@ -111,7 +111,7 @@ F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
 F src/shell.c ac29402b538515fa4697282387be9c1205e6e9eb
 F src/sqlite.h.in 8164526b1658a6dad472953ea91239849f913d45
 F src/sqlite3ext.h a27bedc222df5e5f0f458ac99726d0483b953a91
-F src/sqliteInt.h 74ada10135dcfa78d86dd8707968fc5500665909
+F src/sqliteInt.h b31440f39ce978f2397209e0c99653d0b6f235cb
 F src/sqliteLimit.h f14609c27636ebc217c9603ade26dbdd7d0f6afa
 F src/table.c a8de75bcedf84d4060d804264b067ab3b1a3561d
 F src/tclsqlite.c 0d3370e01cd3b313ed29ed6b0ba00423b4329de0
@@ -137,7 +137,7 @@ F src/test_tclvar.c ea4500a60d663f7fdf18fd3210efc112e0c6e7f0
 F src/tokenize.c e959754c67bbd0cf0b03520f7344a536a7ac2915
 F src/trigger.c 420192efe3e6f03addf7897c60c3c8bf913d3493
 F src/update.c 6b10becb6235ea314ed245fbfbf8b38755e3166e
-F src/utf.c c152f99ddccc5e0214a9817aa07ab1b208b43f14
+F src/utf.c 68873142d65d686e59af4886073c0a67a1230171
 F src/util.c 9e81d417fc60bd2fe156f8f2317aa4845bc6cc90
 F src/vacuum.c 8bd895d29e7074e78d4e80f948e35ddc9cf2beef
 F src/vdbe.c cf973bd1af5fbda845b0f759bb06eb19ff42e215
@@ -454,7 +454,7 @@ F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
 F tool/memleak3.tcl 7707006ee908cffff210c98158788d85bb3fcdbf
 F tool/mkkeywordhash.c ef93810fc41fb3d3dbacf9a33a29be88ea99ffa9
 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
-F tool/mksqlite3c.tcl 5d8ed832629acd4f75d088dd0c647dc12c48b1b0
+F tool/mksqlite3c.tcl d7b03011caa20dc685c67b2eae1eda523e85d571
 F tool/mksqlite3internalh.tcl 47737a925fb02fce43e2c0a14b3cc17574a4d44a
 F tool/omittest.tcl e6b3d6a1285f9813bc1dea53bb522b4b72774710
 F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
@@ -523,7 +523,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P e526817f158883f617720fd389741a29454ad483
-R 120f8d4073349b0dabe5d1dc028d9275
+P 6cc15409ad6baefbe6e2214a4ac1cb3a0433f922
+R 6e0675c36cb06d5dc2c18a2cd081b84f
 U drh
-Z d9ed6baaa0c4fdc93345dbb1dbea7133
+Z 192cea5741a9a7e1a096dd8a55907dd3
index 5af73103934106624c78b265da529eac8338865a..4b2cc8b13651d4c60a049a3c8c90e6eff3763de7 100644 (file)
@@ -1 +1 @@
-6cc15409ad6baefbe6e2214a4ac1cb3a0433f922
\ No newline at end of file
+73db545289a1a99bd48b22895d2a3ee86540f107
\ No newline at end of file
index 415b0b951eab2deda7336e8934577a423a5b4ae6..31d0d6abc09531ecd5dfb4abbaebdcfc8cbf4fbb 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: expr.c,v 1.301 2007/07/23 22:51:15 drh Exp $
+** $Id: expr.c,v 1.302 2007/08/07 17:04:59 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -177,7 +177,7 @@ static int binaryCompareP1(Expr *pExpr1, Expr *pExpr2, int jumpIfNull){
 ** Argument pRight (but not pLeft) may be a null pointer. In this case,
 ** it is not considered.
 */
-CollSeqsqlite3BinaryCompareCollSeq(
+CollSeq *sqlite3BinaryCompareCollSeq(
   Parse *pParse, 
   Expr *pLeft, 
   Expr *pRight
index 05b043d58d060e5f74558f25bfeea9de5dee4e73..30a8042827087330d8de7ee69f59a13d61d138cd 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.581 2007/08/05 23:52:05 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.582 2007/08/07 17:04:59 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -1922,7 +1922,7 @@ FuncDef *sqlite3VtabOverloadFunction(FuncDef*, int nArg, Expr*);
 void sqlite3InvalidFunction(sqlite3_context*,int,sqlite3_value**);
 int sqlite3Reprepare(Vdbe*);
 void sqlite3ExprListCheckLength(Parse*, ExprList*, int, const char*);
-CollSeqsqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);
+CollSeq *sqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);
 
 #if SQLITE_MAX_EXPR_DEPTH>0
   void sqlite3ExprSetHeight(Expr *);
index fe33e02c3904d01719d292ec44842b2ed859967e..914d6472803683ba49ec8ca24fab927d9e8529b4 100644 (file)
--- a/src/utf.c
+++ b/src/utf.c
@@ -12,7 +12,7 @@
 ** This file contains routines used to translate between UTF-8, 
 ** UTF-16, UTF-16BE, and UTF-16LE.
 **
-** $Id: utf.c,v 1.52 2007/07/23 19:12:42 drh Exp $
+** $Id: utf.c,v 1.53 2007/08/07 17:04:59 drh Exp $
 **
 ** Notes on UTF-8:
 **
@@ -49,7 +49,7 @@ const int sqlite3one = 1;
 ** This lookup table is used to help decode the first byte of
 ** a multi-byte UTF8 character.
 */
-const unsigned char sqlite3UtfTrans1[] = {
+static const unsigned char sqlite3UtfTrans1[] = {
   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
   0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
   0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
index 8c97d133b15948b3f0e724be158761fba52f324c..175a45b49abb9a1210ae7d9453c0a016d1f56aef 100644 (file)
@@ -129,6 +129,7 @@ proc copy_file {filename} {
   set tail [file tail $filename]
   section_comment "Begin file $tail"
   set in [open $filename r]
+  set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+ \*?(sqlite3[a-zA-Z0-9]+)([[;]| =)}
   if {[file extension $filename]==".h"} {
     set declpattern {^ *[a-zA-Z][a-zA-Z_0-9 ]+ \*?(sqlite3[_A-Z][a-zA-Z0-9]+)\(}
   } else {
@@ -154,14 +155,26 @@ proc copy_file {filename} {
       puts $out "#if 0"
     } elseif {[regexp {^#line} $line]} {
       # Skip #line directives.
-    } elseif {$addstatic && [regexp $declpattern $line all funcname] 
-                  && ![regexp {^static} $line]} {
-      # Add the SQLITE_PRIVATE or SQLITE_API keyword before functions.
-      # so that linkage can be modified at compile-time.
-      if {[regexp {^sqlite3_} $funcname]} {
-        puts $out "SQLITE_API $line"
+    } elseif {$addstatic && ![regexp {^static} $line]} {
+      if {[regexp $declpattern $line all funcname]} {
+        # Add the SQLITE_PRIVATE or SQLITE_API keyword before functions.
+        # so that linkage can be modified at compile-time.
+        if {[regexp {^sqlite3_} $funcname]} {
+          puts $out "SQLITE_API $line"
+        } else {
+          puts $out "SQLITE_PRIVATE $line"
+        }
+      } elseif {[regexp $varpattern $line all varname]} {
+        # Add the SQLITE_PRIVATE before variable declarations or
+        # definitions for internal use
+        if {![regexp {^sqlite3_} $varname]} {
+          regsub {^extern } $line {} line
+          puts $out "SQLITE_PRIVATE $line"
+        } else {
+          puts $out $line
+        }
       } else {
-        puts $out "SQLITE_PRIVATE $line"
+        puts $out $line
       }
     } else {
       puts $out $line