summaryrefslogtreecommitdiffstats
path: root/unix/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 /unix/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 'unix/tclAppInit.c')
-rw-r--r--unix/tclAppInit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index 159bbd8..f3edcff 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -48,7 +48,7 @@ MODULE_SCOPE int main(int, char **);
*/
#ifdef TCL_LOCAL_MAIN_HOOK
-extern int TCL_LOCAL_MAIN_HOOK(int *argc, char ***argv);
+MODULE_SCOPE int TCL_LOCAL_MAIN_HOOK(int *argc, char ***argv);
#endif
/*
@@ -150,9 +150,11 @@ Tcl_AppInit(
*/
#ifdef DJGPP
- (Tcl_SetVar)(interp, "tcl_rcFileName", "~/tclsh.rc", TCL_GLOBAL_ONLY);
+ (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_NewStringObj("~/tclsh.rc", -1), TCL_GLOBAL_ONLY);
#else
- (Tcl_SetVar)(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY);
+ (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_NewStringObj("~/.tclshrc", -1), TCL_GLOBAL_ONLY);
#endif
return TCL_OK;