summaryrefslogtreecommitdiffstats
path: root/win/tclAppInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-08-21 21:43:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-08-21 21:43:16 (GMT)
commitc42f34e33320fc95bf80bdca0da2bae7bebbbe0f (patch)
treee045a34d312e2e08725507f0d2e43c6d65bc400a /win/tclAppInit.c
parent64a63fa7c5594097d782968787ad37e46f9e4f5e (diff)
parent916d72ec1ce61ebd585a78c6a9565f5c49bb8d24 (diff)
downloadtcl-c42f34e33320fc95bf80bdca0da2bae7bebbbe0f.zip
tcl-c42f34e33320fc95bf80bdca0da2bae7bebbbe0f.tar.gz
tcl-c42f34e33320fc95bf80bdca0da2bae7bebbbe0f.tar.bz2
Merge 8.7
Diffstat (limited to 'win/tclAppInit.c')
-rw-r--r--win/tclAppInit.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index be70492..27eb164 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -15,17 +15,14 @@
*/
#include "tcl.h"
-#define WIN32_LEAN_AND_MEAN
-#define STRICT /* See MSDN Article Q83456 */
-#include <windows.h>
-#undef STRICT
-#undef WIN32_LEAN_AND_MEAN
-#include <locale.h>
-#include <stdlib.h>
-#include <tchar.h>
-#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7
+#if TCL_MAJOR_VERSION < 9
+# if defined(USE_TCL_STUBS)
+# error "Don't build with USE_TCL_STUBS!"
+# endif
+# if TCL_MINOR_VERSION < 7
# define Tcl_LibraryInitProc Tcl_PackageInitProc
# define Tcl_StaticLibrary Tcl_StaticPackage
+# endif
#endif
#ifdef TCL_TEST
@@ -39,6 +36,14 @@ extern Tcl_LibraryInitProc Dde_Init;
extern Tcl_LibraryInitProc Dde_SafeInit;
#endif
+#define WIN32_LEAN_AND_MEAN
+#define STRICT /* See MSDN Article Q83456 */
+#include <windows.h>
+#undef STRICT
+#undef WIN32_LEAN_AND_MEAN
+#include <locale.h>
+#include <stdlib.h>
+#include <tchar.h>
#if defined(__GNUC__) || defined(TCL_BROKEN_MAINARGS)
int _CRT_glob = 0;
#endif /* __GNUC__ || TCL_BROKEN_MAINARGS */
@@ -136,7 +141,7 @@ _tmain(
TclZipfs_AppHook(&argc, &argv);
#endif
- Tcl_Main(argc, argv, TCL_LOCAL_APPINIT);
+ Tcl_Main((size_t)argc, argv, TCL_LOCAL_APPINIT);
return 0; /* Needed only to prevent compiler warning. */
}
@@ -163,7 +168,7 @@ int
Tcl_AppInit(
Tcl_Interp *interp) /* Interpreter for application. */
{
- if ((Tcl_Init)(interp) == TCL_ERROR) {
+ if (Tcl_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
@@ -210,8 +215,8 @@ Tcl_AppInit(
* user-specific startup file will be run under any conditions.
*/
- (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
- Tcl_NewStringObj("~/tclshrc.tcl", -1), TCL_GLOBAL_ONLY);
+ Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_rcFileName", TCL_INDEX_NONE), NULL,
+ Tcl_NewStringObj("~/tclshrc.tcl", TCL_INDEX_NONE), TCL_GLOBAL_ONLY);
return TCL_OK;
}