summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-24 10:53:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-24 10:53:58 (GMT)
commit7c54b6f6fd2a99998ce0daa0b32c8940d1ed5eea (patch)
treeb41fc8b52d1f4defdc0daf14b2a04ebe90a6187a
parentc3353d5a645c33f35445ab3c510dfef988897dd2 (diff)
downloadtcl-7c54b6f6fd2a99998ce0daa0b32c8940d1ed5eea.zip
tcl-7c54b6f6fd2a99998ce0daa0b32c8940d1ed5eea.tar.gz
tcl-7c54b6f6fd2a99998ce0daa0b32c8940d1ed5eea.tar.bz2
tclAppInit.c should be built without BUILD_tcl/USE_TCL_STUBS always. All build files should be adapted now to assure that.
-rw-r--r--generic/tclDecls.h9
-rw-r--r--unix/tclAppInit.c11
-rw-r--r--win/tclAppInit.c7
3 files changed, 11 insertions, 16 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index b37491a..6ab227f 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -3931,19 +3931,10 @@ extern const TclStubs *tclStubsPtr;
/* !END!: Do not edit above this line. */
#if defined(USE_TCL_STUBS)
-# undef Tcl_CreateInterp
# undef Tcl_FindExecutable
-# undef Tcl_GetStringResult
-# undef Tcl_Init
# undef Tcl_SetPanicProc
# undef Tcl_SetExitProc
-# undef Tcl_ObjSetVar2
# undef Tcl_StaticPackage
-# define Tcl_CreateInterp() (tclStubsPtr->tcl_CreateInterp())
-# define Tcl_GetStringResult(interp) (tclStubsPtr->tcl_GetStringResult(interp))
-# define Tcl_Init(interp) (tclStubsPtr->tcl_Init(interp))
-# define Tcl_ObjSetVar2(interp, part1, part2, newValue, flags) \
- (tclStubsPtr->tcl_ObjSetVar2(interp, part1, part2, newValue, flags))
#endif
#if defined(_WIN32) && defined(UNICODE)
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index 3587f35..aa060ab 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -12,8 +12,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#undef BUILD_tcl
-#undef STATIC_BUILD
+#if defined(BUILD_tcl) || defined(USE_TCL_STUBS)
+#error "Don't build with BUILD_tcl/USE_TCL_STUBS!"
+#endif
#include "tcl.h"
#ifdef TCL_TEST
@@ -110,7 +111,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;
}
@@ -152,10 +153,10 @@ Tcl_AppInit(
*/
#ifdef DJGPP
- (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
Tcl_NewStringObj("~/tclsh.rc", -1), TCL_GLOBAL_ONLY);
#else
- (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
Tcl_NewStringObj("~/.tclshrc", -1), TCL_GLOBAL_ONLY);
#endif
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index fa27756..348b32c 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -14,6 +14,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+#if defined(BUILD_tcl) || defined(USE_TCL_STUBS)
+#error "Don't build with BUILD_tcl/USE_TCL_STUBS!"
+#endif
#include "tcl.h"
#define WIN32_LEAN_AND_MEAN
#define STRICT /* See MSDN Article Q83456 */
@@ -158,7 +161,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;
}
@@ -205,7 +208,7 @@ Tcl_AppInit(
* user-specific startup file will be run under any conditions.
*/
- (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
Tcl_NewStringObj("~/tclshrc.tcl", -1), TCL_GLOBAL_ONLY);
return TCL_OK;
}