summaryrefslogtreecommitdiffstats
path: root/win/tclAppInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-17 21:03:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-17 21:03:56 (GMT)
commit34480654e98d2543e4d9a16e4cd5cbcc5630b604 (patch)
treed52e8324f407af23496031cb1f295802ec61200f /win/tclAppInit.c
parent02a26d7bcd80d7c7f7a2733ebecdbfb89d1212c5 (diff)
downloadtcl-34480654e98d2543e4d9a16e4cd5cbcc5630b604.zip
tcl-34480654e98d2543e4d9a16e4cd5cbcc5630b604.tar.gz
tcl-34480654e98d2543e4d9a16e4cd5cbcc5630b604.tar.bz2
Use (preferred) Tcl_ObjSetVar2 in stead of Tcl_SetVar in tclAppInit.c, both UNIX and Win.
Diffstat (limited to 'win/tclAppInit.c')
-rw-r--r--win/tclAppInit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index 56f45a0..753eaff 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -45,7 +45,10 @@ static void setargv(int *argcPtr, TCHAR ***argvPtr);
#ifndef TCL_LOCAL_APPINIT
#define TCL_LOCAL_APPINIT Tcl_AppInit
#endif
-extern int TCL_LOCAL_APPINIT(Tcl_Interp *interp);
+#ifndef MODULE_SCOPE
+# define MODULE_SCOPE extern
+#endif
+MODULE_SCOPE int TCL_LOCAL_APPINIT(Tcl_Interp *);
/*
* The following #if block allows you to change how Tcl finds the startup
@@ -54,7 +57,7 @@ extern int TCL_LOCAL_APPINIT(Tcl_Interp *interp);
*/
#ifdef TCL_LOCAL_MAIN_HOOK
-extern int TCL_LOCAL_MAIN_HOOK(int *argc, TCHAR ***argv);
+MODULE_SCOPE int TCL_LOCAL_MAIN_HOOK(int *argc, TCHAR ***argv);
#endif
/*
@@ -193,7 +196,8 @@ Tcl_AppInit(
* specific startup file will be run under any conditions.
*/
- (Tcl_SetVar)(interp, "tcl_rcFileName", "~/tclshrc.tcl", TCL_GLOBAL_ONLY);
+ (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_NewStringObj("~/tclshrc.tcl", -1), TCL_GLOBAL_ONLY);
return TCL_OK;
}