summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r--generic/tclMain.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 4f44685..216544a 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -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);