diff options
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r-- | generic/tclMain.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c index 4f44685..cc9a829 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -43,7 +43,7 @@ # define _tcscmp strcmp #endif -static inline Tcl_Obj * +static Tcl_Obj * NewNativeObj( TCHAR *string) { @@ -53,7 +53,7 @@ NewNativeObj( Tcl_DStringInit(&ds); Tcl_WCharToUtfDString(string, -1, &ds); #else - Tcl_ExternalToUtfDString(NULL, (char *) string, -1, &ds); + Tcl_ExternalToUtfDString(NULL, (char *)string, -1, &ds); #endif return TclDStringToObj(&ds); } @@ -307,7 +307,7 @@ Tcl_MainEx( is.interp = interp; is.prompt = PROMPT_START; - is.commandPtr = Tcl_NewObj(); + TclNewObj(is.commandPtr); /* * If the application has not already set a startup script, parse the @@ -348,7 +348,7 @@ Tcl_MainEx( argc--; argv++; - Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewIntObj(argc), TCL_GLOBAL_ONLY); + Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewWideIntObj(argc), TCL_GLOBAL_ONLY); argvPtr = Tcl_NewListObj(0, NULL); while (argc--) { @@ -362,7 +362,7 @@ Tcl_MainEx( is.tty = isatty(0); Tcl_SetVar2Ex(interp, "tcl_interactive", NULL, - Tcl_NewIntObj(!path && is.tty), TCL_GLOBAL_ONLY); + Tcl_NewWideIntObj(!path && is.tty), TCL_GLOBAL_ONLY); /* * Invoke application-specific initialization. @@ -522,7 +522,7 @@ Tcl_MainEx( TCL_EVAL_GLOBAL); is.input = Tcl_GetStdChannel(TCL_STDIN); Tcl_DecrRefCount(is.commandPtr); - is.commandPtr = Tcl_NewObj(); + TclNewObj(is.commandPtr); Tcl_IncrRefCount(is.commandPtr); if (code != TCL_OK) { chan = Tcl_GetStdChannel(TCL_STDERR); @@ -790,7 +790,8 @@ StdinProc( code = Tcl_RecordAndEvalObj(interp, commandPtr, TCL_EVAL_GLOBAL); isPtr->input = chan = Tcl_GetStdChannel(TCL_STDIN); Tcl_DecrRefCount(commandPtr); - isPtr->commandPtr = commandPtr = Tcl_NewObj(); + TclNewObj(commandPtr); + isPtr->commandPtr = commandPtr; Tcl_IncrRefCount(commandPtr); if (chan != NULL) { Tcl_CreateChannelHandler(chan, TCL_READABLE, StdinProc, isPtr); |