summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclInt.decls2
-rw-r--r--generic/tclIntDecls.h4
-rw-r--r--generic/tclPipe.c14
-rw-r--r--generic/tclProc.c3
4 files changed, 12 insertions, 11 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 448cdac..1c05eeb 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -39,7 +39,7 @@ declare 7 {
}
# TclCreatePipeline unofficially exported for use by BLT.
declare 9 {
- int TclCreatePipeline(Tcl_Interp *interp, size_t argc, const char **argv,
+ size_t TclCreatePipeline(Tcl_Interp *interp, size_t argc, const char **argv,
Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr,
TclFile *errFilePtr)
}
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index d496edf..5dd8196 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -59,7 +59,7 @@ EXTERN size_t TclCopyAndCollapse(size_t count, const char *src,
char *dst);
/* Slot 8 is reserved */
/* 9 */
-EXTERN int TclCreatePipeline(Tcl_Interp *interp, size_t argc,
+EXTERN size_t TclCreatePipeline(Tcl_Interp *interp, size_t argc,
const char **argv, Tcl_Pid **pidArrayPtr,
TclFile *inPipePtr, TclFile *outPipePtr,
TclFile *errFilePtr);
@@ -591,7 +591,7 @@ typedef struct TclIntStubs {
void (*tclCleanupCommand) (Command *cmdPtr); /* 6 */
size_t (*tclCopyAndCollapse) (size_t count, const char *src, char *dst); /* 7 */
void (*reserved8)(void);
- int (*tclCreatePipeline) (Tcl_Interp *interp, size_t argc, const char **argv, Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr, TclFile *errFilePtr); /* 9 */
+ size_t (*tclCreatePipeline) (Tcl_Interp *interp, size_t argc, const char **argv, Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr, TclFile *errFilePtr); /* 9 */
int (*tclCreateProc) (Tcl_Interp *interp, Namespace *nsPtr, const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Proc **procPtrPtr); /* 10 */
void (*tclDeleteCompiledLocalVars) (Interp *iPtr, CallFrame *framePtr); /* 11 */
void (*tclDeleteVars) (Interp *iPtr, TclVarHashTable *tablePtr); /* 12 */
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 3313c7a..aac031b 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -378,7 +378,7 @@ TclCleanupChildren(
*
* Results:
* The return value is a count of the number of new processes created, or
- * -1 if an error occurred while creating the pipeline. *pidArrayPtr is
+ * TCL_INDEX_NONE if an error occurred while creating the pipeline. *pidArrayPtr is
* filled in with the address of a dynamically allocated array giving the
* ids of all of the processes. It is up to the caller to free this array
* when it isn't needed anymore. If inPipePtr is non-NULL, *inPipePtr is
@@ -395,10 +395,10 @@ TclCleanupChildren(
*----------------------------------------------------------------------
*/
-int
+size_t
TclCreatePipeline(
Tcl_Interp *interp, /* Interpreter to use for error reporting. */
- size_t argc1, /* Number of entries in argv. */
+ size_t argc, /* Number of entries in argv. */
const char **argv, /* Array of strings describing commands in
* pipeline plus I/O redirection with <, <<,
* >, etc. Argv[argc] must be NULL. */
@@ -431,7 +431,7 @@ TclCreatePipeline(
{
Tcl_Pid *pidPtr = NULL; /* Points to malloc-ed array holding all the
* pids of child processes. */
- int numPids; /* Actual number of processes that exist at
+ size_t numPids; /* Actual number of processes that exist at
* *pidPtr right now. */
int cmdCount; /* Count of number of distinct commands found
* in argc/argv. */
@@ -460,12 +460,12 @@ TclCreatePipeline(
int errorRelease = 0;
const char *p;
const char *nextArg;
- int skip, lastBar, lastArg, i, j, atOK, flags, needCmd, errorToOutput = 0;
+ int skip, atOK, flags, needCmd, errorToOutput = 0;
+ size_t i, j, lastArg, lastBar;
Tcl_DString execBuffer;
TclFile pipeIn;
TclFile curInFile, curOutFile, curErrFile;
Tcl_Channel channel;
- int argc = argc1;
if (inPipePtr != NULL) {
*inPipePtr = NULL;
@@ -497,7 +497,7 @@ TclCreatePipeline(
* list.
*/
- lastBar = -1;
+ lastBar = TCL_INDEX_NONE;
cmdCount = 1;
needCmd = 1;
for (i = 0; i < argc; i++) {
diff --git a/generic/tclProc.c b/generic/tclProc.c
index d3059fa..c7c5de0 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -1649,7 +1649,7 @@ TclNRInterpProcCore(
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
Tcl_Obj *procNameObj, /* Procedure name for error reporting. */
- size_t skip, /* Number of initial arguments to be skipped,
+ size_t skip1, /* Number of initial arguments to be skipped,
* i.e., words in the "command name". */
ProcErrorProc *errorProc) /* How to convert results from the script into
* results of the overall procedure. */
@@ -1659,6 +1659,7 @@ TclNRInterpProcCore(
int result;
CallFrame *freePtr;
ByteCode *codePtr;
+ int skip = skip1;
result = InitArgsAndLocals(interp, skip);
if (result != TCL_OK) {