tdbc::mysql

Check-in [c4394a8239]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Make mysqlStubs a 'const'ant, as only Tcl_LoadFile() is allowed to fill this table.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c4394a8239e107ce69a96d873420d5b6246f6187
User & Date: jan.nijtmans 2015-06-26 13:03:46
Context
2015-06-26
13:44
more efficient use of mysqlSuffixes[] table check-in: ea2767612b user: jan.nijtmans tags: trunk
13:03
Make mysqlStubs a 'const'ant, as only Tcl_LoadFile() is allowed to fill this table. check-in: c4394a8239 user: jan.nijtmans tags: trunk
11:58
Adapt code for cygwin, which uses "cyg" as mysql library prefix and inserts library version before in stead of after .dll. Eliminate various end-of-line spaces check-in: 0048009d31 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/mysqlStubInit.c.

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
};

/*
 * Table containing pointers to the functions named above.
 */

static mysqlStubDefs mysqlStubsTable;
mysqlStubDefs* mysqlStubs = &mysqlStubsTable;

/*
 *-----------------------------------------------------------------------------
 *
 * MysqlInitStubs --
 *
 *	Initialize the Stubs table for the MySQL API
................................................................................
#endif
	    Tcl_IncrRefCount(path);

	    /* Try to load a client library and resolve symbols within it. */

	    Tcl_ResetResult(interp);
	    status = Tcl_LoadFile(interp, path, mysqlSymbolNames, 0,
				  (void*)mysqlStubs, &handle);
	    Tcl_DecrRefCount(path);
	}
    }

    /*
     * Either we've successfully loaded a library (status == TCL_OK),
     * or we've run out of library names (in which case status==TCL_ERROR






|







 







|







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
};

/*
 * Table containing pointers to the functions named above.
 */

static mysqlStubDefs mysqlStubsTable;
const mysqlStubDefs* mysqlStubs = &mysqlStubsTable;

/*
 *-----------------------------------------------------------------------------
 *
 * MysqlInitStubs --
 *
 *	Initialize the Stubs table for the MySQL API
................................................................................
#endif
	    Tcl_IncrRefCount(path);

	    /* Try to load a client library and resolve symbols within it. */

	    Tcl_ResetResult(interp);
	    status = Tcl_LoadFile(interp, path, mysqlSymbolNames, 0,
				  &mysqlStubsTable, &handle);
	    Tcl_DecrRefCount(path);
	}
    }

    /*
     * Either we've successfully loaded a library (status == TCL_OK),
     * or we've run out of library names (in which case status==TCL_ERROR

Changes to generic/mysqlStubs.h.

94
95
96
97
98
99
100
101
#define mysql_stmt_fetch_column (mysqlStubs->mysql_stmt_fetch_columnPtr)
#define mysql_stmt_init (mysqlStubs->mysql_stmt_initPtr)
#define mysql_stmt_prepare (mysqlStubs->mysql_stmt_preparePtr)
#define mysql_stmt_result_metadata (mysqlStubs->mysql_stmt_result_metadataPtr)
#define mysql_stmt_sqlstate (mysqlStubs->mysql_stmt_sqlstatePtr)
#define mysql_stmt_store_result (mysqlStubs->mysql_stmt_store_resultPtr)
#define mysql_store_result (mysqlStubs->mysql_store_resultPtr)
MODULE_SCOPE mysqlStubDefs *mysqlStubs;






|
94
95
96
97
98
99
100
101
#define mysql_stmt_fetch_column (mysqlStubs->mysql_stmt_fetch_columnPtr)
#define mysql_stmt_init (mysqlStubs->mysql_stmt_initPtr)
#define mysql_stmt_prepare (mysqlStubs->mysql_stmt_preparePtr)
#define mysql_stmt_result_metadata (mysqlStubs->mysql_stmt_result_metadataPtr)
#define mysql_stmt_sqlstate (mysqlStubs->mysql_stmt_sqlstatePtr)
#define mysql_stmt_store_result (mysqlStubs->mysql_stmt_store_resultPtr)
#define mysql_store_result (mysqlStubs->mysql_store_resultPtr)
MODULE_SCOPE const mysqlStubDefs *mysqlStubs;