Fossil SCM
Incorporate recent downstream changes for the Tcl integration subsystem.
Commit
c5f71552c1ff24d0df8533417c2577f68e8a2790
Parent
a591a2530577706…
1 file changed
+4
-3
+4
-3
| --- src/th_tcl.c | ||
| +++ src/th_tcl.c | ||
| @@ -82,10 +82,11 @@ | ||
| 82 | 82 | # if defined(_WIN32) |
| 83 | 83 | # if !defined(WIN32_LEAN_AND_MEAN) |
| 84 | 84 | # define WIN32_LEAN_AND_MEAN |
| 85 | 85 | # endif |
| 86 | 86 | # if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0502) |
| 87 | +# undef _WIN32_WINNT | |
| 87 | 88 | # define _WIN32_WINNT 0x0502 /* SetDllDirectory, Windows XP SP2 */ |
| 88 | 89 | # endif |
| 89 | 90 | # include <windows.h> |
| 90 | 91 | # ifndef TCL_DIRECTORY_SEP |
| 91 | 92 | # define TCL_DIRECTORY_SEP '\\' |
| @@ -342,11 +343,11 @@ | ||
| 342 | 343 | */ |
| 343 | 344 | static const char *getTclReturnCodeName( |
| 344 | 345 | int rc, |
| 345 | 346 | int nullIfOk |
| 346 | 347 | ){ |
| 347 | - static char zRc[32]; | |
| 348 | + static char zRc[TCL_INTEGER_SPACE + 17]; /* "Tcl return code\0" */ | |
| 348 | 349 | |
| 349 | 350 | switch( rc ){ |
| 350 | 351 | case TCL_OK: return nullIfOk ? 0 : "TCL_OK"; |
| 351 | 352 | case TCL_ERROR: return "TCL_ERROR"; |
| 352 | 353 | case TCL_RETURN: return "TCL_RETURN"; |
| @@ -395,11 +396,11 @@ | ||
| 395 | 396 | tcl_DeleteInterpProc *xDeleteInterp; /* Tcl_DeleteInterp() pointer. */ |
| 396 | 397 | tcl_FinalizeProc *xFinalize; /* Tcl_Finalize() pointer. */ |
| 397 | 398 | Tcl_Interp *interp; /* The on-demand created Tcl interpreter. */ |
| 398 | 399 | int useObjProc; /* Non-zero if an objProc can be called directly. */ |
| 399 | 400 | 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. */ | |
| 401 | 402 | tcl_NotifyProc *xPreEval; /* Optional, called before Tcl_Eval*(). */ |
| 402 | 403 | void *pPreContext; /* Optional, provided to xPreEval(). */ |
| 403 | 404 | tcl_NotifyProc *xPostEval; /* Optional, called after Tcl_Eval*(). */ |
| 404 | 405 | void *pPostContext; /* Optional, provided to xPostEval(). */ |
| 405 | 406 | }; |
| @@ -991,11 +992,11 @@ | ||
| 991 | 992 | struct TclContext *tclContext = (struct TclContext *)pContext; |
| 992 | 993 | int argc; |
| 993 | 994 | char **argv; |
| 994 | 995 | char *argv0 = 0; |
| 995 | 996 | Tcl_Interp *tclInterp; |
| 996 | - char *setup; | |
| 997 | + const char *setup; | |
| 997 | 998 | |
| 998 | 999 | if( !tclContext ){ |
| 999 | 1000 | Th_ErrorMessage(interp, |
| 1000 | 1001 | "invalid Tcl context", (const char *)"", 0); |
| 1001 | 1002 | return TH_ERROR; |
| 1002 | 1003 |
| --- 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 |