/ Check-in [b10d4220]
Login

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

Overview
Comment:Back out the changes of ticket #1687 since they broken the ActiveTcl build. (CVS 3326)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b10d4220dc12728933eae1fcdcebd88a5f92e3a7
User & Date: drh 2006-07-10 21:15:52
Context
2006-07-11
10:42
Fix a possible NULL-pointer deference following a malloc failure. Error discovered by Klocwork. (CVS 3327) check-in: 368bcf26 user: drh tags: trunk
2006-07-10
21:15
Back out the changes of ticket #1687 since they broken the ActiveTcl build. (CVS 3326) check-in: b10d4220 user: drh tags: trunk
2006-07-08
18:41
Better comment to describe the confusing operand reversal for infix functions. (CVS 3325) check-in: 30dfb9bf user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/tclsqlite.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** A TCL Interface to SQLite
    13     13   **
    14         -** $Id: tclsqlite.c,v 1.162 2006/07/06 17:08:48 drh Exp $
           14  +** $Id: tclsqlite.c,v 1.163 2006/07/10 21:15:52 drh Exp $
    15     15   */
    16     16   #ifndef NO_TCL     /* Omit this whole file if TCL is unavailable */
    17     17   
    18     18   #include "sqliteInt.h"
    19     19   #include "hash.h"
    20     20   #include "tcl.h"
    21     21   #include <stdlib.h>
    22     22   #include <string.h>
    23     23   #include <assert.h>
    24     24   #include <ctype.h>
    25     25   
           26  +/*
           27  + * Windows needs to know which symbols to export.  Unix does not.
           28  + * BUILD_sqlite should be undefined for Unix.
           29  + */
           30  +#ifdef BUILD_sqlite
           31  +#undef TCL_STORAGE_CLASS
           32  +#define TCL_STORAGE_CLASS DLLEXPORT
           33  +#endif /* BUILD_sqlite */
    26     34   
    27     35   #define NUM_PREPARED_STMTS 10
    28     36   #define MAX_PREPARED_STMTS 100
    29     37   
    30     38   /*
    31     39   ** If TCL uses UTF-8 and SQLite is configured to use iso8859, then we
    32     40   ** have to do a translation when going between the two.  Set the 
................................................................................
  2090   2098   **
  2091   2099   ** This Tcl module contains only a single new Tcl command named "sqlite".
  2092   2100   ** (Hence there is no namespace.  There is no point in using a namespace
  2093   2101   ** if the extension only supplies one new name!)  The "sqlite" command is
  2094   2102   ** used to open a new SQLite database.  See the DbMain() routine above
  2095   2103   ** for additional information.
  2096   2104   */
  2097         -extern int Sqlite3_Init(Tcl_Interp *interp){
         2105  +EXTERN int Sqlite3_Init(Tcl_Interp *interp){
  2098   2106     Tcl_InitStubs(interp, "8.4", 0);
  2099   2107     Tcl_CreateObjCommand(interp, "sqlite3", (Tcl_ObjCmdProc*)DbMain, 0, 0);
  2100   2108     Tcl_PkgProvide(interp, "sqlite3", PACKAGE_VERSION);
  2101   2109     Tcl_CreateObjCommand(interp, "sqlite", (Tcl_ObjCmdProc*)DbMain, 0, 0);
  2102   2110     Tcl_PkgProvide(interp, "sqlite", PACKAGE_VERSION);
  2103   2111     return TCL_OK;
  2104   2112   }
  2105         -extern int Tclsqlite3_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
  2106         -extern int Sqlite3_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
  2107         -extern int Tclsqlite3_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
         2113  +EXTERN int Tclsqlite3_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
         2114  +EXTERN int Sqlite3_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
         2115  +EXTERN int Tclsqlite3_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
  2108   2116   
  2109   2117   #ifndef SQLITE_3_SUFFIX_ONLY
  2110         -extern int Sqlite_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
  2111         -extern int Tclsqlite_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
  2112         -extern int Sqlite_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
  2113         -extern int Tclsqlite_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
         2118  +EXTERN int Sqlite_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
         2119  +EXTERN int Tclsqlite_Init(Tcl_Interp *interp){ return Sqlite3_Init(interp); }
         2120  +EXTERN int Sqlite_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
         2121  +EXTERN int Tclsqlite_SafeInit(Tcl_Interp *interp){ return TCL_OK; }
  2114   2122   #endif
  2115   2123   
  2116   2124   #ifdef TCLSH
  2117   2125   /*****************************************************************************
  2118   2126   ** The code that follows is used to build standalone TCL interpreters
  2119   2127   */
  2120   2128