Fossil SCM

Incorporate recent downstream changes for the Tcl integration subsystem.

mistachkin 2015-07-10 18:43 trunk
Commit c5f71552c1ff24d0df8533417c2577f68e8a2790
1 file changed +4 -3
+4 -3
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -82,10 +82,11 @@
8282
# if defined(_WIN32)
8383
# if !defined(WIN32_LEAN_AND_MEAN)
8484
# define WIN32_LEAN_AND_MEAN
8585
# endif
8686
# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0502)
87
+# undef _WIN32_WINNT
8788
# define _WIN32_WINNT 0x0502 /* SetDllDirectory, Windows XP SP2 */
8889
# endif
8990
# include <windows.h>
9091
# ifndef TCL_DIRECTORY_SEP
9192
# define TCL_DIRECTORY_SEP '\\'
@@ -342,11 +343,11 @@
342343
*/
343344
static const char *getTclReturnCodeName(
344345
int rc,
345346
int nullIfOk
346347
){
347
- static char zRc[32];
348
+ static char zRc[TCL_INTEGER_SPACE + 17]; /* "Tcl return code\0" */
348349
349350
switch( rc ){
350351
case TCL_OK: return nullIfOk ? 0 : "TCL_OK";
351352
case TCL_ERROR: return "TCL_ERROR";
352353
case TCL_RETURN: return "TCL_RETURN";
@@ -395,11 +396,11 @@
395396
tcl_DeleteInterpProc *xDeleteInterp; /* Tcl_DeleteInterp() pointer. */
396397
tcl_FinalizeProc *xFinalize; /* Tcl_Finalize() pointer. */
397398
Tcl_Interp *interp; /* The on-demand created Tcl interpreter. */
398399
int useObjProc; /* Non-zero if an objProc can be called directly. */
399400
int useTip285; /* Non-zero if TIP #285 is available. */
400
- char *setup; /* The optional Tcl setup script. */
401
+ const char *setup; /* The optional Tcl setup script. */
401402
tcl_NotifyProc *xPreEval; /* Optional, called before Tcl_Eval*(). */
402403
void *pPreContext; /* Optional, provided to xPreEval(). */
403404
tcl_NotifyProc *xPostEval; /* Optional, called after Tcl_Eval*(). */
404405
void *pPostContext; /* Optional, provided to xPostEval(). */
405406
};
@@ -991,11 +992,11 @@
991992
struct TclContext *tclContext = (struct TclContext *)pContext;
992993
int argc;
993994
char **argv;
994995
char *argv0 = 0;
995996
Tcl_Interp *tclInterp;
996
- char *setup;
997
+ const char *setup;
997998
998999
if( !tclContext ){
9991000
Th_ErrorMessage(interp,
10001001
"invalid Tcl context", (const char *)"", 0);
10011002
return TH_ERROR;
10021003
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -82,10 +82,11 @@
82 # if defined(_WIN32)
83 # if !defined(WIN32_LEAN_AND_MEAN)
84 # define WIN32_LEAN_AND_MEAN
85 # endif
86 # if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0502)
 
87 # define _WIN32_WINNT 0x0502 /* SetDllDirectory, Windows XP SP2 */
88 # endif
89 # include <windows.h>
90 # ifndef TCL_DIRECTORY_SEP
91 # define TCL_DIRECTORY_SEP '\\'
@@ -342,11 +343,11 @@
342 */
343 static const char *getTclReturnCodeName(
344 int rc,
345 int nullIfOk
346 ){
347 static char zRc[32];
348
349 switch( rc ){
350 case TCL_OK: return nullIfOk ? 0 : "TCL_OK";
351 case TCL_ERROR: return "TCL_ERROR";
352 case TCL_RETURN: return "TCL_RETURN";
@@ -395,11 +396,11 @@
395 tcl_DeleteInterpProc *xDeleteInterp; /* Tcl_DeleteInterp() pointer. */
396 tcl_FinalizeProc *xFinalize; /* Tcl_Finalize() pointer. */
397 Tcl_Interp *interp; /* The on-demand created Tcl interpreter. */
398 int useObjProc; /* Non-zero if an objProc can be called directly. */
399 int useTip285; /* Non-zero if TIP #285 is available. */
400 char *setup; /* The optional Tcl setup script. */
401 tcl_NotifyProc *xPreEval; /* Optional, called before Tcl_Eval*(). */
402 void *pPreContext; /* Optional, provided to xPreEval(). */
403 tcl_NotifyProc *xPostEval; /* Optional, called after Tcl_Eval*(). */
404 void *pPostContext; /* Optional, provided to xPostEval(). */
405 };
@@ -991,11 +992,11 @@
991 struct TclContext *tclContext = (struct TclContext *)pContext;
992 int argc;
993 char **argv;
994 char *argv0 = 0;
995 Tcl_Interp *tclInterp;
996 char *setup;
997
998 if( !tclContext ){
999 Th_ErrorMessage(interp,
1000 "invalid Tcl context", (const char *)"", 0);
1001 return TH_ERROR;
1002
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -82,10 +82,11 @@
82 # if defined(_WIN32)
83 # if !defined(WIN32_LEAN_AND_MEAN)
84 # define WIN32_LEAN_AND_MEAN
85 # endif
86 # if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0502)
87 # undef _WIN32_WINNT
88 # define _WIN32_WINNT 0x0502 /* SetDllDirectory, Windows XP SP2 */
89 # endif
90 # include <windows.h>
91 # ifndef TCL_DIRECTORY_SEP
92 # define TCL_DIRECTORY_SEP '\\'
@@ -342,11 +343,11 @@
343 */
344 static const char *getTclReturnCodeName(
345 int rc,
346 int nullIfOk
347 ){
348 static char zRc[TCL_INTEGER_SPACE + 17]; /* "Tcl return code\0" */
349
350 switch( rc ){
351 case TCL_OK: return nullIfOk ? 0 : "TCL_OK";
352 case TCL_ERROR: return "TCL_ERROR";
353 case TCL_RETURN: return "TCL_RETURN";
@@ -395,11 +396,11 @@
396 tcl_DeleteInterpProc *xDeleteInterp; /* Tcl_DeleteInterp() pointer. */
397 tcl_FinalizeProc *xFinalize; /* Tcl_Finalize() pointer. */
398 Tcl_Interp *interp; /* The on-demand created Tcl interpreter. */
399 int useObjProc; /* Non-zero if an objProc can be called directly. */
400 int useTip285; /* Non-zero if TIP #285 is available. */
401 const char *setup; /* The optional Tcl setup script. */
402 tcl_NotifyProc *xPreEval; /* Optional, called before Tcl_Eval*(). */
403 void *pPreContext; /* Optional, provided to xPreEval(). */
404 tcl_NotifyProc *xPostEval; /* Optional, called after Tcl_Eval*(). */
405 void *pPostContext; /* Optional, provided to xPostEval(). */
406 };
@@ -991,11 +992,11 @@
992 struct TclContext *tclContext = (struct TclContext *)pContext;
993 int argc;
994 char **argv;
995 char *argv0 = 0;
996 Tcl_Interp *tclInterp;
997 const char *setup;
998
999 if( !tclContext ){
1000 Th_ErrorMessage(interp,
1001 "invalid Tcl context", (const char *)"", 0);
1002 return TH_ERROR;
1003

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button