Skip to content

Commit

Permalink
Fix several issues with Tcl_GetIndexFromObjStruct using non-static data
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykb committed Jul 10, 2012
1 parent 79144a7 commit 2e9bf70
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions tdbcmysql/generic/tdbcmysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -2638,7 +2638,7 @@ StatementParamtypeMethod(
StatementData* sdata /* The current statement */
= (StatementData*) Tcl_ObjectGetMetadata(thisObject,
&statementDataType);
struct {
static const struct {
const char* name;
int flags;
} directions[] = {
Expand Down Expand Up @@ -2853,7 +2853,6 @@ ResultSetConstructor(
int skip = Tcl_ObjectContextSkippedArgs(context);
/* Number of args to skip */
Tcl_Object statementObject; /* The current statement object */
PerInterpData* pidata; /* The per-interpreter data for this package */
ConnectionData* cdata; /* The MySQL connection object's data */
StatementData* sdata; /* The statement object's data */
ResultSetData* rdata; /* THe result set object's data */
Expand Down Expand Up @@ -2911,7 +2910,6 @@ ResultSetConstructor(
}
cdata->flags |= CONN_FLAG_AUTOCOMMIT;
}
pidata = cdata->pidata;

/* Allocate an object to hold data about this result set */

Expand Down
5 changes: 4 additions & 1 deletion tdbcodbc/generic/tdbcodbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,9 @@ SQLStateIs(
* Side effects:
* If successful, stores the enumerated value in '*valuePtr'
*
* Notes:
* The 'table' argument must be constant and statically allocated.
*
*-----------------------------------------------------------------------------
*/

Expand Down Expand Up @@ -3124,7 +3127,7 @@ ForeignkeysStatementConstructor(
StatementData* sdata; /* The statement's object data */
RETCODE rc; /* Return code from ODBC */

const char* options[] = { /* Option table */
const static char* options[] = { /* Option table */
"-foreign",
"-primary",
NULL
Expand Down
2 changes: 1 addition & 1 deletion tdbcpostgres/generic/tdbcpostgres.c
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,7 @@ StatementParamtypeMethod(
StatementData* sdata /* The current statement */
= (StatementData*) Tcl_ObjectGetMetadata(thisObject,
&statementDataType);
struct {
static const struct {
const char* name;
int flags;
} directions[] = {
Expand Down

0 comments on commit 2e9bf70

Please sign in to comment.