summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 13:48:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-17 13:48:12 (GMT)
commit733b7a43a45ee6be75ccd99172f66b35b69841c5 (patch)
tree2c38bde59af6c90ad19dbda96878de709d5859d0 /generic/tclMain.c
parentbc10bf6d03a6c8685c64e36a6095e289e2b1ef33 (diff)
downloadtcl-733b7a43a45ee6be75ccd99172f66b35b69841c5.zip
tcl-733b7a43a45ee6be75ccd99172f66b35b69841c5.tar.gz
tcl-733b7a43a45ee6be75ccd99172f66b35b69841c5.tar.bz2
Eliminate many usages of Tcl_NewObj (-> TclNewObj) and Tcl_NewIntObj (-> TclNewIntObj or Tcl_NewWideIntObj)
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);