summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/win-build.yml2
-rw-r--r--README.md7
-rw-r--r--generic/tcl.h15
-rw-r--r--generic/tclAssembly.c6
-rw-r--r--generic/tclBasic.c538
-rw-r--r--generic/tclBinary.c61
-rw-r--r--generic/tclCkalloc.c8
-rw-r--r--generic/tclClock.c46
-rw-r--r--generic/tclCmdAH.c176
-rw-r--r--generic/tclCmdIL.c141
-rw-r--r--generic/tclCmdMZ.c137
-rw-r--r--generic/tclCompCmds.c2
-rw-r--r--generic/tclCompExpr.c16
-rw-r--r--generic/tclCompile.h13
-rw-r--r--generic/tclConfig.c6
-rw-r--r--generic/tclDate.c4
-rw-r--r--generic/tclDecls.h16
-rw-r--r--generic/tclDictObj.c104
-rw-r--r--generic/tclDisassemble.c2
-rw-r--r--generic/tclEnsemble.c76
-rw-r--r--generic/tclEvent.c29
-rw-r--r--generic/tclExecute.c22
-rw-r--r--generic/tclFCmd.c56
-rw-r--r--generic/tclFileName.c6
-rw-r--r--generic/tclGetDate.y4
-rw-r--r--generic/tclHistory.c2
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclIOCmd.c56
-rw-r--r--generic/tclIORChan.c4
-rw-r--r--generic/tclIORTrans.c4
-rw-r--r--generic/tclIndexObj.c16
-rw-r--r--generic/tclInt.decls44
-rw-r--r--generic/tclInt.h365
-rw-r--r--generic/tclIntDecls.h60
-rw-r--r--generic/tclInterp.c119
-rw-r--r--generic/tclLoad.c7
-rw-r--r--generic/tclNamesp.c117
-rw-r--r--generic/tclOO.c70
-rw-r--r--generic/tclOO.decls4
-rw-r--r--generic/tclOO.h4
-rw-r--r--generic/tclOOBasic.c43
-rw-r--r--generic/tclOOCall.c14
-rw-r--r--generic/tclOODecls.h11
-rw-r--r--generic/tclOODefineCmds.c122
-rw-r--r--generic/tclOOInfo.c112
-rw-r--r--generic/tclOOInt.h71
-rw-r--r--generic/tclOOIntDecls.h8
-rw-r--r--generic/tclOOMethod.c75
-rw-r--r--generic/tclOOStubInit.c6
-rw-r--r--generic/tclObj.c2
-rw-r--r--generic/tclPkg.c12
-rw-r--r--generic/tclProc.c93
-rw-r--r--generic/tclProcess.c16
-rw-r--r--generic/tclResult.c2
-rw-r--r--generic/tclScan.c2
-rw-r--r--generic/tclStringObj.c2
-rw-r--r--generic/tclStubInit.c18
-rw-r--r--generic/tclTest.c353
-rw-r--r--generic/tclTestObj.c71
-rw-r--r--generic/tclTestProcBodyObj.c16
-rw-r--r--generic/tclThreadTest.c11
-rw-r--r--generic/tclTimer.c2
-rw-r--r--generic/tclTrace.c67
-rw-r--r--generic/tclVar.c65
-rw-r--r--generic/tclZipfs.c30
-rw-r--r--generic/tclZlib.c49
-rw-r--r--library/init.tcl2
-rw-r--r--tools/tsdPerf.c10
-rwxr-xr-xunix/configure24
-rw-r--r--unix/configure.ac8
-rw-r--r--unix/dltest/pkga.c10
-rw-r--r--unix/dltest/pkgb.c14
-rw-r--r--unix/dltest/pkgc.c10
-rw-r--r--unix/dltest/pkgd.c10
-rw-r--r--unix/dltest/pkgooa.c4
-rw-r--r--unix/dltest/pkgua.c8
-rw-r--r--unix/tcl.spec2
-rw-r--r--unix/tclUnixPipe.c2
-rw-r--r--unix/tclUnixTest.c49
-rw-r--r--unix/tclXtTest.c8
-rw-r--r--win/README4
-rwxr-xr-xwin/configure24
-rw-r--r--win/configure.ac8
-rw-r--r--win/tcl.m48
-rw-r--r--win/tclWinPipe.c2
-rw-r--r--win/tclWinTest.c43
86 files changed, 2020 insertions, 1870 deletions
diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml
index ba4e5ba..2c32e36 100644
--- a/.github/workflows/win-build.yml
+++ b/.github/workflows/win-build.yml
@@ -16,7 +16,6 @@ jobs:
cfgopt:
- ""
- "OPTS=utf16"
- - "CHECKS=nodep"
- "OPTS=static"
- "OPTS=symbols"
- "OPTS=symbols STATS=compdbg,memdbg"
@@ -55,7 +54,6 @@ jobs:
cfgopt:
- ""
- "CFLAGS=-DTCL_UTF_MAX=3"
- - "CFLAGS=-DTCL_NO_DEPRECATED=1"
- "--disable-shared"
- "--enable-symbols"
- "--enable-symbols=mem"
diff --git a/README.md b/README.md
index 1ec9c96..3d63997 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# README: Tcl
-This is the **Tcl 9.0a4** source distribution.
+This is the **Tcl 9.0a0** source distribution.
You can get any source release of Tcl from [our distribution
site](https://sourceforge.net/projects/tcl/files/Tcl/).
@@ -19,6 +19,11 @@ site](https://sourceforge.net/projects/tcl/files/Tcl/).
[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Amain)
[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Amain)
[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Amain)
+<br>
+9.1 (unofficial, with TIP #626))
+[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=tip-626)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Atip-626)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=tip-626)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Atip-626)
+[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=tip-626)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Atip-626)
## Contents
1. [Introduction](#intro)
diff --git a/generic/tcl.h b/generic/tcl.h
index 706c5f1..966807f 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -55,8 +55,8 @@ extern "C" {
# define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE
# define TCL_RELEASE_SERIAL 4
-# define TCL_VERSION "9.0"
-# define TCL_PATCH_LEVEL "9.0a4"
+# define TCL_VERSION "9.1"
+# define TCL_PATCH_LEVEL "9.1a0"
#endif /* TCL_MAJOR_VERSION */
#if defined(RC_INVOKED)
@@ -554,9 +554,11 @@ typedef int (Tcl_CmdProc) (void *clientData, Tcl_Interp *interp,
typedef void (Tcl_CmdTraceProc) (void *clientData, Tcl_Interp *interp,
int level, char *command, Tcl_CmdProc *proc,
void *cmdClientData, int argc, const char *argv[]);
+#ifndef TCL_NO_DEPRECATED
typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp,
int level, const char *command, Tcl_Command commandInfo, int objc,
struct Tcl_Obj *const *objv);
+#endif /* TCL_NO_DEPRECATED */
typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
int level, const char *command, Tcl_Command commandInfo, size_t objc,
struct Tcl_Obj *const *objv);
@@ -580,8 +582,10 @@ typedef void (Tcl_IdleProc) (void *clientData);
typedef void (Tcl_InterpDeleteProc) (void *clientData,
Tcl_Interp *interp);
typedef void (Tcl_NamespaceDeleteProc) (void *clientData);
+#ifndef TCL_NO_DEPRECATED
typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp,
int objc, struct Tcl_Obj *const *objv);
+#endif /* TCL_NO_DEPRECATED */
typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
size_t objc, struct Tcl_Obj *const *objv);
typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
@@ -773,13 +777,18 @@ typedef struct Tcl_CallFrame {
* then calls the other function.
*/
-typedef struct Tcl_CmdInfo {
+typedef struct {
int isNativeObjectProc; /* 1 if objProc was registered by a call to
* Tcl_CreateObjCommand; 2 if objProc was registered by
* a call to Tcl_CreateObjCommand2; 0 otherwise.
* Tcl_SetCmdInfo does not modify this field. */
+#ifdef TCL_NO_DEPRECATED
+ void *objProcNotUsed; /* Command's object-based function. */
+ void *objClientDataNotUsed; /* ClientData for object proc. */
+#else
Tcl_ObjCmdProc *objProc; /* Command's object-based function. */
void *objClientData; /* ClientData for object proc. */
+#endif
Tcl_CmdProc *proc; /* Command's string-based function. */
void *clientData; /* ClientData for string proc. */
Tcl_CmdDeleteProc *deleteProc;
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index b7bfd2d..a963198 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -772,7 +772,7 @@ int
Tcl_AssembleObjCmd(
void *clientData, /* clientData */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/*
@@ -780,14 +780,14 @@ Tcl_AssembleObjCmd(
* because there needs to be one in place to execute bytecode.
*/
- return Tcl_NRCallObjProc(interp, TclNRAssembleObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRAssembleObjCmd, clientData, objc, objv);
}
int
TclNRAssembleObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
ByteCode *codePtr; /* Pointer to the bytecode to execute */
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index cd1bfc8..efdd4b7 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -133,7 +133,7 @@ TCL_DECLARE_MUTEX(commandTypeLock);
* Static functions in this file:
*/
-static Tcl_ObjCmdProc BadEnsembleSubcommand;
+static Tcl_ObjCmdProc2 BadEnsembleSubcommand;
static char * CallCommandTraces(Interp *iPtr, Command *cmdPtr,
const char *oldName, const char *newName,
int flags);
@@ -144,52 +144,55 @@ static void DeleteCoroutine(void *clientData);
static void DeleteInterpProc(Tcl_Interp *interp);
static void DeleteOpCmdClientData(void *clientData);
#ifdef USE_DTRACE
-static Tcl_ObjCmdProc DTraceObjCmd;
+static Tcl_ObjCmdProc2 DTraceObjCmd;
static Tcl_NRPostProc DTraceCmdReturn;
#else
# define DTraceCmdReturn NULL
#endif /* USE_DTRACE */
-static Tcl_ObjCmdProc ExprAbsFunc;
-static Tcl_ObjCmdProc ExprBinaryFunc;
-static Tcl_ObjCmdProc ExprBoolFunc;
-static Tcl_ObjCmdProc ExprCeilFunc;
-static Tcl_ObjCmdProc ExprDoubleFunc;
-static Tcl_ObjCmdProc ExprFloorFunc;
-static Tcl_ObjCmdProc ExprIntFunc;
-static Tcl_ObjCmdProc ExprIsqrtFunc;
-static Tcl_ObjCmdProc ExprIsFiniteFunc;
-static Tcl_ObjCmdProc ExprIsInfinityFunc;
-static Tcl_ObjCmdProc ExprIsNaNFunc;
-static Tcl_ObjCmdProc ExprIsNormalFunc;
-static Tcl_ObjCmdProc ExprIsSubnormalFunc;
-static Tcl_ObjCmdProc ExprIsUnorderedFunc;
-static Tcl_ObjCmdProc ExprMaxFunc;
-static Tcl_ObjCmdProc ExprMinFunc;
-static Tcl_ObjCmdProc ExprRandFunc;
-static Tcl_ObjCmdProc ExprRoundFunc;
-static Tcl_ObjCmdProc ExprSqrtFunc;
-static Tcl_ObjCmdProc ExprSrandFunc;
-static Tcl_ObjCmdProc ExprUnaryFunc;
-static Tcl_ObjCmdProc ExprWideFunc;
-static Tcl_ObjCmdProc FloatClassifyObjCmd;
+static Tcl_ObjCmdProc2 InvokeStringCommand;
+static Tcl_ObjCmdProc2 ExprAbsFunc;
+static Tcl_ObjCmdProc2 ExprBinaryFunc;
+static Tcl_ObjCmdProc2 ExprBoolFunc;
+static Tcl_ObjCmdProc2 ExprCeilFunc;
+static Tcl_ObjCmdProc2 ExprDoubleFunc;
+static Tcl_ObjCmdProc2 ExprFloorFunc;
+static Tcl_ObjCmdProc2 ExprIntFunc;
+static Tcl_ObjCmdProc2 ExprIsqrtFunc;
+static Tcl_ObjCmdProc2 ExprIsFiniteFunc;
+static Tcl_ObjCmdProc2 ExprIsInfinityFunc;
+static Tcl_ObjCmdProc2 ExprIsNaNFunc;
+static Tcl_ObjCmdProc2 ExprIsNormalFunc;
+static Tcl_ObjCmdProc2 ExprIsSubnormalFunc;
+static Tcl_ObjCmdProc2 ExprIsUnorderedFunc;
+static Tcl_ObjCmdProc2 ExprMaxFunc;
+static Tcl_ObjCmdProc2 ExprMinFunc;
+static Tcl_ObjCmdProc2 ExprRandFunc;
+static Tcl_ObjCmdProc2 ExprRoundFunc;
+static Tcl_ObjCmdProc2 ExprSqrtFunc;
+static Tcl_ObjCmdProc2 ExprSrandFunc;
+static Tcl_ObjCmdProc2 ExprUnaryFunc;
+static Tcl_ObjCmdProc2 ExprWideFunc;
+static Tcl_ObjCmdProc2 FloatClassifyObjCmd;
static void MathFuncWrongNumArgs(Tcl_Interp *interp, int expected,
int actual, Tcl_Obj *const *objv);
static Tcl_NRPostProc NRCoroutineCallerCallback;
static Tcl_NRPostProc NRCoroutineExitCallback;
static Tcl_NRPostProc NRCommand;
+static Tcl_CmdProc InvokeObjectCommand;
+
static void ProcessUnexpectedResult(Tcl_Interp *interp,
int returnCode);
static int RewindCoroutine(CoroutineData *corPtr, int result);
static void TEOV_SwitchVarFrame(Tcl_Interp *interp);
static void TEOV_PushExceptionHandlers(Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[], int flags);
+ size_t objc, Tcl_Obj *const objv[], int flags);
static inline Command * TEOV_LookupCmdFromObj(Tcl_Interp *interp,
Tcl_Obj *namePtr, Namespace *lookupNsPtr);
-static int TEOV_NotFound(Tcl_Interp *interp, int objc,
+static int TEOV_NotFound(Tcl_Interp *interp, size_t objc,
Tcl_Obj *const objv[], Namespace *lookupNsPtr);
static int TEOV_RunEnterTraces(Tcl_Interp *interp,
- Command **cmdPtrPtr, Tcl_Obj *commandPtr, int objc,
+ Command **cmdPtrPtr, Tcl_Obj *commandPtr, size_t objc,
Tcl_Obj *const objv[]);
static Tcl_NRPostProc RewindCoroutineCallback;
static Tcl_NRPostProc TEOEx_ByteCodeCallback;
@@ -202,11 +205,11 @@ static Tcl_NRPostProc TEOV_RunLeaveTraces;
static Tcl_NRPostProc EvalObjvCore;
static Tcl_NRPostProc Dispatch;
-static Tcl_ObjCmdProc NRInjectObjCmd;
+static Tcl_ObjCmdProc2 NRInjectObjCmd;
static Tcl_NRPostProc NRPostInvoke;
-static Tcl_ObjCmdProc CoroTypeObjCmd;
-static Tcl_ObjCmdProc TclNRCoroInjectObjCmd;
-static Tcl_ObjCmdProc TclNRCoroProbeObjCmd;
+static Tcl_ObjCmdProc2 CoroTypeObjCmd;
+static Tcl_ObjCmdProc2 TclNRCoroInjectObjCmd;
+static Tcl_ObjCmdProc2 TclNRCoroProbeObjCmd;
static Tcl_NRPostProc InjectHandler;
static Tcl_NRPostProc InjectHandlerPostCall;
@@ -229,9 +232,9 @@ MODULE_SCOPE const TclStubs tclStubs;
typedef struct {
const char *name; /* Name of object-based command. */
- Tcl_ObjCmdProc *objProc; /* Object-based function for command. */
+ Tcl_ObjCmdProc2 *objProc; /* Object-based function for command. */
CompileProc *compileProc; /* Function called to compile command. */
- Tcl_ObjCmdProc *nreProc; /* NR-based function for command */
+ Tcl_ObjCmdProc2 *nreProc; /* NR-based function for command */
int flags; /* Various flag bits, as defined below. */
} CmdInfo;
@@ -264,12 +267,6 @@ typedef struct {
* The built-in commands, and the functions that implement them:
*/
-int procObjCmd(void *clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]) {
- return Tcl_ProcObjCmd(clientData, interp, objc, objv);
-}
-
-
static const CmdInfo builtInCmds[] = {
/*
* Commands in the generic core.
@@ -314,7 +311,7 @@ static const CmdInfo builtInCmds[] = {
{"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, NULL, CMD_IS_SAFE},
{"lsort", Tcl_LsortObjCmd, NULL, NULL, CMD_IS_SAFE},
{"package", Tcl_PackageObjCmd, NULL, TclNRPackageObjCmd, CMD_IS_SAFE},
- {"proc", procObjCmd, NULL, NULL, CMD_IS_SAFE},
+ {"proc", Tcl_ProcObjCmd, NULL, NULL, CMD_IS_SAFE},
{"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, NULL, CMD_IS_SAFE},
{"regsub", Tcl_RegsubObjCmd, TclCompileRegsubCmd, NULL, CMD_IS_SAFE},
{"rename", Tcl_RenameObjCmd, NULL, NULL, CMD_IS_SAFE},
@@ -441,7 +438,7 @@ static const UnsafeEnsembleInfo unsafeEnsembleCommands[] = {
typedef struct {
const char *name; /* Name of the function. The full name is
* "::tcl::mathfunc::<name>". */
- Tcl_ObjCmdProc *objCmdProc; /* Function that evaluates the function */
+ Tcl_ObjCmdProc2 *objCmdProc; /* Function that evaluates the function */
double (*fn)(double x); /* Real function pointer */
} BuiltinFuncDef;
static const BuiltinFuncDef BuiltinFuncTable[] = {
@@ -491,7 +488,7 @@ static const BuiltinFuncDef BuiltinFuncTable[] = {
typedef struct {
const char *name; /* Name of object-based command. */
- Tcl_ObjCmdProc *objProc; /* Object-based function for command. */
+ Tcl_ObjCmdProc2 *objProc; /* Object-based function for command. */
CompileProc *compileProc; /* Function called to compile command. */
union {
int numArgs;
@@ -695,6 +692,7 @@ buildInfoObjCmd2(
return TCL_OK;
}
+#ifndef TCL_NO_DEPRECATED
static int
buildInfoObjCmd(
void *clientData,
@@ -704,6 +702,7 @@ buildInfoObjCmd(
{
return buildInfoObjCmd2(clientData, interp, (size_t)objc, objv);
}
+#endif
/*
*----------------------------------------------------------------------
@@ -776,9 +775,8 @@ Tcl_CreateInterp(void)
Tcl_MutexUnlock(&cancelLock);
}
-#undef TclObjInterpProc
if (commandTypeInit == 0) {
- TclRegisterCommandTypeName(TclObjInterpProc, "proc");
+ TclRegisterCommandTypeName(TclObjInterpProc2, "proc");
TclRegisterCommandTypeName(TclEnsembleImplementationCmd, "ensemble");
TclRegisterCommandTypeName(TclAliasObjCmd, "alias");
TclRegisterCommandTypeName(TclLocalAliasObjCmd, "alias");
@@ -1032,11 +1030,11 @@ Tcl_CreateInterp(void)
* Create the core commands. Do it here, rather than calling
* Tcl_CreateCommand, because it's faster (there's no need to check for a
* pre-existing command by the same name). If a command has a Tcl_CmdProc
- * but no Tcl_ObjCmdProc, set the Tcl_ObjCmdProc to
- * TclInvokeStringCommand. This is an object-based wrapper function that
+ * but no Tcl_ObjCmdProc2, set the Tcl_ObjCmdProc2 to
+ * InvokeStringCommand. This is an object-based wrapper function that
* extracts strings, calls the string function, and creates an object for
- * the result. Similarly, if a command has a Tcl_ObjCmdProc but no
- * Tcl_CmdProc, set the Tcl_CmdProc to TclInvokeObjectCommand.
+ * the result. Similarly, if a command has a Tcl_ObjCmdProc2 but no
+ * Tcl_CmdProc, set the Tcl_CmdProc to InvokeObjectCommand.
*/
for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) {
@@ -1055,10 +1053,10 @@ Tcl_CreateInterp(void)
cmdPtr->refCount = 1;
cmdPtr->cmdEpoch = 0;
cmdPtr->compileProc = cmdInfoPtr->compileProc;
- cmdPtr->proc = TclInvokeObjectCommand;
+ cmdPtr->proc = InvokeObjectCommand;
cmdPtr->clientData = cmdPtr;
- cmdPtr->objProc = cmdInfoPtr->objProc;
- cmdPtr->objClientData = NULL;
+ cmdPtr->objProc2 = cmdInfoPtr->objProc;
+ cmdPtr->objClientData2 = NULL;
cmdPtr->deleteProc = NULL;
cmdPtr->deleteData = NULL;
cmdPtr->flags = 0;
@@ -1067,7 +1065,7 @@ Tcl_CreateInterp(void)
}
cmdPtr->importRefPtr = NULL;
cmdPtr->tracePtr = NULL;
- cmdPtr->nreProc = cmdInfoPtr->nreProc;
+ cmdPtr->nreProc2 = cmdInfoPtr->nreProc;
Tcl_SetHashValue(hPtr, cmdPtr);
}
}
@@ -1108,30 +1106,30 @@ Tcl_CreateInterp(void)
* Register the default [interp bgerror] handler.
*/
- Tcl_CreateObjCommand(interp, "::tcl::Bgerror",
+ Tcl_CreateObjCommand2(interp, "::tcl::Bgerror",
TclDefaultBgErrorHandlerObjCmd, NULL, NULL);
/*
* Create unsupported commands for debugging bytecode and objects.
*/
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::disassemble",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::disassemble",
Tcl_DisassembleObjCmd, INT2PTR(0), NULL);
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::getbytecode",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::getbytecode",
Tcl_DisassembleObjCmd, INT2PTR(1), NULL);
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::representation",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::representation",
Tcl_RepresentationCmd, NULL, NULL);
/* Adding the bytecode assembler command */
- cmdPtr = (Command *) Tcl_NRCreateCommand(interp,
+ cmdPtr = (Command *) Tcl_NRCreateCommand2(interp,
"::tcl::unsupported::assemble", Tcl_AssembleObjCmd,
TclNRAssembleObjCmd, NULL, NULL);
cmdPtr->compileProc = &TclCompileAssembleCmd;
/* Coroutine monkeybusiness */
- Tcl_NRCreateCommand(interp, "::tcl::unsupported::inject", NULL,
+ Tcl_NRCreateCommand2(interp, "::tcl::unsupported::inject", NULL,
NRInjectObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::corotype",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::corotype",
CoroTypeObjCmd, NULL, NULL);
/* Export unsupported commands */
@@ -1146,7 +1144,7 @@ Tcl_CreateInterp(void)
* Register the tcl::dtrace command.
*/
- Tcl_CreateObjCommand(interp, "::tcl::dtrace", DTraceObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "::tcl::dtrace", DTraceObjCmd, NULL, NULL);
#endif /* USE_DTRACE */
/*
@@ -1162,7 +1160,7 @@ Tcl_CreateInterp(void)
for (builtinFuncPtr = BuiltinFuncTable; builtinFuncPtr->name != NULL;
builtinFuncPtr++) {
strcpy(mathFuncName+MATH_FUNC_PREFIX_LEN, builtinFuncPtr->name);
- Tcl_CreateObjCommand(interp, mathFuncName,
+ Tcl_CreateObjCommand2(interp, mathFuncName,
builtinFuncPtr->objCmdProc, (void *)builtinFuncPtr->fn, NULL);
Tcl_Export(interp, nsPtr, builtinFuncPtr->name, 0);
}
@@ -1185,7 +1183,7 @@ Tcl_CreateInterp(void)
occdPtr->i.numArgs = opcmdInfoPtr->i.numArgs;
occdPtr->expected = opcmdInfoPtr->expected;
strcpy(mathFuncName + MATH_OP_PREFIX_LEN, opcmdInfoPtr->name);
- cmdPtr = (Command *) Tcl_CreateObjCommand(interp, mathFuncName,
+ cmdPtr = (Command *) Tcl_CreateObjCommand2(interp, mathFuncName,
opcmdInfoPtr->objProc, occdPtr, DeleteOpCmdClientData);
if (cmdPtr == NULL) {
Tcl_Panic("failed to create math operator %s",
@@ -1247,6 +1245,10 @@ Tcl_CreateInterp(void)
Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, &tclStubs);
Tcl_PkgProvideEx(interp, "tcl", TCL_PATCH_LEVEL, &tclStubs);
+#ifdef TCL_NO_DEPRECATED
+ Tcl_CreateObjCommand2(interp, "::tcl::build-info",
+ buildInfoObjCmd2, (void *)version, NULL);
+#else
Tcl_CmdInfo info2;
Tcl_Command buildInfoCmd = Tcl_CreateObjCommand(interp, "::tcl::build-info",
buildInfoObjCmd, (void *)version, NULL);
@@ -1254,6 +1256,7 @@ Tcl_CreateInterp(void)
info2.objProc2 = buildInfoObjCmd2;
info2.objClientData2 = (void *)version;
Tcl_SetCommandInfoFromToken(buildInfoCmd, &info2);
+#endif
if (TclTommath_Init(interp) != TCL_OK) {
Tcl_Panic("%s", Tcl_GetStringResult(interp));
@@ -1296,7 +1299,7 @@ DeleteOpCmdClientData(
* TclRegisterCommandTypeName, TclGetCommandTypeName --
*
* Command type registration and lookup mechanism. Everything is keyed by
- * the Tcl_ObjCmdProc for the command, and that is used as the *key* into
+ * the Tcl_ObjCmdProc2 for the command, and that is used as the *key* into
* the hash table that maps to constant strings that are names. (It is
* recommended that those names be ASCII.)
*
@@ -1305,7 +1308,7 @@ DeleteOpCmdClientData(
void
TclRegisterCommandTypeName(
- Tcl_ObjCmdProc *implementationProc,
+ Tcl_ObjCmdProc2 *implementationProc,
const char *nameStr)
{
Tcl_HashEntry *hPtr;
@@ -1336,11 +1339,11 @@ TclGetCommandTypeName(
Tcl_Command command)
{
Command *cmdPtr = (Command *) command;
- Tcl_ObjCmdProc *procPtr = cmdPtr->objProc;
+ Tcl_ObjCmdProc2 *procPtr = cmdPtr->objProc2;
const char *name = "native";
if (procPtr == NULL) {
- procPtr = cmdPtr->nreProc;
+ procPtr = cmdPtr->nreProc2;
}
Tcl_MutexLock(&commandTypeLock);
if (commandTypeInit) {
@@ -1407,7 +1410,7 @@ TclHideUnsafeCommands(
unsafePtr->ensembleNsName, unsafePtr->commandName,
Tcl_GetStringResult(interp));
}
- Tcl_CreateObjCommand(interp, TclGetString(cmdName),
+ Tcl_CreateObjCommand2(interp, TclGetString(cmdName),
BadEnsembleSubcommand, (void *)unsafePtr, NULL);
TclDecrRefCount(cmdName);
TclDecrRefCount(hideName);
@@ -1450,7 +1453,7 @@ static int
BadEnsembleSubcommand(
void *clientData,
Tcl_Interp *interp,
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(size_t) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /* objv */)
{
const UnsafeEnsembleInfo *infoPtr = (const UnsafeEnsembleInfo *)clientData;
@@ -2443,8 +2446,8 @@ Tcl_ExposeCommand(
* If a command named cmdName already exists for interp, it is deleted.
* In the future, when cmdName is seen as the name of a command by
* Tcl_Eval, proc will be called. To support the bytecode interpreter,
- * the command is created with a wrapper Tcl_ObjCmdProc
- * (TclInvokeStringCommand) that eventially calls proc. When the command
+ * the command is created with a wrapper Tcl_ObjCmdProc2
+ * (InvokeStringCommand) that eventially calls proc. When the command
* is deleted from the table, deleteProc will be called. See the manual
* entry for details on the calling sequence.
*
@@ -2586,8 +2589,8 @@ Tcl_CreateCommand(
cmdPtr->refCount = 1;
cmdPtr->cmdEpoch = 0;
cmdPtr->compileProc = NULL;
- cmdPtr->objProc = TclInvokeStringCommand;
- cmdPtr->objClientData = cmdPtr;
+ cmdPtr->objProc2 = InvokeStringCommand;
+ cmdPtr->objClientData2 = cmdPtr;
cmdPtr->proc = proc;
cmdPtr->clientData = clientData;
cmdPtr->deleteProc = deleteProc;
@@ -2595,7 +2598,7 @@ Tcl_CreateCommand(
cmdPtr->flags = 0;
cmdPtr->importRefPtr = NULL;
cmdPtr->tracePtr = NULL;
- cmdPtr->nreProc = NULL;
+ cmdPtr->nreProc2 = NULL;
/*
* Plug in any existing import references found above. Be sure to update
@@ -2606,7 +2609,7 @@ Tcl_CreateCommand(
cmdPtr->importRefPtr = oldRefPtr;
while (oldRefPtr != NULL) {
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
- dataPtr = (ImportedCmdData *)refCmdPtr->objClientData;
+ dataPtr = (ImportedCmdData *)refCmdPtr->objClientData2;
dataPtr->realCmdPtr = cmdPtr;
oldRefPtr = oldRefPtr->nextPtr;
}
@@ -2640,32 +2643,34 @@ Tcl_CreateCommand(
*
* In the future, during bytecode evaluation when "cmdName" is seen as
* the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based
- * Tcl_ObjCmdProc proc will be called. When the command is deleted from
+ * Tcl_ObjCmdProc2 proc will be called. When the command is deleted from
* the table, deleteProc will be called. See the manual entry for details
* on the calling sequence.
*
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
typedef struct {
- Tcl_ObjCmdProc2 *proc;
+ Tcl_ObjCmdProc *proc;
void *clientData; /* Arbitrary value to pass to proc function. */
Tcl_CmdDeleteProc *deleteProc;
void *deleteData; /* Arbitrary value to pass to deleteProc function. */
- Tcl_ObjCmdProc2 *nreProc;
+ Tcl_ObjCmdProc *nreProc;
} CmdWrapperInfo;
static int cmdWrapperProc(void *clientData,
- Tcl_Interp *interp,
- int objc,
- Tcl_Obj * const *objv)
+ Tcl_Interp *interp,
+ size_t objc,
+ Tcl_Obj * const *objv)
{
CmdWrapperInfo *info = (CmdWrapperInfo *)clientData;
- if (objc < 0) {
- objc = -1;
+ if (objc > INT_MAX) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?args?");
+ return TCL_ERROR;
}
- return info->proc(info->clientData, interp, (size_t)objc, objv);
+ return info->proc(info->clientData, interp, (int)objc, objv);
}
static void cmdWrapperDeleteProc(void *clientData) {
@@ -2680,14 +2685,14 @@ static void cmdWrapperDeleteProc(void *clientData) {
}
Tcl_Command
-Tcl_CreateObjCommand2(
+Tcl_CreateObjCommand(
Tcl_Interp *interp, /* Token for command interpreter (returned by
* previous call to Tcl_CreateInterp). */
const char *cmdName, /* Name of command. If it contains namespace
* qualifiers, the new command is put in the
* specified namespace; otherwise it is put in
* the global namespace. */
- Tcl_ObjCmdProc2 *proc, /* Object-based function to associate with
+ Tcl_ObjCmdProc *proc, /* Object-based function to associate with
* name. */
void *clientData, /* Arbitrary value to pass to object
* function. */
@@ -2702,20 +2707,21 @@ Tcl_CreateObjCommand2(
info->deleteProc = deleteProc;
info->deleteData = clientData;
- return Tcl_CreateObjCommand(interp, cmdName,
+ return Tcl_CreateObjCommand2(interp, cmdName,
(proc ? cmdWrapperProc : NULL),
info, cmdWrapperDeleteProc);
}
+#endif /* TCL_NO_DEPRECATED */
Tcl_Command
-Tcl_CreateObjCommand(
+Tcl_CreateObjCommand2(
Tcl_Interp *interp, /* Token for command interpreter (returned by
* previous call to Tcl_CreateInterp). */
const char *cmdName, /* Name of command. If it contains namespace
* qualifiers, the new command is put in the
* specified namespace; otherwise it is put in
* the global namespace. */
- Tcl_ObjCmdProc *proc, /* Object-based function to associate with
+ Tcl_ObjCmdProc2 *proc, /* Object-based function to associate with
* name. */
void *clientData, /* Arbitrary value to pass to object
* function. */
@@ -2765,7 +2771,7 @@ TclCreateObjCommandInNs(
const char *cmdName, /* Name of command, without any namespace
* components. */
Tcl_Namespace *namesp, /* The namespace to create the command in */
- Tcl_ObjCmdProc *proc, /* Object-based function to associate with
+ Tcl_ObjCmdProc2 *proc, /* Object-based function to associate with
* name. */
void *clientData, /* Arbitrary value to pass to object
* function. */
@@ -2873,16 +2879,16 @@ TclCreateObjCommandInNs(
cmdPtr->refCount = 1;
cmdPtr->cmdEpoch = 0;
cmdPtr->compileProc = NULL;
- cmdPtr->objProc = proc;
- cmdPtr->objClientData = clientData;
- cmdPtr->proc = TclInvokeObjectCommand;
+ cmdPtr->objProc2 = proc;
+ cmdPtr->objClientData2 = clientData;
+ cmdPtr->proc = InvokeObjectCommand;
cmdPtr->clientData = cmdPtr;
cmdPtr->deleteProc = deleteProc;
cmdPtr->deleteData = clientData;
cmdPtr->flags = 0;
cmdPtr->importRefPtr = NULL;
cmdPtr->tracePtr = NULL;
- cmdPtr->nreProc = NULL;
+ cmdPtr->nreProc2 = NULL;
/*
* Plug in any existing import references found above. Be sure to update
@@ -2894,7 +2900,7 @@ TclCreateObjCommandInNs(
while (oldRefPtr != NULL) {
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
- dataPtr = (ImportedCmdData*)refCmdPtr->objClientData;
+ dataPtr = (ImportedCmdData*)refCmdPtr->objClientData2;
cmdPtr->refCount++;
TclCleanupCommandMacro(dataPtr->realCmdPtr);
dataPtr->realCmdPtr = cmdPtr;
@@ -2916,11 +2922,11 @@ TclCreateObjCommandInNs(
/*
*----------------------------------------------------------------------
*
- * TclInvokeStringCommand --
+ * InvokeStringCommand --
*
- * "Wrapper" Tcl_ObjCmdProc used to call an existing string-based
+ * "Wrapper" Tcl_ObjCmdProc2 used to call an existing string-based
* Tcl_CmdProc if no object-based function exists for a command. A
- * pointer to this function is stored as the Tcl_ObjCmdProc in a Command
+ * pointer to this function is stored as the Tcl_ObjCmdProc2 in a Command
* structure. It simply turns around and calls the string Tcl_CmdProc in
* the Command structure.
*
@@ -2929,24 +2935,30 @@ TclCreateObjCommandInNs(
*
* Side effects:
* Besides those side effects of the called Tcl_CmdProc,
- * TclInvokeStringCommand allocates and frees storage.
+ * InvokeStringCommand allocates and frees storage.
*
*----------------------------------------------------------------------
*/
int
-TclInvokeStringCommand(
+InvokeStringCommand(
void *clientData, /* Points to command's Command structure. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Command *cmdPtr = (Command *)clientData;
int i, result;
- const char **argv = (const char **)
+ const char **argv;
+
+ if (objc > INT_MAX) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?args?");
+ return TCL_ERROR;
+ }
+ argv = (const char **)
TclStackAlloc(interp, (objc + 1) * sizeof(char *));
- for (i = 0; i < objc; i++) {
+ for (i = 0; i < (int)objc; i++) {
argv[i] = TclGetString(objv[i]);
}
argv[objc] = 0;
@@ -2964,26 +2976,26 @@ TclInvokeStringCommand(
/*
*----------------------------------------------------------------------
*
- * TclInvokeObjectCommand --
+ * InvokeObjectCommand --
*
* "Wrapper" Tcl_CmdProc used to call an existing object-based
- * Tcl_ObjCmdProc if no string-based function exists for a command. A
+ * Tcl_ObjCmdProc2 if no string-based function exists for a command. A
* pointer to this function is stored as the Tcl_CmdProc in a Command
- * structure. It simply turns around and calls the object Tcl_ObjCmdProc
+ * structure. It simply turns around and calls the object Tcl_ObjCmdProc2
* in the Command structure.
*
* Results:
* A standard Tcl result value.
*
* Side effects:
- * Besides those side effects of the called Tcl_ObjCmdProc,
- * TclInvokeObjectCommand allocates and frees storage.
+ * Besides those side effects of the called Tcl_ObjCmdProc2,
+ * InvokeObjectCommand allocates and frees storage.
*
*----------------------------------------------------------------------
*/
int
-TclInvokeObjectCommand(
+InvokeObjectCommand(
void *clientData, /* Points to command's Command structure. */
Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
@@ -2992,9 +3004,14 @@ TclInvokeObjectCommand(
Command *cmdPtr = ( Command *) clientData;
Tcl_Obj *objPtr;
int i, length, result;
- Tcl_Obj **objv = (Tcl_Obj **)
- TclStackAlloc(interp, (argc * sizeof(Tcl_Obj *)));
+ Tcl_Obj **objv;
+ if (argc < 0) {
+ argc = -1; /* Make sure any invalid argc is handled as TCL_INDEX_NONE */
+ objv = NULL;
+ } else {
+ objv = (Tcl_Obj **) TclStackAlloc(interp, (argc * sizeof(Tcl_Obj *)));
+ }
for (i = 0; i < argc; i++) {
length = strlen(argv[i]);
TclNewStringObj(objPtr, argv[i], length);
@@ -3003,14 +3020,14 @@ TclInvokeObjectCommand(
}
/*
- * Invoke the command's object-based Tcl_ObjCmdProc.
+ * Invoke the command's object-based Tcl_ObjCmdProc2.
*/
- if (cmdPtr->objProc != NULL) {
- result = cmdPtr->objProc(cmdPtr->objClientData, interp, argc, objv);
+ if (cmdPtr->objProc2 != NULL) {
+ result = cmdPtr->objProc2(cmdPtr->objClientData2, interp, argc, objv);
} else {
- result = Tcl_NRCallObjProc(interp, cmdPtr->nreProc,
- cmdPtr->objClientData, argc, objv);
+ result = Tcl_NRCallObjProc2(interp, cmdPtr->nreProc2,
+ cmdPtr->objClientData2, argc, objv);
}
/*
@@ -3022,7 +3039,9 @@ TclInvokeObjectCommand(
objPtr = objv[i];
Tcl_DecrRefCount(objPtr);
}
- TclStackFree(interp, objv);
+ if (objv != NULL) {
+ TclStackFree(interp, objv);
+ }
return result;
}
@@ -3287,36 +3306,41 @@ Tcl_SetCommandInfo(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
static int
invokeObj2Command(
void *clientData, /* Points to command's Command structure. */
Tcl_Interp *interp, /* Current interpreter. */
- size_t objc, /* Number of arguments. */
+ int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
Command *cmdPtr = (Command *) clientData;
- if (objc > INT_MAX) {
- objc = TCL_INDEX_NONE;
+ if (objc < 0) {
+ objc = -1;
}
- if (cmdPtr->objProc != NULL) {
- result = cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv);
+ if (cmdPtr->objProc2 != NULL) {
+ result = cmdPtr->objProc2(cmdPtr->objClientData2, interp, (size_t)objc, objv);
} else {
- result = Tcl_NRCallObjProc(interp, cmdPtr->nreProc,
- cmdPtr->objClientData, objc, objv);
+ result = Tcl_NRCallObjProc2(interp, cmdPtr->nreProc2,
+ cmdPtr->objClientData2, (size_t)objc, objv);
}
return result;
}
static int cmdWrapper2Proc(void *clientData,
Tcl_Interp *interp,
- size_t objc,
+ int objc,
Tcl_Obj *const objv[])
{
Command *cmdPtr = (Command *)clientData;
- return cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv);
+ if (objc < 0) {
+ objc = -1;
+ }
+ return cmdPtr->objProc2(cmdPtr->objClientData2, interp, (size_t)objc, objv);
}
+#endif
int
Tcl_SetCommandInfoFromToken(
@@ -3336,43 +3360,49 @@ Tcl_SetCommandInfoFromToken(
cmdPtr = (Command *) cmd;
cmdPtr->proc = infoPtr->proc;
cmdPtr->clientData = infoPtr->clientData;
- if (infoPtr->objProc == NULL) {
- cmdPtr->objProc = TclInvokeStringCommand;
- cmdPtr->objClientData = cmdPtr;
- cmdPtr->nreProc = NULL;
+ if (infoPtr->objProc2 == NULL) {
+ cmdPtr->objProc2 = InvokeStringCommand;
+ cmdPtr->objClientData2 = cmdPtr;
+ cmdPtr->nreProc2 = NULL;
} else {
- if (infoPtr->objProc != cmdPtr->objProc) {
- cmdPtr->nreProc = NULL;
- cmdPtr->objProc = infoPtr->objProc;
+ if (infoPtr->objProc2 != cmdPtr->objProc2) {
+ cmdPtr->nreProc2 = NULL;
+ cmdPtr->objProc2 = infoPtr->objProc2;
}
- cmdPtr->objClientData = infoPtr->objClientData;
+ cmdPtr->objClientData2 = infoPtr->objClientData2;
}
+#ifndef TCL_NO_DEPRECATED
if (cmdPtr->deleteProc == cmdWrapperDeleteProc) {
CmdWrapperInfo *info = (CmdWrapperInfo *)cmdPtr->deleteData;
- if (infoPtr->objProc2 == NULL) {
+ if (infoPtr->objProc == NULL) {
info->proc = invokeObj2Command;
info->clientData = cmdPtr;
- info->nreProc = NULL;
+ info->nreProc = NULL;
} else {
- if (infoPtr->objProc2 != info->proc) {
- info->nreProc = NULL;
- info->proc = infoPtr->objProc2;
+ if (infoPtr->objProc != info->proc) {
+ info->nreProc = NULL;
+ info->proc = infoPtr->objProc;
}
- info->clientData = infoPtr->objClientData2;
+ info->clientData = infoPtr->objClientData;
}
info->deleteProc = infoPtr->deleteProc;
info->deleteData = infoPtr->deleteData;
- } else {
- if ((infoPtr->objProc2 != NULL) && (infoPtr->objProc2 != cmdWrapper2Proc)) {
+ } else
+#endif
+ {
+#ifndef TCL_NO_DEPRECATED
+ if ((infoPtr->objProc != NULL) && (infoPtr->objProc != cmdWrapper2Proc)) {
CmdWrapperInfo *info = (CmdWrapperInfo *)Tcl_Alloc(sizeof(CmdWrapperInfo));
- info->proc = infoPtr->objProc2;
- info->clientData = infoPtr->objClientData2;
+ info->proc = infoPtr->objProc;
+ info->clientData = infoPtr->objClientData;
info->nreProc = NULL;
info->deleteProc = infoPtr->deleteProc;
info->deleteData = infoPtr->deleteData;
cmdPtr->deleteProc = cmdWrapperDeleteProc;
cmdPtr->deleteData = info;
- } else {
+ } else
+#endif
+ {
cmdPtr->deleteProc = infoPtr->deleteProc;
cmdPtr->deleteData = infoPtr->deleteData;
}
@@ -3449,25 +3479,30 @@ Tcl_GetCommandInfoFromToken(
cmdPtr = (Command *) cmd;
infoPtr->isNativeObjectProc =
- (cmdPtr->objProc != TclInvokeStringCommand);
- infoPtr->objProc = cmdPtr->objProc;
- infoPtr->objClientData = cmdPtr->objClientData;
+ (cmdPtr->objProc2 != InvokeStringCommand) ? 2 : 0;
+ infoPtr->objProc2 = cmdPtr->objProc2;
+ infoPtr->objClientData2 = cmdPtr->objClientData2;
infoPtr->proc = cmdPtr->proc;
infoPtr->clientData = cmdPtr->clientData;
+#ifndef TCL_NO_DEPRECATED
if (cmdPtr->deleteProc == cmdWrapperDeleteProc) {
CmdWrapperInfo *info = (CmdWrapperInfo *)cmdPtr->deleteData;
infoPtr->deleteProc = info->deleteProc;
- infoPtr->deleteData = info->deleteData;
- infoPtr->objProc2 = info->proc;
- infoPtr->objClientData2 = info->clientData;
- if (cmdPtr->objProc == cmdWrapperProc) {
- infoPtr->isNativeObjectProc = 2;
+ infoPtr->deleteData = info->deleteData;
+ infoPtr->objProc = info->proc;
+ infoPtr->objClientData = info->clientData;
+ if (cmdPtr->objProc2 == cmdWrapperProc) {
+ infoPtr->isNativeObjectProc = 1;
}
- } else {
+ } else
+#endif
+ {
infoPtr->deleteProc = cmdPtr->deleteProc;
infoPtr->deleteData = cmdPtr->deleteData;
- infoPtr->objProc2 = cmdWrapper2Proc;
- infoPtr->objClientData2 = cmdPtr;
+#ifndef TCL_NO_DEPRECATED
+ infoPtr->objProc = cmdWrapper2Proc;
+ infoPtr->objClientData = cmdPtr;
+#endif
}
infoPtr->namespacePtr = (Tcl_Namespace *) cmdPtr->nsPtr;
return 1;
@@ -3783,7 +3818,7 @@ Tcl_DeleteCommandFromToken(
* commands.
*/
- cmdPtr->objProc = NULL;
+ cmdPtr->objProc2 = NULL;
/*
* Now free the Command structure, unless there is another reference to it
@@ -4429,7 +4464,7 @@ EvalObjvCore(
{
Command *cmdPtr = NULL, *preCmdPtr = (Command *)data[0];
int flags = PTR2INT(data[1]);
- int objc = PTR2INT(data[2]);
+ size_t objc = PTR2INT(data[2]);
Tcl_Obj **objv = (Tcl_Obj **)data[3];
Interp *iPtr = (Interp *) interp;
Namespace *lookupNsPtr = NULL;
@@ -4576,8 +4611,8 @@ EvalObjvCore(
}
TclNRAddCallback(interp, Dispatch,
- cmdPtr->nreProc ? cmdPtr->nreProc : cmdPtr->objProc,
- cmdPtr->objClientData, INT2PTR(objc), objv);
+ cmdPtr->nreProc2 ? cmdPtr->nreProc2 : cmdPtr->objProc2,
+ cmdPtr->objClientData2, INT2PTR(objc), objv);
return TCL_OK;
}
@@ -4587,16 +4622,16 @@ Dispatch(
Tcl_Interp *interp,
TCL_UNUSED(int) /*result*/)
{
- Tcl_ObjCmdProc *objProc = (Tcl_ObjCmdProc *)data[0];
+ Tcl_ObjCmdProc2 *objProc = (Tcl_ObjCmdProc2 *)data[0];
void *clientData = data[1];
- int objc = PTR2INT(data[2]);
+ size_t objc = PTR2INT(data[2]);
Tcl_Obj **objv = (Tcl_Obj **)data[3];
Interp *iPtr = (Interp *) interp;
#ifdef USE_DTRACE
if (TCL_DTRACE_CMD_ARGS_ENABLED()) {
const char *a[10];
- int i = 0;
+ size_t i = 0;
while (i < 10) {
a[i] = i < objc ? TclGetString(objv[i]) : NULL; i++;
@@ -4702,7 +4737,7 @@ NRCommand(
static void
TEOV_PushExceptionHandlers(
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[],
int flags)
{
@@ -4798,7 +4833,7 @@ TEOV_Error(
Tcl_Obj *listPtr;
const char *cmdString;
size_t cmdLen;
- int objc = PTR2INT(data[0]);
+ size_t objc = PTR2INT(data[0]);
Tcl_Obj **objv = (Tcl_Obj **)data[1];
if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) {
@@ -4820,7 +4855,7 @@ TEOV_Error(
static int
TEOV_NotFound(
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[],
Namespace *lookupNsPtr)
{
@@ -4921,11 +4956,11 @@ TEOV_NotFoundCallback(
int result)
{
Interp *iPtr = (Interp *) interp;
- int objc = PTR2INT(data[0]);
+ size_t objc = PTR2INT(data[0]);
Tcl_Obj **objv = (Tcl_Obj **)data[1];
Namespace *savedNsPtr = (Namespace *)data[2];
- int i;
+ size_t i;
if (savedNsPtr) {
iPtr->varFramePtr->nsPtr = savedNsPtr;
@@ -4948,7 +4983,7 @@ TEOV_RunEnterTraces(
Tcl_Interp *interp,
Command **cmdPtrPtr,
Tcl_Obj *commandPtr,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
@@ -5002,7 +5037,7 @@ TEOV_RunLeaveTraces(
{
Interp *iPtr = (Interp *) interp;
int traceCode = TCL_OK;
- int objc = PTR2INT(data[0]);
+ size_t objc = PTR2INT(data[0]);
Tcl_Obj *commandPtr = (Tcl_Obj *)data[1];
Command *cmdPtr = (Command *)data[2];
Tcl_Obj **objv = (Tcl_Obj **)data[3];
@@ -5703,11 +5738,12 @@ void
TclArgumentEnter(
Tcl_Interp *interp,
Tcl_Obj **objv,
- int objc,
+ size_t objc,
CmdFrame *cfPtr)
{
Interp *iPtr = (Interp *) interp;
- int isNew, i;
+ int isNew;
+ size_t i;
Tcl_HashEntry *hPtr;
CFWord *cfwPtr;
@@ -5771,10 +5807,10 @@ void
TclArgumentRelease(
Tcl_Interp *interp,
Tcl_Obj **objv,
- int objc)
+ size_t objc)
{
Interp *iPtr = (Interp *) interp;
- int i;
+ size_t i;
for (i = 1; i < objc; i++) {
CFWord *cfwPtr;
@@ -5819,14 +5855,14 @@ void
TclArgumentBCEnter(
Tcl_Interp *interp,
Tcl_Obj *objv[],
- int objc,
+ size_t objc,
void *codePtr,
CmdFrame *cfPtr,
int cmd,
size_t pc)
{
ExtCmdLoc *eclPtr;
- int word;
+ size_t word;
ECL *ePtr;
CFWordBC *lastPtr = NULL;
Interp *iPtr = (Interp *) interp;
@@ -6617,7 +6653,7 @@ int
TclObjInvokeNamespace(
Tcl_Interp *interp, /* Interpreter in which command is to be
* invoked. */
- int objc, /* Count of arguments. */
+ size_t objc, /* Count of arguments. */
Tcl_Obj *const objv[], /* Argument objects; objv[0] points to the
* name of the command to invoke. */
Tcl_Namespace *nsPtr, /* The namespace to use. */
@@ -6661,7 +6697,7 @@ int
TclObjInvoke(
Tcl_Interp *interp, /* Interpreter in which command is to be
* invoked. */
- int objc, /* Count of arguments. */
+ size_t objc, /* Count of arguments. */
Tcl_Obj *const objv[], /* Argument objects; objv[0] points to the
* name of the command to invoke. */
int flags) /* Combination of flags controlling the call:
@@ -6679,14 +6715,14 @@ TclObjInvoke(
if ((flags & TCL_INVOKE_HIDDEN) == 0) {
Tcl_Panic("TclObjInvoke: called without TCL_INVOKE_HIDDEN");
}
- return Tcl_NRCallObjProc(interp, TclNRInvoke, NULL, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRInvoke, NULL, objc, objv);
}
int
TclNRInvoke(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
@@ -7017,7 +7053,7 @@ ExprCeilFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
int code;
@@ -7057,7 +7093,7 @@ ExprFloorFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
int code;
@@ -7096,7 +7132,7 @@ static int
ExprIsqrtFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
void *ptr;
@@ -7203,7 +7239,7 @@ ExprSqrtFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
int code;
@@ -7257,7 +7293,7 @@ ExprUnaryFunc(
* double result. */
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
int code;
@@ -7321,7 +7357,7 @@ ExprBinaryFunc(
* double result. */
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
int code;
@@ -7371,7 +7407,7 @@ ExprAbsFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
void *ptr;
@@ -7479,7 +7515,7 @@ ExprBoolFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
int value;
@@ -7500,7 +7536,7 @@ ExprDoubleFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
double dResult;
@@ -7527,7 +7563,7 @@ ExprIntFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
double d;
@@ -7583,7 +7619,7 @@ ExprWideFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
Tcl_WideInt wResult;
@@ -7604,13 +7640,14 @@ ExprMaxMinFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv, /* Actual parameter vector. */
int op) /* Comparison direction */
{
Tcl_Obj *res;
double d;
- int type, i;
+ int type;
+ size_t i;
void *ptr;
if (objc < 2) {
@@ -7644,7 +7681,7 @@ ExprMaxFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
return ExprMaxMinFunc(NULL, interp, objc, objv, MP_GT);
@@ -7655,7 +7692,7 @@ ExprMinFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
return ExprMaxMinFunc(NULL, interp, objc, objv, MP_LT);
@@ -7666,7 +7703,7 @@ ExprRandFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
Interp *iPtr = (Interp *) interp;
@@ -7759,7 +7796,7 @@ ExprRoundFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
double d;
@@ -7838,7 +7875,7 @@ ExprSrandFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ size_t objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
Interp *iPtr = (Interp *) interp;
@@ -8027,7 +8064,7 @@ ExprIsFiniteFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
@@ -8058,7 +8095,7 @@ ExprIsInfinityFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
@@ -8088,7 +8125,7 @@ ExprIsNaNFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
@@ -8118,7 +8155,7 @@ ExprIsNormalFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
@@ -8148,7 +8185,7 @@ ExprIsSubnormalFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
@@ -8178,7 +8215,7 @@ ExprIsUnorderedFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
@@ -8219,7 +8256,7 @@ FloatClassifyObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ size_t objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
@@ -8327,12 +8364,12 @@ static int
DTraceObjCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (TCL_DTRACE_TCL_PROBE_ENABLED()) {
char *a[10];
- int i = 0;
+ size_t i = 0;
while (i++ < 10) {
a[i-1] = i < objc ? TclGetString(objv[i]) : NULL;
@@ -8470,9 +8507,9 @@ TCL_DTRACE_DEBUG_LOG()
*/
int
-Tcl_NRCallObjProc(
+Tcl_NRCallObjProc2(
Tcl_Interp *interp,
- Tcl_ObjCmdProc *objProc,
+ Tcl_ObjCmdProc2 *objProc,
void *clientData,
size_t objc,
Tcl_Obj *const objv[])
@@ -8484,26 +8521,24 @@ Tcl_NRCallObjProc(
return TclNRRunCallbacks(interp, TCL_OK, rootPtr);
}
+#ifndef TCL_NO_DEPRECATED
int wrapperNRObjProc(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CmdWrapperInfo *info = (CmdWrapperInfo *)clientData;
clientData = info->clientData;
- Tcl_ObjCmdProc2 *proc = info->proc;
+ Tcl_ObjCmdProc *proc = info->proc;
Tcl_Free(info);
- if (objc < 0) {
- objc = -1;
- }
- return proc(clientData, interp, (size_t)objc, objv);
+ return proc(clientData, interp, (int)objc, objv);
}
int
-Tcl_NRCallObjProc2(
+Tcl_NRCallObjProc(
Tcl_Interp *interp,
- Tcl_ObjCmdProc2 *objProc,
+ Tcl_ObjCmdProc *objProc,
void *clientData,
size_t objc,
Tcl_Obj *const objv[])
@@ -8522,6 +8557,7 @@ Tcl_NRCallObjProc2(
INT2PTR(objc), objv);
return TclNRRunCallbacks(interp, TCL_OK, rootPtr);
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -8537,45 +8573,43 @@ Tcl_NRCallObjProc2(
* Side effects:
* If no command named "cmdName" already exists for interp, one is
* created. Otherwise, if a command does exist, then if the object-based
- * Tcl_ObjCmdProc is TclInvokeStringCommand, we assume Tcl_CreateCommand
+ * Tcl_ObjCmdProc2 is InvokeStringCommand, we assume Tcl_CreateCommand
* was called previously for the same command and just set its
- * Tcl_ObjCmdProc to the argument "proc"; otherwise, we delete the old
+ * Tcl_ObjCmdProc2 to the argument "proc"; otherwise, we delete the old
* command.
*
* In the future, during bytecode evaluation when "cmdName" is seen as
* the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based
- * Tcl_ObjCmdProc proc will be called. When the command is deleted from
+ * Tcl_ObjCmdProc2 proc will be called. When the command is deleted from
* the table, deleteProc will be called. See the manual entry for details
* on the calling sequence.
*
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
static int cmdWrapperNreProc(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CmdWrapperInfo *info = (CmdWrapperInfo *)clientData;
- if (objc < 0) {
- objc = -1;
- }
- return info->nreProc(info->clientData, interp, (size_t)objc, objv);
+ return info->nreProc(info->clientData, interp, objc, objv);
}
Tcl_Command
-Tcl_NRCreateCommand2(
+Tcl_NRCreateCommand(
Tcl_Interp *interp, /* Token for command interpreter (returned by
* previous call to Tcl_CreateInterp). */
const char *cmdName, /* Name of command. If it contains namespace
* qualifiers, the new command is put in the
* specified namespace; otherwise it is put in
* the global namespace. */
- Tcl_ObjCmdProc2 *proc, /* Object-based function to associate with
+ Tcl_ObjCmdProc *proc, /* Object-based function to associate with
* name, provides direct access for direct
* calls. */
- Tcl_ObjCmdProc2 *nreProc, /* Object-based function to associate with
+ Tcl_ObjCmdProc *nreProc, /* Object-based function to associate with
* name, provides NR implementation */
void *clientData, /* Arbitrary value to pass to object
* function. */
@@ -8589,24 +8623,26 @@ Tcl_NRCreateCommand2(
info->nreProc = nreProc;
info->deleteProc = deleteProc;
info->deleteData = clientData;
- return Tcl_NRCreateCommand(interp, cmdName,
+ return Tcl_NRCreateCommand2(interp, cmdName,
(proc ? cmdWrapperProc : NULL),
(nreProc ? cmdWrapperNreProc : NULL),
info, cmdWrapperDeleteProc);
}
+#endif /* TCL_NO_DEPRECATED */
+
Tcl_Command
-Tcl_NRCreateCommand(
+Tcl_NRCreateCommand2(
Tcl_Interp *interp, /* Token for command interpreter (returned by
* previous call to Tcl_CreateInterp). */
const char *cmdName, /* Name of command. If it contains namespace
* qualifiers, the new command is put in the
* specified namespace; otherwise it is put in
* the global namespace. */
- Tcl_ObjCmdProc *proc, /* Object-based function to associate with
+ Tcl_ObjCmdProc2 *proc, /* Object-based function to associate with
* name, provides direct access for direct
* calls. */
- Tcl_ObjCmdProc *nreProc, /* Object-based function to associate with
+ Tcl_ObjCmdProc2 *nreProc, /* Object-based function to associate with
* name, provides NR implementation */
void *clientData, /* Arbitrary value to pass to object
* function. */
@@ -8615,10 +8651,10 @@ Tcl_NRCreateCommand(
* this command is deleted. */
{
Command *cmdPtr = (Command *)
- Tcl_CreateObjCommand(interp, cmdName, proc, clientData,
+ Tcl_CreateObjCommand2(interp, cmdName, proc, clientData,
deleteProc);
- cmdPtr->nreProc = nreProc;
+ cmdPtr->nreProc2 = nreProc;
return (Tcl_Command) cmdPtr;
}
@@ -8627,8 +8663,8 @@ TclNRCreateCommandInNs(
Tcl_Interp *interp,
const char *cmdName,
Tcl_Namespace *nsPtr,
- Tcl_ObjCmdProc *proc,
- Tcl_ObjCmdProc *nreProc,
+ Tcl_ObjCmdProc2 *proc,
+ Tcl_ObjCmdProc2 *nreProc,
void *clientData,
Tcl_CmdDeleteProc *deleteProc)
{
@@ -8636,7 +8672,7 @@ TclNRCreateCommandInNs(
TclCreateObjCommandInNs(interp, cmdName, nsPtr, proc, clientData,
deleteProc);
- cmdPtr->nreProc = nreProc;
+ cmdPtr->nreProc2 = nreProc;
return (Tcl_Command) cmdPtr;
}
@@ -8794,7 +8830,7 @@ int
TclNRTailcallObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
@@ -8956,7 +8992,7 @@ int
TclNRYieldObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
@@ -8987,7 +9023,7 @@ int
TclNRYieldToObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
@@ -9313,7 +9349,7 @@ static int
CoroTypeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Command *cmdPtr;
@@ -9329,7 +9365,7 @@ CoroTypeObjCmd(
*/
cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objv[1]);
- if ((!cmdPtr) || (cmdPtr->nreProc != TclNRInterpCoroutine)) {
+ if ((!cmdPtr) || (cmdPtr->nreProc2 != TclNRInterpCoroutine)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can only get coroutine type of a coroutine", -1));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COROUTINE",
@@ -9342,7 +9378,7 @@ CoroTypeObjCmd(
* future.
*/
- corPtr = (CoroutineData *)cmdPtr->objClientData;
+ corPtr = (CoroutineData *)cmdPtr->objClientData2;
if (!COR_IS_SUSPENDED(corPtr)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("active", -1));
return TCL_OK;
@@ -9390,20 +9426,20 @@ GetCoroutineFromObj(
Command *cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objPtr);
- if ((!cmdPtr) || (cmdPtr->nreProc != TclNRInterpCoroutine)) {
+ if ((!cmdPtr) || (cmdPtr->nreProc2 != TclNRInterpCoroutine)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(errMsg, -1));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COROUTINE",
TclGetString(objPtr), NULL);
return NULL;
}
- return (CoroutineData *)cmdPtr->objClientData;
+ return (CoroutineData *)cmdPtr->objClientData2;
}
static int
TclNRCoroInjectObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr;
@@ -9448,7 +9484,7 @@ static int
TclNRCoroProbeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr;
@@ -9638,7 +9674,7 @@ static int
NRInjectObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr;
@@ -9683,7 +9719,7 @@ int
TclNRInterpCoroutine(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
CoroutineData *corPtr = (CoroutineData *)clientData;
@@ -9747,7 +9783,7 @@ int
TclNRCoroutineObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Command *cmdPtr;
@@ -9880,7 +9916,7 @@ int
TclInfoCoroutineCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index f27bb93..1b11ae3 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -72,15 +72,15 @@ static int NeedReversing(int format);
static void CopyNumber(const void *from, void *to,
size_t length, int type);
/* Binary ensemble commands */
-static Tcl_ObjCmdProc BinaryFormatCmd;
-static Tcl_ObjCmdProc BinaryScanCmd;
+static Tcl_ObjCmdProc2 BinaryFormatCmd;
+static Tcl_ObjCmdProc2 BinaryScanCmd;
/* Binary encoding sub-ensemble commands */
-static Tcl_ObjCmdProc BinaryEncodeHex;
-static Tcl_ObjCmdProc BinaryDecodeHex;
-static Tcl_ObjCmdProc BinaryEncode64;
-static Tcl_ObjCmdProc BinaryDecode64;
-static Tcl_ObjCmdProc BinaryEncodeUu;
-static Tcl_ObjCmdProc BinaryDecodeUu;
+static Tcl_ObjCmdProc2 BinaryEncodeHex;
+static Tcl_ObjCmdProc2 BinaryDecodeHex;
+static Tcl_ObjCmdProc2 BinaryEncode64;
+static Tcl_ObjCmdProc2 BinaryDecode64;
+static Tcl_ObjCmdProc2 BinaryEncodeUu;
+static Tcl_ObjCmdProc2 BinaryDecodeUu;
/*
* The following tables are used by the binary encoders
@@ -853,10 +853,10 @@ static int
BinaryFormatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int arg; /* Index of next argument to consume. */
+ size_t arg; /* Index of next argument to consume. */
int value = 0; /* Current integer value to be packed.
* Initialized to avoid compiler warning. */
char cmd; /* Current format character. */
@@ -1362,10 +1362,10 @@ static int
BinaryScanCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int arg; /* Index of next argument to consume. */
+ size_t arg; /* Index of next argument to consume. */
int value = 0; /* Current integer value to be packed.
* Initialized to avoid compiler warning. */
char cmd; /* Current format character. */
@@ -2446,7 +2446,7 @@ static int
BinaryEncodeHex(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj = NULL;
@@ -2494,14 +2494,14 @@ static int
BinaryDecodeHex(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj = NULL;
unsigned char *data, *datastart, *dataend;
unsigned char *begin, *cursor, c;
- int i, index, value, pure = 1, strict = 0;
- size_t size, cut = 0, count = 0;
+ int index, value, pure = 1, strict = 0;
+ size_t i, size, cut = 0, count = 0;
int ucs4;
enum {OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };
@@ -2619,15 +2619,15 @@ static int
BinaryEncode64(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj;
unsigned char *data, *limit;
int maxlen = 0;
const char *wrapchar = "\n";
- size_t wrapcharlen = 1;
- int i, index, size, outindex = 0, purewrap = 1;
+ size_t i, wrapcharlen = 1;
+ int index, size, outindex = 0, purewrap = 1;
size_t offset, count = 0;
enum { OPT_MAXLEN, OPT_WRAPCHAR };
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
@@ -2745,17 +2745,16 @@ static int
BinaryEncodeUu(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj;
unsigned char *data, *start, *cursor;
- int rawLength, i, bits, index;
- unsigned int n;
- int lineLength = 61;
+ int bits, index, lineLength = 61;
+ size_t rawLength;
const unsigned char SingleNewline[] = { UCHAR('\n') };
const unsigned char *wrapchar = SingleNewline;
- size_t j, offset, count = 0, wrapcharlen = sizeof(SingleNewline);
+ size_t n, i, j, offset, count = 0, wrapcharlen = sizeof(SingleNewline);
enum { OPT_MAXLEN, OPT_WRAPCHAR };
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
@@ -2845,7 +2844,7 @@ BinaryEncodeUu(
*/
while (offset < count) {
- int lineLen = count - offset;
+ size_t lineLen = count - offset;
if (lineLen > rawLength) {
lineLen = rawLength;
@@ -2897,14 +2896,14 @@ static int
BinaryDecodeUu(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj = NULL;
unsigned char *data, *datastart, *dataend;
unsigned char *begin, *cursor;
- int i, index, pure = 1, strict = 0, lineLen;
- size_t size, count = 0;
+ int index, pure = 1, strict = 0, lineLen;
+ size_t i, size, count = 0;
unsigned char c;
int ucs4;
enum { OPT_STRICT };
@@ -3071,7 +3070,7 @@ static int
BinaryDecode64(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj = NULL;
@@ -3079,8 +3078,8 @@ BinaryDecode64(
unsigned char *begin = NULL;
unsigned char *cursor = NULL;
int pure = 1, strict = 0;
- int i, index, cut = 0;
- size_t size, count = 0;
+ int index, cut = 0;
+ size_t i, size, count = 0;
int ucs4;
enum { OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index f7cab9f..216f3e5 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -799,7 +799,7 @@ static int
MemoryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Obj values of arguments. */
{
const char *fileName;
@@ -971,7 +971,7 @@ static int
CheckmemCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Interpreter for evaluation. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Obj values of arguments. */
{
if (objc != 2) {
@@ -1005,8 +1005,8 @@ Tcl_InitMemory(
* added */
{
TclInitDbCkalloc();
- Tcl_CreateObjCommand(interp, "memory", MemoryCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "checkmem", CheckmemCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "memory", MemoryCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "checkmem", CheckmemCmd, NULL, NULL);
}
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 6fd8327..3688d6d 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -160,16 +160,16 @@ static void GetJulianDayFromEraYearWeekDay(TclDateFields *, int);
static void GetJulianDayFromEraYearMonthDay(TclDateFields *, int);
static int IsGregorianLeapYear(TclDateFields *);
static int WeekdayOnOrBefore(int, int);
-static Tcl_ObjCmdProc ClockClicksObjCmd;
-static Tcl_ObjCmdProc ClockConvertlocaltoutcObjCmd;
-static Tcl_ObjCmdProc ClockGetdatefieldsObjCmd;
-static Tcl_ObjCmdProc ClockGetjuliandayfromerayearmonthdayObjCmd;
-static Tcl_ObjCmdProc ClockGetjuliandayfromerayearweekdayObjCmd;
-static Tcl_ObjCmdProc ClockGetenvObjCmd;
-static Tcl_ObjCmdProc ClockMicrosecondsObjCmd;
-static Tcl_ObjCmdProc ClockMillisecondsObjCmd;
-static Tcl_ObjCmdProc ClockParseformatargsObjCmd;
-static Tcl_ObjCmdProc ClockSecondsObjCmd;
+static Tcl_ObjCmdProc2 ClockClicksObjCmd;
+static Tcl_ObjCmdProc2 ClockConvertlocaltoutcObjCmd;
+static Tcl_ObjCmdProc2 ClockGetdatefieldsObjCmd;
+static Tcl_ObjCmdProc2 ClockGetjuliandayfromerayearmonthdayObjCmd;
+static Tcl_ObjCmdProc2 ClockGetjuliandayfromerayearweekdayObjCmd;
+static Tcl_ObjCmdProc2 ClockGetenvObjCmd;
+static Tcl_ObjCmdProc2 ClockMicrosecondsObjCmd;
+static Tcl_ObjCmdProc2 ClockMillisecondsObjCmd;
+static Tcl_ObjCmdProc2 ClockParseformatargsObjCmd;
+static Tcl_ObjCmdProc2 ClockSecondsObjCmd;
static struct tm * ThreadSafeLocalTime(const time_t *);
static void TzsetIfNecessary(void);
static void ClockDeleteCmdProc(void *);
@@ -182,7 +182,7 @@ struct ClockCommand {
const char *name; /* The tail of the command name. The full name
* is "::tcl::clock::<name>". When NULL marks
* the end of the table. */
- Tcl_ObjCmdProc *objCmdProc; /* Function that implements the command. This
+ Tcl_ObjCmdProc2 *objCmdProc; /* Function that implements the command. This
* will always have the ClockClientData sent
* to it, but may well ignore this data. */
};
@@ -273,7 +273,7 @@ TclClockInit(
for (clockCmdPtr=clockCommands ; clockCmdPtr->name!=NULL ; clockCmdPtr++) {
strcpy(cmdName + TCL_CLOCK_PREFIX_LEN, clockCmdPtr->name);
data->refCount++;
- Tcl_CreateObjCommand(interp, cmdName, clockCmdPtr->objCmdProc, data,
+ Tcl_CreateObjCommand2(interp, cmdName, clockCmdPtr->objCmdProc, data,
ClockDeleteCmdProc);
}
@@ -313,7 +313,7 @@ static int
ClockConvertlocaltoutcObjCmd(
void *clientData, /* Client data */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
ClockClientData *data = (ClockClientData *)clientData;
@@ -405,7 +405,7 @@ int
ClockGetdatefieldsObjCmd(
void *clientData, /* Opaque pointer to literal pool, etc. */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
TclDateFields fields;
@@ -559,7 +559,7 @@ static int
ClockGetjuliandayfromerayearmonthdayObjCmd(
void *clientData, /* Opaque pointer to literal pool, etc. */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
TclDateFields fields;
@@ -643,7 +643,7 @@ static int
ClockGetjuliandayfromerayearweekdayObjCmd(
void *clientData, /* Opaque pointer to literal pool, etc. */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
TclDateFields fields;
@@ -1627,7 +1627,7 @@ int
ClockGetenvObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
#ifdef _WIN32
@@ -1730,7 +1730,7 @@ int
ClockClicksObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
static const char *const clicksSwitches[] = {
@@ -1800,7 +1800,7 @@ int
ClockMillisecondsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
Tcl_Time now;
@@ -1837,7 +1837,7 @@ int
ClockMicrosecondsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
if (objc != 1) {
@@ -1870,7 +1870,7 @@ static int
ClockParseformatargsObjCmd(
void *clientData, /* Client data containing literal pool */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter vector */
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
@@ -1890,7 +1890,7 @@ ClockParseformatargsObjCmd(
int optionIndex; /* Index of an option. */
int saw = 0; /* Flag == 1 if option was seen already. */
Tcl_WideInt clockVal; /* Clock value - just used to parse. */
- int i;
+ size_t i;
/*
* Args consist of a time followed by keyword-value pairs.
@@ -1988,7 +1988,7 @@ int
ClockSecondsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
Tcl_Time now;
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index aa898ea..54d09a5 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -46,11 +46,11 @@ struct ForeachState {
static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr,
int mode);
-static Tcl_ObjCmdProc EncodingConvertfromObjCmd;
-static Tcl_ObjCmdProc EncodingConverttoObjCmd;
-static Tcl_ObjCmdProc EncodingDirsObjCmd;
-static Tcl_ObjCmdProc EncodingNamesObjCmd;
-static Tcl_ObjCmdProc EncodingSystemObjCmd;
+static Tcl_ObjCmdProc2 EncodingConvertfromObjCmd;
+static Tcl_ObjCmdProc2 EncodingConverttoObjCmd;
+static Tcl_ObjCmdProc2 EncodingDirsObjCmd;
+static Tcl_ObjCmdProc2 EncodingNamesObjCmd;
+static Tcl_ObjCmdProc2 EncodingSystemObjCmd;
static inline int ForeachAssignments(Tcl_Interp *interp,
struct ForeachState *statePtr);
static inline void ForeachCleanup(Tcl_Interp *interp,
@@ -61,7 +61,7 @@ static const char * GetTypeFromMode(int mode);
static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName,
Tcl_StatBuf *statPtr);
static int EachloopCmd(Tcl_Interp *interp, int collect,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static Tcl_NRPostProc CatchObjCmdCallback;
static Tcl_NRPostProc ExprCallback;
static Tcl_NRPostProc ForSetupCallback;
@@ -71,31 +71,31 @@ static Tcl_NRPostProc ForPostNextCallback;
static Tcl_NRPostProc ForeachLoopStep;
static Tcl_NRPostProc EvalCmdErrMsg;
-static Tcl_ObjCmdProc FileAttrAccessTimeCmd;
-static Tcl_ObjCmdProc FileAttrIsDirectoryCmd;
-static Tcl_ObjCmdProc FileAttrIsExecutableCmd;
-static Tcl_ObjCmdProc FileAttrIsExistingCmd;
-static Tcl_ObjCmdProc FileAttrIsFileCmd;
-static Tcl_ObjCmdProc FileAttrIsOwnedCmd;
-static Tcl_ObjCmdProc FileAttrIsReadableCmd;
-static Tcl_ObjCmdProc FileAttrIsWritableCmd;
-static Tcl_ObjCmdProc FileAttrLinkStatCmd;
-static Tcl_ObjCmdProc FileAttrModifyTimeCmd;
-static Tcl_ObjCmdProc FileAttrSizeCmd;
-static Tcl_ObjCmdProc FileAttrStatCmd;
-static Tcl_ObjCmdProc FileAttrTypeCmd;
-static Tcl_ObjCmdProc FilesystemSeparatorCmd;
-static Tcl_ObjCmdProc FilesystemVolumesCmd;
-static Tcl_ObjCmdProc PathDirNameCmd;
-static Tcl_ObjCmdProc PathExtensionCmd;
-static Tcl_ObjCmdProc PathFilesystemCmd;
-static Tcl_ObjCmdProc PathJoinCmd;
-static Tcl_ObjCmdProc PathNativeNameCmd;
-static Tcl_ObjCmdProc PathNormalizeCmd;
-static Tcl_ObjCmdProc PathRootNameCmd;
-static Tcl_ObjCmdProc PathSplitCmd;
-static Tcl_ObjCmdProc PathTailCmd;
-static Tcl_ObjCmdProc PathTypeCmd;
+static Tcl_ObjCmdProc2 FileAttrAccessTimeCmd;
+static Tcl_ObjCmdProc2 FileAttrIsDirectoryCmd;
+static Tcl_ObjCmdProc2 FileAttrIsExecutableCmd;
+static Tcl_ObjCmdProc2 FileAttrIsExistingCmd;
+static Tcl_ObjCmdProc2 FileAttrIsFileCmd;
+static Tcl_ObjCmdProc2 FileAttrIsOwnedCmd;
+static Tcl_ObjCmdProc2 FileAttrIsReadableCmd;
+static Tcl_ObjCmdProc2 FileAttrIsWritableCmd;
+static Tcl_ObjCmdProc2 FileAttrLinkStatCmd;
+static Tcl_ObjCmdProc2 FileAttrModifyTimeCmd;
+static Tcl_ObjCmdProc2 FileAttrSizeCmd;
+static Tcl_ObjCmdProc2 FileAttrStatCmd;
+static Tcl_ObjCmdProc2 FileAttrTypeCmd;
+static Tcl_ObjCmdProc2 FilesystemSeparatorCmd;
+static Tcl_ObjCmdProc2 FilesystemVolumesCmd;
+static Tcl_ObjCmdProc2 PathDirNameCmd;
+static Tcl_ObjCmdProc2 PathExtensionCmd;
+static Tcl_ObjCmdProc2 PathFilesystemCmd;
+static Tcl_ObjCmdProc2 PathJoinCmd;
+static Tcl_ObjCmdProc2 PathNativeNameCmd;
+static Tcl_ObjCmdProc2 PathNormalizeCmd;
+static Tcl_ObjCmdProc2 PathRootNameCmd;
+static Tcl_ObjCmdProc2 PathSplitCmd;
+static Tcl_ObjCmdProc2 PathTailCmd;
+static Tcl_ObjCmdProc2 PathTypeCmd;
/*
*----------------------------------------------------------------------
@@ -122,7 +122,7 @@ int
Tcl_BreakObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
@@ -153,17 +153,17 @@ int
Tcl_CatchObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRCatchObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRCatchObjCmd, clientData, objc, objv);
}
int
TclNRCatchObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varNamePtr = NULL;
@@ -200,7 +200,7 @@ CatchObjCmdCallback(
int result)
{
Interp *iPtr = (Interp *) interp;
- int objc = PTR2INT(data[0]);
+ size_t objc = PTR2INT(data[0]);
Tcl_Obj *varNamePtr = (Tcl_Obj *)data[1];
Tcl_Obj *optionVarNamePtr = (Tcl_Obj *)data[2];
int rewind = iPtr->execEnvPtr->rewind;
@@ -258,7 +258,7 @@ int
Tcl_CdObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *dir;
@@ -316,7 +316,7 @@ int
Tcl_ConcatObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc >= 2) {
@@ -350,7 +350,7 @@ int
Tcl_ContinueObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
@@ -410,7 +410,7 @@ int
EncodingConvertfromObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *data; /* Byte array to convert */
@@ -540,7 +540,7 @@ int
EncodingConverttoObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *data; /* String to convert */
@@ -670,7 +670,7 @@ int
EncodingDirsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *dirListObj;
@@ -714,7 +714,7 @@ int
EncodingNamesObjCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Number of command line args */
+ size_t objc, /* Number of command line args */
Tcl_Obj* const objv[]) /* Vector of command line args */
{
if (objc > 1) {
@@ -745,7 +745,7 @@ int
EncodingSystemObjCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Number of command line args */
+ size_t objc, /* Number of command line args */
Tcl_Obj* const objv[]) /* Vector of command line args */
{
if (objc > 2) {
@@ -782,7 +782,7 @@ int
Tcl_ErrorObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *options, *optName;
@@ -844,17 +844,17 @@ int
Tcl_EvalObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNREvalObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNREvalObjCmd, clientData, objc, objv);
}
int
TclNREvalObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *objPtr;
@@ -913,7 +913,7 @@ int
Tcl_ExitObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt value;
@@ -960,17 +960,17 @@ int
Tcl_ExprObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRExprObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRExprObjCmd, clientData, objc, objv);
}
int
TclNRExprObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *resultPtr, *objPtr;
@@ -1108,7 +1108,7 @@ static int
FileAttrAccessTimeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1190,7 +1190,7 @@ static int
FileAttrModifyTimeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1269,7 +1269,7 @@ static int
FileAttrLinkStatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1309,7 +1309,7 @@ static int
FileAttrStatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1349,7 +1349,7 @@ static int
FileAttrTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1387,7 +1387,7 @@ static int
FileAttrSizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1424,7 +1424,7 @@ static int
FileAttrIsDirectoryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1462,7 +1462,7 @@ static int
FileAttrIsExecutableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
@@ -1493,7 +1493,7 @@ static int
FileAttrIsExistingCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
@@ -1524,7 +1524,7 @@ static int
FileAttrIsFileCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
@@ -1562,7 +1562,7 @@ static int
FileAttrIsOwnedCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
#ifdef __CYGWIN__
@@ -1609,7 +1609,7 @@ static int
FileAttrIsReadableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
@@ -1640,7 +1640,7 @@ static int
FileAttrIsWritableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
@@ -1671,7 +1671,7 @@ static int
PathDirNameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
@@ -1710,7 +1710,7 @@ static int
PathExtensionCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
@@ -1749,7 +1749,7 @@ static int
PathRootNameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
@@ -1788,7 +1788,7 @@ static int
PathTailCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
@@ -1827,7 +1827,7 @@ static int
PathFilesystemCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *fsInfo;
@@ -1868,7 +1868,7 @@ static int
PathJoinCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc < 2) {
@@ -1900,7 +1900,7 @@ static int
PathNativeNameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_DString ds;
@@ -1937,7 +1937,7 @@ static int
PathNormalizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *fileName;
@@ -1975,7 +1975,7 @@ static int
PathSplitCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *res;
@@ -2018,7 +2018,7 @@ static int
PathTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *typeName;
@@ -2066,7 +2066,7 @@ static int
FilesystemSeparatorCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc < 1 || objc > 2) {
@@ -2121,7 +2121,7 @@ static int
FilesystemVolumesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc != 1) {
@@ -2412,17 +2412,17 @@ int
Tcl_ForObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRForObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRForObjCmd, clientData, objc, objv);
}
int
TclNRForObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -2606,17 +2606,17 @@ int
Tcl_ForeachObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRForeachCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRForeachCmd, clientData, objc, objv);
}
int
TclNRForeachCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
return EachloopCmd(interp, TCL_EACH_KEEP_NONE, objc, objv);
@@ -2626,17 +2626,17 @@ int
Tcl_LmapObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRLmapCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRLmapCmd, clientData, objc, objv);
}
int
TclNRLmapCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
return EachloopCmd(interp, TCL_EACH_COLLECT, objc, objv);
@@ -2648,7 +2648,7 @@ EachloopCmd(
* evaluation. */
int collect, /* Select collecting or accumulating mode
* (TCL_EACH_*) */
- int objc, /* The arguments being passed in... */
+ size_t objc, /* The arguments being passed in... */
Tcl_Obj *const objv[])
{
int numLists = (objc-2) / 2;
@@ -2949,7 +2949,7 @@ int
Tcl_FormatObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *resultPtr; /* Where result is stored finally. */
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 3e297f6..acb8ccf 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -119,28 +119,28 @@ typedef enum Sequence_Decoded {
static int DictionaryCompare(const char *left, const char *right);
static Tcl_NRPostProc IfConditionCallback;
-static Tcl_ObjCmdProc InfoArgsCmd;
-static Tcl_ObjCmdProc InfoBodyCmd;
-static Tcl_ObjCmdProc InfoCmdCountCmd;
-static Tcl_ObjCmdProc InfoCommandsCmd;
-static Tcl_ObjCmdProc InfoCompleteCmd;
-static Tcl_ObjCmdProc InfoDefaultCmd;
+static Tcl_ObjCmdProc2 InfoArgsCmd;
+static Tcl_ObjCmdProc2 InfoBodyCmd;
+static Tcl_ObjCmdProc2 InfoCmdCountCmd;
+static Tcl_ObjCmdProc2 InfoCommandsCmd;
+static Tcl_ObjCmdProc2 InfoCompleteCmd;
+static Tcl_ObjCmdProc2 InfoDefaultCmd;
/* TIP #348 - New 'info' subcommand 'errorstack' */
-static Tcl_ObjCmdProc InfoErrorStackCmd;
+static Tcl_ObjCmdProc2 InfoErrorStackCmd;
/* TIP #280 - New 'info' subcommand 'frame' */
-static Tcl_ObjCmdProc InfoFrameCmd;
-static Tcl_ObjCmdProc InfoFunctionsCmd;
-static Tcl_ObjCmdProc InfoHostnameCmd;
-static Tcl_ObjCmdProc InfoLevelCmd;
-static Tcl_ObjCmdProc InfoLibraryCmd;
-static Tcl_ObjCmdProc InfoLoadedCmd;
-static Tcl_ObjCmdProc InfoNameOfExecutableCmd;
-static Tcl_ObjCmdProc InfoPatchLevelCmd;
-static Tcl_ObjCmdProc InfoProcsCmd;
-static Tcl_ObjCmdProc InfoScriptCmd;
-static Tcl_ObjCmdProc InfoSharedlibCmd;
-static Tcl_ObjCmdProc InfoCmdTypeCmd;
-static Tcl_ObjCmdProc InfoTclVersionCmd;
+static Tcl_ObjCmdProc2 InfoFrameCmd;
+static Tcl_ObjCmdProc2 InfoFunctionsCmd;
+static Tcl_ObjCmdProc2 InfoHostnameCmd;
+static Tcl_ObjCmdProc2 InfoLevelCmd;
+static Tcl_ObjCmdProc2 InfoLibraryCmd;
+static Tcl_ObjCmdProc2 InfoLoadedCmd;
+static Tcl_ObjCmdProc2 InfoNameOfExecutableCmd;
+static Tcl_ObjCmdProc2 InfoPatchLevelCmd;
+static Tcl_ObjCmdProc2 InfoProcsCmd;
+static Tcl_ObjCmdProc2 InfoScriptCmd;
+static Tcl_ObjCmdProc2 InfoSharedlibCmd;
+static Tcl_ObjCmdProc2 InfoCmdTypeCmd;
+static Tcl_ObjCmdProc2 InfoTclVersionCmd;
static SortElement * MergeLists(SortElement *leftPtr, SortElement *rightPtr,
SortInfo *infoPtr);
static int SortCompare(SortElement *firstPtr, SortElement *second,
@@ -207,17 +207,17 @@ int
Tcl_IfObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRIfObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRIfObjCmd, clientData, objc, objv);
}
int
TclNRIfObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *boolObj;
@@ -249,9 +249,9 @@ IfConditionCallback(
int result)
{
Interp *iPtr = (Interp *) interp;
- int objc = PTR2INT(data[0]);
+ size_t objc = PTR2INT(data[0]);
Tcl_Obj *const *objv = (Tcl_Obj *const *)data[1];
- int i = PTR2INT(data[2]);
+ size_t i = PTR2INT(data[2]);
Tcl_Obj *boolObj = (Tcl_Obj *)data[3];
int value, thenScriptIndex = 0;
const char *clause;
@@ -390,7 +390,7 @@ int
Tcl_IncrObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *newValuePtr, *incrPtr;
@@ -471,7 +471,7 @@ static int
InfoArgsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -534,7 +534,7 @@ static int
InfoBodyCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -595,7 +595,7 @@ static int
InfoCmdCountCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -637,7 +637,7 @@ static int
InfoCommandsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *cmdName, *pattern;
@@ -914,7 +914,7 @@ static int
InfoCompleteCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
@@ -951,7 +951,7 @@ static int
InfoDefaultCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -1033,7 +1033,7 @@ static int
InfoErrorStackCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *target;
@@ -1082,7 +1082,7 @@ int
TclInfoExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *varName;
@@ -1127,7 +1127,7 @@ static int
InfoFrameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -1467,7 +1467,7 @@ static int
InfoFunctionsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *script;
@@ -1532,7 +1532,7 @@ static int
InfoHostnameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name;
@@ -1578,7 +1578,7 @@ static int
InfoLevelCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -1652,7 +1652,7 @@ static int
InfoLibraryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *libDirName;
@@ -1699,7 +1699,7 @@ static int
InfoLoadedCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *interpName, *packageName;
@@ -1747,7 +1747,7 @@ static int
InfoNameOfExecutableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
@@ -1783,7 +1783,7 @@ static int
InfoPatchLevelCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *patchlevel;
@@ -1830,7 +1830,7 @@ static int
InfoProcsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *cmdName, *pattern;
@@ -2017,7 +2017,7 @@ static int
InfoScriptCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -2065,7 +2065,7 @@ static int
InfoSharedlibCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
@@ -2103,7 +2103,7 @@ static int
InfoTclVersionCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *version;
@@ -2146,7 +2146,7 @@ static int
InfoCmdTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Command command;
@@ -2167,7 +2167,7 @@ InfoCmdTypeCmd(
*/
if (Tcl_IsSafe(interp)
- && (((Command *) command)->objProc == TclAliasObjCmd)) {
+ && (((Command *) command)->objProc2 == TclAliasObjCmd)) {
Tcl_AppendResult(interp, "native", NULL);
} else {
Tcl_SetObjResult(interp,
@@ -2197,7 +2197,7 @@ int
Tcl_JoinObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
size_t length, listLen;
@@ -2317,7 +2317,7 @@ int
Tcl_LassignObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listCopyPtr;
@@ -2391,7 +2391,7 @@ int
Tcl_LindexObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *elemPtr; /* Pointer to the element being extracted. */
@@ -2449,7 +2449,7 @@ int
Tcl_LinsertObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listPtr;
@@ -2532,7 +2532,7 @@ int
Tcl_ListObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* The argument objects. */
{
@@ -2568,7 +2568,7 @@ int
Tcl_LlengthObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* Argument objects. */
{
@@ -2615,7 +2615,7 @@ int
Tcl_LpopObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* Argument objects. */
{
@@ -2717,7 +2717,7 @@ int
Tcl_LrangeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* Argument objects. */
{
@@ -2795,11 +2795,11 @@ int
Tcl_LremoveObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, idxc, prevIdx, first, num;
- size_t *idxv, listLen;
+ int prevIdx, first, num;
+ size_t i, idxc, *idxv, listLen;
Tcl_Obj *listObj;
/*
@@ -2914,7 +2914,7 @@ int
Tcl_LrepeatObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* The argument objects. */
{
@@ -2992,7 +2992,7 @@ Tcl_LrepeatObjCmd(
dataArray[i] = tmpPtr;
}
} else {
- int j, k = 0;
+ size_t j, k = 0;
for (i=0 ; i<elementCount ; i++) {
for (j=0 ; j<objc ; j++) {
@@ -3028,7 +3028,7 @@ int
Tcl_LreplaceObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listPtr;
@@ -3129,7 +3129,7 @@ int
Tcl_LreverseObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
Tcl_Obj **elemv;
@@ -3231,7 +3231,7 @@ int
Tcl_LsearchObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
const char *bytes, *patternBytes;
@@ -3992,7 +3992,7 @@ int
Tcl_LsetObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
Tcl_Obj *listPtr; /* Pointer to the list being altered. */
@@ -4188,7 +4188,7 @@ int
Tcl_LseqObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Obj *elementCount = NULL;
@@ -4200,7 +4200,8 @@ Tcl_LseqObjCmd(
Tcl_Obj *arithSeriesPtr;
SequenceOperators opmode;
SequenceDecoded decoded;
- int i, arg_key = 0, value_i = 0;
+ size_t i;
+ int arg_key = 0, value_i = 0;
// Default constants
Tcl_Obj *zero = Tcl_NewIntObj(0);
Tcl_Obj *one = Tcl_NewIntObj(1);
@@ -4477,7 +4478,7 @@ int
Tcl_LsortObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
int indices, nocase = 0, indexc;
@@ -4998,7 +4999,7 @@ int
Tcl_LeditObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
Tcl_Obj *listPtr; /* Pointer to the list being altered. */
@@ -5010,7 +5011,7 @@ Tcl_LeditObjCmd(
size_t listLen;
size_t numToDelete;
- if (objc < 4) {
+ if (objc + 1 < 5) {
Tcl_WrongNumArgs(interp, 1, objv,
"listVar first last ?element ...?");
return TCL_ERROR;
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index f94d914..0cd5ba5 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -84,7 +84,7 @@ int
Tcl_PwdObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *retVal;
@@ -124,11 +124,11 @@ int
Tcl_RegexpObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- size_t offset, stringLength, matchLength, cflags, eflags;
- int i, indices, match, about, all, doinline, numMatchesSaved;
+ size_t i, about, all, offset, stringLength, matchLength, cflags, eflags;
+ int indices, match, doinline, numMatchesSaved;
Tcl_RegExp regExpr;
Tcl_Obj *objPtr, *startIndex = NULL, *resultPtr = NULL;
Tcl_RegExpInfo info;
@@ -371,7 +371,7 @@ Tcl_RegexpObjCmd(
* area. (Scriptics Bug 4391/SF Bug #219232)
*/
- if (i <= (int)info.nsubs && info.matches[i].start != TCL_INDEX_NONE) {
+ if (i <= info.nsubs && info.matches[i].start != TCL_INDEX_NONE) {
start = offset + info.matches[i].start;
end = offset + info.matches[i].end;
@@ -393,7 +393,7 @@ Tcl_RegexpObjCmd(
newPtr = Tcl_NewListObj(2, objs);
} else {
- if ((i <= (int)info.nsubs) && (info.matches[i].end + 1 > 1)) {
+ if ((i <= info.nsubs) && (info.matches[i].end + 1 > 1)) {
newPtr = Tcl_GetRange(objPtr,
offset + info.matches[i].start,
offset + info.matches[i].end - 1);
@@ -483,7 +483,7 @@ int
Tcl_RegsubObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result, cflags, all, match, command;
@@ -1003,7 +1003,7 @@ int
Tcl_RenameObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *oldName, *newName;
@@ -1039,7 +1039,7 @@ int
Tcl_ReturnObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int code, level;
@@ -1086,17 +1086,17 @@ int
Tcl_SourceObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRSourceObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRSourceObjCmd, clientData, objc, objv);
}
int
TclNRSourceObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *encodingName = NULL;
@@ -1170,7 +1170,7 @@ int
Tcl_SplitObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch = 0;
@@ -1303,7 +1303,7 @@ static int
StringFirstCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t start = TCL_INDEX_START;
@@ -1347,7 +1347,7 @@ static int
StringLastCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t last = TCL_INDEX_END;
@@ -1391,7 +1391,7 @@ static int
StringIndexCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t index, end;
@@ -1463,7 +1463,7 @@ static int
StringInsertCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter */
- int objc, /* Number of arguments */
+ size_t objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
{
size_t length; /* String length */
@@ -1520,13 +1520,13 @@ static int
StringIsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *end, *stop;
int (*chcomp)(int) = NULL; /* The UniChar comparison function. */
- int i, result = 1, strict = 0;
- size_t failat = 0, length1, length2, length3;
+ int result = 1, strict = 0;
+ size_t i, failat = 0, length1, length2, length3;
Tcl_Obj *objPtr, *failVarObj = NULL;
Tcl_WideInt w;
@@ -1956,7 +1956,7 @@ static int
StringMapCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t length1, length2, mapElemc, index;
@@ -2232,7 +2232,7 @@ static int
StringMatchCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int nocase = 0;
@@ -2284,7 +2284,7 @@ static int
StringRangeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t first, last, end;
@@ -2334,7 +2334,7 @@ static int
StringReptCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt count;
@@ -2390,7 +2390,7 @@ static int
StringRplcCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t first, last, end;
@@ -2467,7 +2467,7 @@ static int
StringRevCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
@@ -2500,7 +2500,7 @@ static int
StringStartCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch;
@@ -2570,7 +2570,7 @@ static int
StringEndCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch;
@@ -2632,7 +2632,7 @@ static int
StringEqualCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/*
@@ -2642,8 +2642,8 @@ StringEqualCmd(
*/
const char *string2;
- int i, match, nocase = 0, reqlength = -1;
- size_t length;
+ int match, nocase = 0, reqlength = -1;
+ size_t i, length;
if (objc < 3 || objc > 6) {
str_cmp_args:
@@ -2708,7 +2708,7 @@ static int
StringCmpCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/*
@@ -2733,13 +2733,12 @@ StringCmpCmd(
int
TclStringCmpOpts(
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument objects. */
int *nocase,
int *reqlength)
{
- int i;
- size_t length;
+ size_t i, length;
const char *string;
*reqlength = -1;
@@ -2797,7 +2796,7 @@ static int
StringCatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *objResultPtr;
@@ -2842,7 +2841,7 @@ static int
StringLenCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
@@ -2876,7 +2875,7 @@ static int
StringLowerCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t length1, length2;
@@ -2961,7 +2960,7 @@ static int
StringUpperCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t length1, length2;
@@ -3046,7 +3045,7 @@ static int
StringTitleCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t length1, length2;
@@ -3131,7 +3130,7 @@ static int
StringTrimCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *string2;
@@ -3178,7 +3177,7 @@ static int
StringTrimLCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *string2;
@@ -3225,7 +3224,7 @@ static int
StringTrimRCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *string2;
@@ -3369,17 +3368,17 @@ int
Tcl_SubstObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRSubstObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRSubstObjCmd, clientData, objc, objv);
}
int
TclNRSubstObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int flags;
@@ -3417,20 +3416,21 @@ int
Tcl_SwitchObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRSwitchObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRSwitchObjCmd, clientData, objc, objv);
}
int
TclNRSwitchObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc1, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int i, mode, foundmode, splitObjs, numMatchesSaved;
int noCase;
+ int objc = objc1;
size_t patternLength, j;
const char *pattern;
Tcl_Obj *stringObj, *indexVarObj, *matchVarObj;
@@ -3957,7 +3957,7 @@ int
Tcl_ThrowObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *options;
@@ -4019,7 +4019,7 @@ int
Tcl_TimeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *objPtr;
@@ -4117,14 +4117,15 @@ int
Tcl_TimeRateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static double measureOverhead = 0;
/* global measure-overhead */
double overhead = -1; /* given measure-overhead */
Tcl_Obj *objPtr;
- int result, i;
+ int result;
+ size_t i;
Tcl_Obj *calibrate = NULL, *direct = NULL;
Tcl_WideUInt count = 0; /* Holds repetition count */
Tcl_WideInt maxms = WIDE_MIN;
@@ -4151,7 +4152,7 @@ Tcl_TimeRateObjCmd(
NRE_callback *rootPtr;
ByteCode *codePtr = NULL;
- for (i = 1; i < objc - 1; i++) {
+ for (i = 1; i + 1 < objc; i++) {
enum timeRateOptionsEnum index;
if (Tcl_GetIndexFromObj(NULL, objv[i], options, "option", TCL_EXACT,
@@ -4167,7 +4168,7 @@ Tcl_TimeRateObjCmd(
direct = objv[i];
break;
case TMRT_OVERHEAD:
- if (++i >= objc - 1) {
+ if (++i + 1 >= objc) {
goto usage;
}
if (Tcl_GetDoubleFromObj(interp, objv[i], &overhead) != TCL_OK) {
@@ -4182,7 +4183,7 @@ Tcl_TimeRateObjCmd(
}
}
- if (i >= objc || i < objc - 3) {
+ if (i >= objc || i + 3 < objc) {
usage:
Tcl_WrongNumArgs(interp, 1, objv,
"?-direct? ?-calibrate? ?-overhead double? "
@@ -4663,22 +4664,22 @@ int
Tcl_TryObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRTryObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRTryObjCmd, clientData, objc, objv);
}
int
TclNRTryObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *bodyObj, *handlersObj, *finallyObj = NULL;
- int i, bodyShared, haveHandlers, code;
- size_t dummy;
+ int bodyShared, haveHandlers, code;
+ size_t i, dummy;
static const char *const handlerNames[] = {
"finally", "on", "trap", NULL
};
@@ -4712,14 +4713,14 @@ TclNRTryObjCmd(
}
switch (type) {
case TryFinally: /* finally script */
- if (i < objc-2) {
+ if (i+2 < objc) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"finally clause must be last", -1));
Tcl_DecrRefCount(handlersObj);
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "FINALLY",
"NONTERMINAL", NULL);
return TCL_ERROR;
- } else if (i == objc-1) {
+ } else if (i+1 == objc) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"wrong # args to finally clause: must be"
" \"... finally script\"", -1));
@@ -4732,7 +4733,7 @@ TclNRTryObjCmd(
break;
case TryOn: /* on code variableList script */
- if (i > objc-4) {
+ if (i+4 > objc) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"wrong # args to on clause: must be \"... on code"
" variableList script\"", -1));
@@ -4750,7 +4751,7 @@ TclNRTryObjCmd(
goto commonHandler;
case TryTrap: /* trap pattern variableList script */
- if (i > objc-4) {
+ if (i+4 > objc) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"wrong # args to trap clause: "
"must be \"... trap pattern variableList script\"",
@@ -5241,17 +5242,17 @@ int
Tcl_WhileObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRWhileObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRWhileObjCmd, clientData, objc, objv);
}
int
TclNRWhileObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
ForIterData *iterPtr;
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index cb3cf1e..c93c8d2 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -825,7 +825,7 @@ TclCompileClockReadingCmd(
return TCL_ERROR;
}
- TclEmitInstInt1(INST_CLOCK_READ, PTR2INT(cmdPtr->objClientData), envPtr);
+ TclEmitInstInt1(INST_CLOCK_READ, PTR2INT(cmdPtr->objClientData2), envPtr);
return TCL_OK;
}
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index fbd59d8..bcf5fef 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -2621,7 +2621,7 @@ int
TclSingleOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData;
@@ -2629,7 +2629,7 @@ TclSingleOpCmd(
OpNode nodes[2];
Tcl_Obj *const *litObjv = objv + 1;
- if (objc != 1 + occdPtr->i.numArgs) {
+ if (objc != 1 + (size_t)occdPtr->i.numArgs) {
Tcl_WrongNumArgs(interp, 1, objv, occdPtr->expected);
return TCL_ERROR;
}
@@ -2674,7 +2674,7 @@ int
TclSortingOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
int code = TCL_OK;
@@ -2687,7 +2687,8 @@ TclSortingOpCmd(
2 * (objc-2) * sizeof(Tcl_Obj *));
OpNode *nodes = (OpNode *)TclStackAlloc(interp, 2 * (objc-2) * sizeof(OpNode));
unsigned char lexeme;
- int i, lastAnd = 1;
+ size_t i;
+ int lastAnd = 1;
Tcl_Obj *const *litObjPtrPtr = litObjv;
ParseLexeme(occdPtr->op, strlen(occdPtr->op), &lexeme, NULL);
@@ -2754,7 +2755,7 @@ int
TclVariadicOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData;
@@ -2813,7 +2814,8 @@ TclVariadicOpCmd(
} else {
Tcl_Obj *const *litObjv = objv + 1;
OpNode *nodes = (OpNode *)TclStackAlloc(interp, (objc-1) * sizeof(OpNode));
- int i, lastOp = OT_LITERAL;
+ size_t i;
+ int lastOp = OT_LITERAL;
nodes[0].lexeme = START;
nodes[0].mark = MARK_RIGHT;
@@ -2873,7 +2875,7 @@ int
TclNoIdentOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData;
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 035edac..6836721 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1064,8 +1064,7 @@ typedef struct {
*----------------------------------------------------------------
*/
-#if TCL_MAJOR_VERSION > 8
-MODULE_SCOPE Tcl_ObjCmdProc TclNRInterpCoroutine;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRInterpCoroutine;
/*
*----------------------------------------------------------------
@@ -1183,10 +1182,10 @@ MODULE_SCOPE void TclReleaseByteCode(ByteCode *codePtr);
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
MODULE_SCOPE void TclInvalidateCmdLiteral(Tcl_Interp *interp,
const char *name, Namespace *nsPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclSingleOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclSortingOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclVariadicOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNoIdentOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclSingleOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclSortingOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclVariadicOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNoIdentOpCmd;
#ifdef TCL_COMPILE_DEBUG
MODULE_SCOPE void TclVerifyGlobalLiteralTable(Interp *iPtr);
MODULE_SCOPE void TclVerifyLocalLiteralTable(CompileEnv *envPtr);
@@ -1203,8 +1202,6 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
Tcl_Interp *interp, size_t objc,
Tcl_Obj *const objv[], int isLambda);
-#endif /* TCL_MAJOR_VERSION > 8 */
-
/*
*----------------------------------------------------------------
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index fcd991a..40b6b02 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -41,7 +41,7 @@ typedef struct {
* Static functions in this file:
*/
-static Tcl_ObjCmdProc QueryConfigObjCmd;
+static Tcl_ObjCmdProc2 QueryConfigObjCmd;
static Tcl_CmdDeleteProc QueryConfigDelete;
static Tcl_InterpDeleteProc ConfigDictDeleteProc;
static Tcl_Obj * GetConfigDict(Tcl_Interp *interp);
@@ -163,7 +163,7 @@ Tcl_RegisterConfig(
TclDStringAppendLiteral(&cmdName, "::pkgconfig");
- if (Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdName),
+ if (Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&cmdName),
QueryConfigObjCmd, cdPtr, QueryConfigDelete) == NULL) {
Tcl_Panic("%s: %s", "Tcl_RegisterConfig",
"Unable to create query command for package configuration");
@@ -193,7 +193,7 @@ static int
QueryConfigObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
QCCD *cdPtr = (QCCD *)clientData;
diff --git a/generic/tclDate.c b/generic/tclDate.c
index fa6e60d..413676a 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -2745,8 +2745,8 @@ int
TclClockOldscanObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Count of parameters */
- Tcl_Obj *const *objv) /* Parameters */
+ size_t objc, /* Count of parameters */
+ Tcl_Obj *const objv[]) /* Parameters */
{
Tcl_Obj *result, *resultElement;
int yr, mo, da;
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 8040adf..8b67637 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -33,6 +33,10 @@
# define TCL_DEPRECATED(msg) EXTERN
#endif
+#ifdef TCL_NO_DEPRECATED
+# define Tcl_ObjCmdProc void
+# define Tcl_CmdObjTraceProc void
+#endif /* TCL_NO_DEPRECATED */
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
@@ -3870,6 +3874,11 @@ extern const TclStubs *tclStubsPtr;
/* !END!: Do not edit above this line. */
+#ifdef TCL_NO_DEPRECATED
+# undef Tcl_ObjCmdProc
+# undef Tcl_CmdObjTraceProc
+#endif /* TCL_NO_DEPRECATED */
+
#ifdef _WIN32
# undef Tcl_CreateFileHandler
# undef Tcl_DeleteFileHandler
@@ -4250,7 +4259,12 @@ extern const TclStubs *tclStubsPtr;
#undef TclUtfCharComplete
#undef TclUtfNext
#undef TclUtfPrev
-#ifndef TCL_NO_DEPRECATED
+#ifdef TCL_NO_DEPRECATED
+# undef Tcl_CreateObjCommand
+# undef Tcl_CreateObjTrace
+# undef Tcl_NRCallObjProc
+# undef Tcl_NRCreateCommand
+#else
# define Tcl_CreateSlave Tcl_CreateChild
# define Tcl_GetSlave Tcl_GetChild
# define Tcl_GetMaster Tcl_GetParent
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index ca2501c..ac73dd7 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -24,25 +24,25 @@ struct Dict;
*/
static void DeleteDict(struct Dict *dict);
-static Tcl_ObjCmdProc DictAppendCmd;
-static Tcl_ObjCmdProc DictCreateCmd;
-static Tcl_ObjCmdProc DictExistsCmd;
-static Tcl_ObjCmdProc DictFilterCmd;
-static Tcl_ObjCmdProc DictGetCmd;
-static Tcl_ObjCmdProc DictGetDefCmd;
-static Tcl_ObjCmdProc DictIncrCmd;
-static Tcl_ObjCmdProc DictInfoCmd;
-static Tcl_ObjCmdProc DictKeysCmd;
-static Tcl_ObjCmdProc DictLappendCmd;
-static Tcl_ObjCmdProc DictMergeCmd;
-static Tcl_ObjCmdProc DictRemoveCmd;
-static Tcl_ObjCmdProc DictReplaceCmd;
-static Tcl_ObjCmdProc DictSetCmd;
-static Tcl_ObjCmdProc DictSizeCmd;
-static Tcl_ObjCmdProc DictUnsetCmd;
-static Tcl_ObjCmdProc DictUpdateCmd;
-static Tcl_ObjCmdProc DictValuesCmd;
-static Tcl_ObjCmdProc DictWithCmd;
+static Tcl_ObjCmdProc2 DictAppendCmd;
+static Tcl_ObjCmdProc2 DictCreateCmd;
+static Tcl_ObjCmdProc2 DictExistsCmd;
+static Tcl_ObjCmdProc2 DictFilterCmd;
+static Tcl_ObjCmdProc2 DictGetCmd;
+static Tcl_ObjCmdProc2 DictGetDefCmd;
+static Tcl_ObjCmdProc2 DictIncrCmd;
+static Tcl_ObjCmdProc2 DictInfoCmd;
+static Tcl_ObjCmdProc2 DictKeysCmd;
+static Tcl_ObjCmdProc2 DictLappendCmd;
+static Tcl_ObjCmdProc2 DictMergeCmd;
+static Tcl_ObjCmdProc2 DictRemoveCmd;
+static Tcl_ObjCmdProc2 DictReplaceCmd;
+static Tcl_ObjCmdProc2 DictSetCmd;
+static Tcl_ObjCmdProc2 DictSizeCmd;
+static Tcl_ObjCmdProc2 DictUnsetCmd;
+static Tcl_ObjCmdProc2 DictUpdateCmd;
+static Tcl_ObjCmdProc2 DictValuesCmd;
+static Tcl_ObjCmdProc2 DictWithCmd;
static Tcl_DupInternalRepProc DupDictInternalRep;
static Tcl_FreeInternalRepProc FreeDictInternalRep;
static void InvalidateDictChain(Tcl_Obj *dictObj);
@@ -57,8 +57,8 @@ static inline int DeleteChainEntry(struct Dict *dict,
Tcl_Obj *keyPtr);
static Tcl_NRPostProc FinalizeDictUpdate;
static Tcl_NRPostProc FinalizeDictWith;
-static Tcl_ObjCmdProc DictForNRCmd;
-static Tcl_ObjCmdProc DictMapNRCmd;
+static Tcl_ObjCmdProc2 DictForNRCmd;
+static Tcl_ObjCmdProc2 DictMapNRCmd;
static Tcl_NRPostProc DictForLoopCallback;
static Tcl_NRPostProc DictMapLoopCallback;
@@ -1490,11 +1490,11 @@ static int
DictCreateCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictObj;
- int i;
+ size_t i;
/*
* Must have an even number of arguments; note that number of preceding
@@ -1540,7 +1540,7 @@ static int
DictGetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr = NULL;
@@ -1633,7 +1633,7 @@ static int
DictGetDefCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *keyPtr, *valuePtr, *defaultPtr;
@@ -1698,11 +1698,11 @@ static int
DictReplaceCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr;
- int i;
+ size_t i;
if ((objc < 2) || (objc & 1)) {
Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key value ...?");
@@ -1746,11 +1746,11 @@ static int
DictRemoveCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr;
- int i;
+ size_t i;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key ...?");
@@ -1794,12 +1794,12 @@ static int
DictMergeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *targetObj, *keyObj = NULL, *valueObj = NULL;
- int allocatedDict = 0;
- int i, done;
+ int done, allocatedDict = 0;
+ size_t i;
Tcl_DictSearch search;
if (objc == 1) {
@@ -1881,7 +1881,7 @@ static int
DictKeysCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *listPtr;
@@ -1960,7 +1960,7 @@ static int
DictValuesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *valuePtr = NULL, *listPtr;
@@ -2020,7 +2020,7 @@ static int
DictSizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int result;
@@ -2059,7 +2059,7 @@ static int
DictExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr;
@@ -2101,7 +2101,7 @@ static int
DictInfoCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Dict *dict;
@@ -2145,7 +2145,7 @@ static int
DictIncrCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int code = TCL_OK;
@@ -2266,11 +2266,12 @@ static int
DictLappendCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr, *resultPtr;
- int i, allocatedDict = 0, allocatedValue = 0;
+ int allocatedDict = 0, allocatedValue = 0;
+ size_t i;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "dictVarName key ?value ...?");
@@ -2353,7 +2354,7 @@ static int
DictAppendCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr, *resultPtr;
@@ -2455,7 +2456,7 @@ static int
DictForNRCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
@@ -2651,7 +2652,7 @@ static int
DictMapNRCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
@@ -2864,7 +2865,7 @@ static int
DictSetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *resultPtr;
@@ -2924,7 +2925,7 @@ static int
DictUnsetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *resultPtr;
@@ -2983,7 +2984,7 @@ static int
DictFilterCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
@@ -3057,7 +3058,7 @@ DictFilterCmd(
resultObj = Tcl_NewDictObj();
while (!done) {
- int i;
+ size_t i;
for (i=3 ; i<objc ; i++) {
pattern = TclGetString(objv[i]);
@@ -3083,7 +3084,7 @@ DictFilterCmd(
}
resultObj = Tcl_NewDictObj();
while (!done) {
- int i;
+ size_t i;
for (i=3 ; i<objc ; i++) {
pattern = TclGetString(objv[i]);
@@ -3269,13 +3270,12 @@ static int
DictUpdateCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
Tcl_Obj *dictPtr, *objPtr;
- int i;
- size_t dummy;
+ size_t i, dummy;
if (objc < 5 || !(objc & 1)) {
Tcl_WrongNumArgs(interp, 1, objv,
@@ -3428,7 +3428,7 @@ static int
DictWithCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index 8fd90a3..5002822 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -1269,7 +1269,7 @@ int
Tcl_DisassembleObjCmd(
void *clientData, /* What type of operation. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const types[] = {
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index a4a0250..a05ac96 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -19,10 +19,10 @@
static inline Tcl_Obj * NewNsObj(Tcl_Namespace *namespacePtr);
static inline int EnsembleUnknownCallback(Tcl_Interp *interp,
- EnsembleConfig *ensemblePtr, int objc,
+ EnsembleConfig *ensemblePtr, size_t objc,
Tcl_Obj *const objv[], Tcl_Obj **prefixObjPtr);
static int NsEnsembleImplementationCmdNR(void *clientData,
- Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]);
+ Tcl_Interp *interp,size_t objc,Tcl_Obj *const objv[]);
static void BuildEnsembleConfig(EnsembleConfig *ensemblePtr);
static int NsEnsembleStringOrder(const void *strPtr1,
const void *strPtr2);
@@ -153,7 +153,7 @@ int
TclNamespaceEnsembleCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Namespace *namespacePtr;
@@ -787,7 +787,7 @@ Tcl_SetEnsembleSubcommandList(
EnsembleConfig *ensemblePtr;
Tcl_Obj *oldList;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL);
@@ -804,7 +804,7 @@ Tcl_SetEnsembleSubcommandList(
}
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
oldList = ensemblePtr->subcmdList;
ensemblePtr->subcmdList = subcmdList;
if (subcmdList != NULL) {
@@ -863,7 +863,7 @@ Tcl_SetEnsembleParameterList(
Tcl_Obj *oldList;
size_t length;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL);
@@ -880,7 +880,7 @@ Tcl_SetEnsembleParameterList(
}
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
oldList = ensemblePtr->parameterList;
ensemblePtr->parameterList = paramList;
if (paramList != NULL) {
@@ -939,7 +939,7 @@ Tcl_SetEnsembleMappingDict(
EnsembleConfig *ensemblePtr;
Tcl_Obj *oldDict;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL);
@@ -981,7 +981,7 @@ Tcl_SetEnsembleMappingDict(
}
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
oldDict = ensemblePtr->subcommandDict;
ensemblePtr->subcommandDict = mapDict;
if (mapDict != NULL) {
@@ -1039,7 +1039,7 @@ Tcl_SetEnsembleUnknownHandler(
EnsembleConfig *ensemblePtr;
Tcl_Obj *oldList;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL);
@@ -1056,7 +1056,7 @@ Tcl_SetEnsembleUnknownHandler(
}
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
oldList = ensemblePtr->unknownHandler;
ensemblePtr->unknownHandler = unknownList;
if (unknownList != NULL) {
@@ -1105,14 +1105,14 @@ Tcl_SetEnsembleFlags(
EnsembleConfig *ensemblePtr;
int wasCompiled;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "NOT_ENSEMBLE", NULL);
return TCL_ERROR;
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
wasCompiled = ensemblePtr->flags & ENSEMBLE_COMPILE;
/*
@@ -1181,7 +1181,7 @@ Tcl_GetEnsembleSubcommandList(
Command *cmdPtr = (Command *) token;
EnsembleConfig *ensemblePtr;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
@@ -1190,7 +1190,7 @@ Tcl_GetEnsembleSubcommandList(
return TCL_ERROR;
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
*subcmdListPtr = ensemblePtr->subcmdList;
return TCL_OK;
}
@@ -1223,7 +1223,7 @@ Tcl_GetEnsembleParameterList(
Command *cmdPtr = (Command *) token;
EnsembleConfig *ensemblePtr;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
@@ -1232,7 +1232,7 @@ Tcl_GetEnsembleParameterList(
return TCL_ERROR;
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
*paramListPtr = ensemblePtr->parameterList;
return TCL_OK;
}
@@ -1265,7 +1265,7 @@ Tcl_GetEnsembleMappingDict(
Command *cmdPtr = (Command *) token;
EnsembleConfig *ensemblePtr;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
@@ -1274,7 +1274,7 @@ Tcl_GetEnsembleMappingDict(
return TCL_ERROR;
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
*mapDictPtr = ensemblePtr->subcommandDict;
return TCL_OK;
}
@@ -1306,7 +1306,7 @@ Tcl_GetEnsembleUnknownHandler(
Command *cmdPtr = (Command *) token;
EnsembleConfig *ensemblePtr;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
@@ -1315,7 +1315,7 @@ Tcl_GetEnsembleUnknownHandler(
return TCL_ERROR;
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
*unknownListPtr = ensemblePtr->unknownHandler;
return TCL_OK;
}
@@ -1347,7 +1347,7 @@ Tcl_GetEnsembleFlags(
Command *cmdPtr = (Command *) token;
EnsembleConfig *ensemblePtr;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
@@ -1356,7 +1356,7 @@ Tcl_GetEnsembleFlags(
return TCL_ERROR;
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
*flagsPtr = ensemblePtr->flags;
return TCL_OK;
}
@@ -1388,7 +1388,7 @@ Tcl_GetEnsembleNamespace(
Command *cmdPtr = (Command *) token;
EnsembleConfig *ensemblePtr;
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", -1));
@@ -1397,7 +1397,7 @@ Tcl_GetEnsembleNamespace(
return TCL_ERROR;
}
- ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData;
+ ensemblePtr = (EnsembleConfig *)cmdPtr->objClientData2;
*namespacePtrPtr = (Tcl_Namespace *) ensemblePtr->nsPtr;
return TCL_OK;
}
@@ -1438,7 +1438,7 @@ Tcl_FindEnsemble(
return NULL;
}
- if (cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
/*
* Reuse existing infrastructure for following import link chains
* rather than duplicating it.
@@ -1447,7 +1447,7 @@ Tcl_FindEnsemble(
cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr);
if (cmdPtr == NULL
- || cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ || cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (flags & TCL_LEAVE_ERR_MSG) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" is not an ensemble command",
@@ -1485,11 +1485,11 @@ Tcl_IsEnsemble(
{
Command *cmdPtr = (Command *) token;
- if (cmdPtr->objProc == TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 == TclEnsembleImplementationCmd) {
return 1;
}
cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr);
- if (cmdPtr == NULL || cmdPtr->objProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr == NULL || cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
return 0;
}
return 1;
@@ -1616,7 +1616,7 @@ TclMakeEnsemble(
Tcl_AppendToObj(toObj, map[i].name, -1);
Tcl_DictObjPut(NULL, mapDict, fromObj, toObj);
- if (map[i].proc || map[i].nreProc) {
+ if (map[i].proc2 || map[i].nreProc2) {
/*
* If the command is unsafe, hide it when we're in a safe
* interpreter. The code to do this is really hokey! It also
@@ -1627,8 +1627,8 @@ TclMakeEnsemble(
if (map[i].unsafe && Tcl_IsSafe(interp)) {
cmdPtr = (Command *)
- Tcl_NRCreateCommand(interp, "___tmp", map[i].proc,
- map[i].nreProc, map[i].clientData, NULL);
+ Tcl_NRCreateCommand2(interp, "___tmp", map[i].proc2,
+ map[i].nreProc2, map[i].clientData, NULL);
Tcl_DStringSetLength(&hiddenBuf, hiddenLen);
if (Tcl_HideCommand(interp, "___tmp",
Tcl_DStringAppend(&hiddenBuf, map[i].name, -1))) {
@@ -1640,8 +1640,8 @@ TclMakeEnsemble(
*/
cmdPtr = (Command *)
- Tcl_NRCreateCommand(interp, TclGetString(toObj),
- map[i].proc, map[i].nreProc, map[i].clientData,
+ Tcl_NRCreateCommand2(interp, TclGetString(toObj),
+ map[i].proc2, map[i].nreProc2, map[i].clientData,
NULL);
}
cmdPtr->compileProc = map[i].compileProc;
@@ -1684,10 +1684,10 @@ int
TclEnsembleImplementationCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
- return Tcl_NRCallObjProc(interp, NsEnsembleImplementationCmdNR,
+ return Tcl_NRCallObjProc2(interp, NsEnsembleImplementationCmdNR,
clientData, objc, objv);
}
@@ -1695,7 +1695,7 @@ static int
NsEnsembleImplementationCmdNR(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
EnsembleConfig *ensemblePtr = (EnsembleConfig *)clientData;
@@ -2282,7 +2282,7 @@ static inline int
EnsembleUnknownCallback(
Tcl_Interp *interp,
EnsembleConfig *ensemblePtr,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[],
Tcl_Obj **prefixObjPtr)
{
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 4a61d60..9af3890 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -55,8 +55,8 @@ typedef struct {
*/
typedef struct {
- int *donePtr; /* Pointer to flag to signal or NULL. */
- int sequence; /* Order of occurrence. */
+ size_t *donePtr; /* Pointer to flag to signal or NULL. */
+ size_t sequence; /* Order of occurrence. */
int mask; /* 0, or TCL_READABLE/TCL_WRITABLE. */
Tcl_Obj *sourceObj; /* Name of the event source, either a
* variable name or channel name. */
@@ -320,7 +320,7 @@ int
TclDefaultBgErrorHandlerObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *keyPtr, *valuePtr;
@@ -1490,11 +1490,12 @@ int
Tcl_VwaitObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, done = 0, timedOut = 0, foundEvent, any = 1, timeout = 0;
- int numItems = 0, extended = 0, result, mode, mask = TCL_ALL_EVENTS;
+ size_t i, done = 0, numItems = 0, timedOut = 0;
+ int foundEvent, any = 1, timeout = 0;
+ int extended = 0, result, mode, mask = TCL_ALL_EVENTS;
Tcl_InterpState saved = NULL;
Tcl_TimerToken timer = NULL;
Tcl_Time before, after;
@@ -1572,7 +1573,7 @@ Tcl_VwaitObjCmd(
if (timeout < 0) {
Tcl_ResetResult(interp);
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "timeout must be positive", -1));
+ "timeout must be positive", TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "EVENT", "NEGTIME", NULL);
result = TCL_ERROR;
goto done;
@@ -1592,7 +1593,7 @@ Tcl_VwaitObjCmd(
goto done;
}
vwaitItems[numItems].donePtr = &done;
- vwaitItems[numItems].sequence = -1;
+ vwaitItems[numItems].sequence = TCL_INDEX_NONE;
vwaitItems[numItems].mask = 0;
vwaitItems[numItems].sourceObj = objv[i];
numItems++;
@@ -1616,7 +1617,7 @@ Tcl_VwaitObjCmd(
Tcl_CreateChannelHandler(chan, TCL_READABLE,
VwaitChannelReadProc, &vwaitItems[numItems]);
vwaitItems[numItems].donePtr = &done;
- vwaitItems[numItems].sequence = -1;
+ vwaitItems[numItems].sequence = TCL_INDEX_NONE;
vwaitItems[numItems].mask = TCL_READABLE;
vwaitItems[numItems].sourceObj = objv[i];
numItems++;
@@ -1640,7 +1641,7 @@ Tcl_VwaitObjCmd(
Tcl_CreateChannelHandler(chan, TCL_WRITABLE,
VwaitChannelWriteProc, &vwaitItems[numItems]);
vwaitItems[numItems].donePtr = &done;
- vwaitItems[numItems].sequence = -1;
+ vwaitItems[numItems].sequence = TCL_INDEX_NONE;
vwaitItems[numItems].mask = TCL_WRITABLE;
vwaitItems[numItems].sourceObj = objv[i];
numItems++;
@@ -1674,7 +1675,7 @@ Tcl_VwaitObjCmd(
break;
}
vwaitItems[numItems].donePtr = &done;
- vwaitItems[numItems].sequence = -1;
+ vwaitItems[numItems].sequence = TCL_INDEX_NONE;
vwaitItems[numItems].mask = 0;
vwaitItems[numItems].sourceObj = objv[i];
numItems++;
@@ -1698,7 +1699,7 @@ Tcl_VwaitObjCmd(
if (timeout > 0) {
vwaitItems[numItems].donePtr = &timedOut;
- vwaitItems[numItems].sequence = -1;
+ vwaitItems[numItems].sequence = TCL_INDEX_NONE;
vwaitItems[numItems].mask = 0;
vwaitItems[numItems].sourceObj = NULL;
timer = Tcl_CreateTimerHandler(timeout, VwaitTimeoutProc,
@@ -1816,7 +1817,7 @@ Tcl_VwaitObjCmd(
if (result == TCL_OK) {
if (extended) {
- int k;
+ size_t k;
Tcl_Obj *listObj, *keyObj;
TclNewObj(listObj);
@@ -1943,7 +1944,7 @@ int
Tcl_UpdateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int flags = 0; /* Initialized to avoid compiler warning. */
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index e2a2705..0be7829 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -612,7 +612,7 @@ static const size_t Exp64ValueSize = sizeof(Exp64Value) / sizeof(Tcl_WideInt);
*/
#ifdef TCL_COMPILE_STATS
-static Tcl_ObjCmdProc EvalStatsCmd;
+static Tcl_ObjCmdProc2 EvalStatsCmd;
#endif /* TCL_COMPILE_STATS */
#ifdef TCL_COMPILE_DEBUG
static const char * GetOpcodeName(const unsigned char *pc);
@@ -753,7 +753,7 @@ InitByteCodeExecution(
}
#endif
#ifdef TCL_COMPILE_STATS
- Tcl_CreateObjCommand(interp, "evalstats", EvalStatsCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "evalstats", EvalStatsCmd, NULL, NULL);
#endif /* TCL_COMPILE_STATS */
}
@@ -1847,7 +1847,7 @@ ArgumentBCEnter(
ByteCode *codePtr,
TEBCdata *tdPtr,
const unsigned char *pc,
- int objc,
+ size_t objc,
Tcl_Obj **objv)
{
int cmd;
@@ -4581,11 +4581,17 @@ TEBCresume(
Method *const mPtr =
contextPtr->callPtr->chain[newDepth].mPtr;
- if (mPtr->typePtr->version < TCL_OO_METHOD_VERSION_2) {
- return mPtr->typePtr->callProc(mPtr->clientData, interp,
+#ifndef TCL_NO_DEPRECATED
+ if (mPtr->typePtr->version == TCL_OO_METHOD_VERSION_1) {
+ if (objc > INT_MAX) {
+ TRACE_ERROR(interp);
+ goto gotError;
+ }
+ return ((Tcl_MethodCallProc *)(void *)mPtr->typePtr->callProc)(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, opnd, objv);
}
- return ((Tcl_MethodCallProc2 *)(void *)(mPtr->typePtr->callProc))(mPtr->clientData, interp,
+#endif /* TCL_NO_DEPRECATED */
+ return mPtr->typePtr->callProc(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, opnd, objv);
}
@@ -9019,7 +9025,7 @@ IllegalExprOperandType(
Tcl_Obj *
TclGetSourceFromFrame(
CmdFrame *cfPtr,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (cfPtr == NULL) {
@@ -9443,7 +9449,7 @@ static int
EvalStatsCmd(
TCL_UNUSED(void *), /* Unused. */
Tcl_Interp *interp, /* The current interpreter. */
- int objc, /* The number of arguments. */
+ size_t objc, /* The number of arguments. */
Tcl_Obj *const objv[]) /* The argument strings. */
{
Interp *iPtr = (Interp *) interp;
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index 89550d9..b390589 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.c
@@ -22,9 +22,9 @@ static int CopyRenameOneFile(Tcl_Interp *interp,
int copyFlag, int force);
static Tcl_Obj * FileBasename(Tcl_Interp *interp, Tcl_Obj *pathPtr);
static int FileCopyRename(Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[], int copyFlag);
-static int FileForceOption(Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[], int *forcePtr);
+ size_t objc, Tcl_Obj *const objv[], int copyFlag);
+static size_t FileForceOption(Tcl_Interp *interp,
+ size_t objc, Tcl_Obj *const objv[], int *forcePtr);
/*
*---------------------------------------------------------------------------
@@ -50,7 +50,7 @@ TclFileRenameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Interp for error reporting or recursive
* calls in the case of a tricky rename. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
return FileCopyRename(interp, objc, objv, 0);
@@ -79,7 +79,7 @@ TclFileCopyCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Used for error reporting or recursive calls
* in the case of a tricky copy. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
return FileCopyRename(interp, objc, objv, 1);
@@ -105,17 +105,18 @@ TclFileCopyCmd(
static int
FileCopyRename(
Tcl_Interp *interp, /* Used for error reporting. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument strings passed to Tcl_FileCmd. */
int copyFlag) /* If non-zero, copy source(s). Otherwise,
* rename them. */
{
- int i, result, force;
+ int result, force;
+ size_t i;
Tcl_StatBuf statBuf;
Tcl_Obj *target;
i = FileForceOption(interp, objc - 1, objv + 1, &force);
- if (i < 0) {
+ if (i == TCL_INDEX_NONE) {
return TCL_ERROR;
}
i++;
@@ -216,12 +217,12 @@ int
TclFileMakeDirsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Used for error reporting. */
- int objc, /* Number of arguments */
+ size_t objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
Tcl_Obj *errfile = NULL;
- int result, i;
- size_t j, pobjc;
+ int result;
+ size_t i, j, pobjc;
Tcl_Obj *split = NULL;
Tcl_Obj *target = NULL;
Tcl_StatBuf statBuf;
@@ -341,15 +342,16 @@ int
TclFileDeleteCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Used for error reporting */
- int objc, /* Number of arguments */
+ size_t objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
- int i, force, result;
+ int force, result;
+ size_t i;
Tcl_Obj *errfile;
Tcl_Obj *errorBuffer = NULL;
i = FileForceOption(interp, objc - 1, objv + 1, &force);
- if (i < 0) {
+ if (i == TCL_INDEX_NONE) {
return TCL_ERROR;
}
@@ -816,16 +818,17 @@ CopyRenameOneFile(
*---------------------------------------------------------------------------
*/
-static int
+static size_t
FileForceOption(
Tcl_Interp *interp, /* Interp, for error return. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument strings. First command line
* option, if it exists, begins at 0. */
int *forcePtr) /* If the "-force" was specified, *forcePtr is
* filled with 1, otherwise with 0. */
{
- int force, i, idx;
+ int force, idx;
+ size_t i;
static const char *const options[] = {
"-force", "--", NULL
};
@@ -837,7 +840,7 @@ FileForceOption(
}
if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", TCL_EXACT,
&idx) != TCL_OK) {
- return -1;
+ return TCL_INDEX_NONE;
}
if (idx == 0 /* -force */) {
force = 1;
@@ -940,7 +943,7 @@ int
TclFileAttrsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter for error reporting. */
- int objc, /* Number of command line arguments. */
+ size_t objc, /* Number of command line arguments. */
Tcl_Obj *const objv[]) /* The command line objects. */
{
int result;
@@ -1090,7 +1093,8 @@ TclFileAttrsCmd(
* Set option/value pairs.
*/
- int i, index;
+ size_t i;
+ int index;
if (numObjStrings == 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -1156,7 +1160,7 @@ int
TclFileLinkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *contents;
@@ -1307,7 +1311,7 @@ int
TclFileReadLinkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *contents;
@@ -1358,7 +1362,7 @@ int
TclFileTemporaryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *nameVarObj = NULL; /* Variable to store the name of the temporary
@@ -1517,7 +1521,7 @@ int
TclFileTempDirCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirNameObj; /* Object that will contain the directory
@@ -1662,7 +1666,7 @@ int
TclFileHomeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *homeDirObj;
@@ -1700,7 +1704,7 @@ int
TclFileTildeExpandCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *expandedPathObj;
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 040f0fd..f29fac7 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -1114,11 +1114,11 @@ int
Tcl_GlobObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, globFlags, join, dir, result;
- size_t length;
+ int globFlags, join, dir, result;
+ size_t i, length;
char *string;
const char *separators;
Tcl_Obj *typePtr, *look;
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index e282c9b..67d0ec5 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -961,8 +961,8 @@ int
TclClockOldscanObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Count of parameters */
- Tcl_Obj *const *objv) /* Parameters */
+ size_t objc, /* Count of parameters */
+ Tcl_Obj *const objv[]) /* Parameters */
{
Tcl_Obj *result, *resultElement;
int yr, mo, da;
diff --git a/generic/tclHistory.c b/generic/tclHistory.c
index dc5a67d..aa284fc 100644
--- a/generic/tclHistory.c
+++ b/generic/tclHistory.c
@@ -145,7 +145,7 @@ Tcl_RecordAndEvalObj(
result = Tcl_GetCommandInfo(interp, "::history", &info);
if (result && (info.deleteProc == TclProcDeleteProc)) {
- Proc *procPtr = (Proc *) info.objClientData;
+ Proc *procPtr = (Proc *) info.objClientData2;
call = (procPtr->cmdPtr->compileProc != TclCompileNoOp);
}
diff --git a/generic/tclIO.c b/generic/tclIO.c
index bf3f543..f1c075f 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -9117,7 +9117,7 @@ Tcl_FileEventObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Interpreter in which the channel for which
* to create the handler is found. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Channel *chanPtr; /* The channel to create the handler for. */
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index e706f40..a7b6ca9 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -38,8 +38,8 @@ static Tcl_ThreadDataKey dataKey;
static Tcl_ExitProc FinalizeIOCmdTSD;
static Tcl_TcpAcceptProc AcceptCallbackProc;
-static Tcl_ObjCmdProc ChanPendingObjCmd;
-static Tcl_ObjCmdProc ChanTruncateObjCmd;
+static Tcl_ObjCmdProc2 ChanPendingObjCmd;
+static Tcl_ObjCmdProc2 ChanTruncateObjCmd;
static void RegisterTcpServerInterpCleanup(
Tcl_Interp *interp,
AcceptCallback *acceptCallbackPtr);
@@ -99,7 +99,7 @@ int
Tcl_PutsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to puts on. */
@@ -212,7 +212,7 @@ int
Tcl_FlushObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *chanObjPtr;
@@ -276,7 +276,7 @@ int
Tcl_GetsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to read from. */
@@ -360,14 +360,15 @@ int
Tcl_ReadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to read from. */
- int newline, i; /* Discard newline at end? */
+ int newline; /* Discard newline at end? */
Tcl_WideInt toRead; /* How many bytes to read? */
size_t charactersRead; /* How many characters were read? */
int mode; /* Mode in which channel is opened. */
+ size_t i;
Tcl_Obj *resultPtr, *chanObjPtr;
if ((objc != 2) && (objc != 3)) {
@@ -489,7 +490,7 @@ int
Tcl_SeekObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to tell on. */
@@ -564,7 +565,7 @@ int
Tcl_TellObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to tell on. */
@@ -626,7 +627,7 @@ int
Tcl_CloseObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to close. */
@@ -734,12 +735,12 @@ int
Tcl_FconfigureObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *optionName, *valueName;
Tcl_Channel chan; /* The channel to set a mode on. */
- int i; /* Iterate over arg-value pairs. */
+ size_t i; /* Iterate over arg-value pairs. */
if ((objc < 2) || (((objc % 2) == 1) && (objc != 3))) {
Tcl_WrongNumArgs(interp, 1, objv, "channelId ?-option value ...?");
@@ -809,7 +810,7 @@ int
Tcl_EofObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
@@ -848,7 +849,7 @@ int
Tcl_ExecObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *resultPtr;
@@ -856,8 +857,8 @@ Tcl_ExecObjCmd(
* on the _Tcl_ stack. */
const char *string;
Tcl_Channel chan;
- int argc, background, i, index, keepNewline, result, skip, ignoreStderr;
- size_t length;
+ int argc, background, i, index, keepNewline, result, ignoreStderr;
+ size_t length, skip;
static const char *const options[] = {
"-ignorestderr", "-keepnewline", "--", NULL
};
@@ -1015,7 +1016,7 @@ int
Tcl_FblockedObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
@@ -1061,7 +1062,7 @@ int
Tcl_OpenObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int pipeline, prot;
@@ -1437,7 +1438,7 @@ int
Tcl_SocketObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const socketOptions[] = {
@@ -1448,8 +1449,8 @@ Tcl_SocketObjCmd(
SKT_ASYNC, SKT_BACKLOG, SKT_MYADDR, SKT_MYPORT, SKT_REUSEADDR,
SKT_REUSEPORT, SKT_SERVER
} optionIndex;
- int a, server = 0, myport = 0, async = 0, reusep = -1,
- reusea = -1, backlog = -1;
+ int server = 0, myport = 0, async = 0, reusep = -1, reusea = -1, backlog = -1;
+ Tcl_Size a;
unsigned int flags = 0;
const char *host, *port, *myaddr = NULL;
Tcl_Obj *script = NULL;
@@ -1690,11 +1691,12 @@ int
Tcl_FcopyObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel inChan, outChan;
- int mode, i, index;
+ int mode, index;
+ size_t i;
Tcl_WideInt toRead;
Tcl_Obj *cmdPtr;
static const char *const switches[] = { "-size", "-command", NULL };
@@ -1785,7 +1787,7 @@ static int
ChanPendingObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
@@ -1847,7 +1849,7 @@ static int
ChanTruncateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
@@ -1920,7 +1922,7 @@ static int
ChanPipeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel rchan, wchan;
@@ -1971,7 +1973,7 @@ int
TclChannelNamesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
if (objc < 1 || objc > 2) {
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 67abca6..4fc4599 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -502,7 +502,7 @@ int
TclChanCreateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
ReflectedChannel *rcPtr; /* Instance data of the new channel */
@@ -821,7 +821,7 @@ int
TclChanPostEventObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
/*
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index ebaa840..fa1fc2d 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -497,7 +497,7 @@ int
TclChanPushObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
ReflectedTransform *rtPtr; /* Instance data of the new (transform)
@@ -742,7 +742,7 @@ int
TclChanPopObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
/*
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index aab7820..3b055e0 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -25,9 +25,9 @@ static int GetIndexFromObjList(Tcl_Interp *interp,
static void UpdateStringOfIndex(Tcl_Obj *objPtr);
static void DupIndex(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr);
static void FreeIndex(Tcl_Obj *objPtr);
-static Tcl_ObjCmdProc PrefixAllObjCmd;
-static Tcl_ObjCmdProc PrefixLongestObjCmd;
-static Tcl_ObjCmdProc PrefixMatchObjCmd;
+static Tcl_ObjCmdProc2 PrefixAllObjCmd;
+static Tcl_ObjCmdProc2 PrefixLongestObjCmd;
+static Tcl_ObjCmdProc2 PrefixMatchObjCmd;
static void PrintUsage(Tcl_Interp *interp,
const Tcl_ArgvInfo *argTable);
@@ -500,11 +500,11 @@ static int
PrefixMatchObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int flags = 0, result, dummy, i;
- size_t dummyLength, errorLength;
+ int flags = 0, result, dummy;
+ size_t dummyLength, errorLength, i;
Tcl_Obj *errorPtr = NULL;
const char *message = "option";
Tcl_Obj *tablePtr, *objPtr, *resultPtr;
@@ -624,7 +624,7 @@ static int
PrefixAllObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
@@ -682,7 +682,7 @@ static int
PrefixLongestObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 1bd462d..86caf6a 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -137,14 +137,15 @@ declare 46 {
declare 51 {
int TclInterpInit(Tcl_Interp *interp)
}
-declare 53 {
- int TclInvokeObjectCommand(void *clientData, Tcl_Interp *interp,
- int argc, const char **argv)
-}
-declare 54 {
- int TclInvokeStringCommand(void *clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[])
-}
+# Removed in 9.0
+#declare 53 {
+# int TclInvokeObjectCommand(void *clientData, Tcl_Interp *interp,
+# int argc, const char **argv)
+#}
+#declare 54 {
+# int TclInvokeStringCommand(void *clientData, Tcl_Interp *interp,
+# int objc, Tcl_Obj *const objv[])
+#}
declare 55 {
Proc *TclIsProc(Command *cmdPtr)
}
@@ -162,14 +163,16 @@ declare 61 {
declare 62 {
int TclObjCommandComplete(Tcl_Obj *cmdPtr)
}
-declare 63 {
- int TclObjInterpProc(void *clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[])
-}
-declare 64 {
- int TclObjInvoke(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[],
- int flags)
-}
+# Removed in 9.0
+#declare 63 {
+# int TclObjInterpProc(void *clientData, Tcl_Interp *interp,
+# int objc, Tcl_Obj *const objv[])
+#}
+# Removed in 9.0
+#declare 64 {
+# int TclObjInvoke(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[],
+# int flags)
+#}
declare 69 {
void *TclpAlloc(TCL_HASH_TYPE size)
}
@@ -606,10 +609,11 @@ declare 237 {
# NRE functions for "rogue" extensions to exploit NRE; they will need to
# include NRE.h too.
-declare 238 {
- int TclNRInterpProc(void *clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[])
-}
+# Removed in 9.0
+#declare 238 {
+# int TclNRInterpProc(void *clientData, Tcl_Interp *interp,
+# size_t objc, Tcl_Obj *const objv[])
+#}
declare 239 {
int TclNRInterpProcCore(Tcl_Interp *interp, Tcl_Obj *procNameObj,
Tcl_Size skip, ProcErrorProc *errorProc)
diff --git a/generic/tclInt.h b/generic/tclInt.h
index a17ce7d..379e905 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -1043,7 +1043,7 @@ typedef void (ProcErrorProc)(Tcl_Interp *interp, Tcl_Obj *procNameObj);
typedef struct Trace {
int level; /* Only trace commands at nesting level less
* than or equal to this. */
- Tcl_CmdObjTraceProc *proc; /* Procedure to call to trace command. */
+ Tcl_CmdObjTraceProc2 *proc2; /* Procedure to call to trace command. */
void *clientData; /* Arbitrary value to pass to proc. */
struct Trace *nextPtr; /* Next in list of traces for this interp. */
int flags; /* Flags governing the trace - see
@@ -1626,9 +1626,9 @@ typedef struct ByteCodeStats {
typedef struct {
const char *name; /* The name of the subcommand. */
- Tcl_ObjCmdProc *proc; /* The implementation of the subcommand. */
+ Tcl_ObjCmdProc2 *proc2; /* The implementation of the subcommand. */
CompileProc *compileProc; /* The compiler for the subcommand. */
- Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command. */
+ Tcl_ObjCmdProc2 *nreProc2; /* NRE implementation of this command. */
void *clientData; /* Any clientData to give the command. */
int unsafe; /* Whether this command is to be hidden by
* default in a safe interpreter. */
@@ -1705,8 +1705,8 @@ typedef struct Command {
* renamed, deleted, hidden, or exposed. */
CompileProc *compileProc; /* Procedure called to compile command. NULL
* if no compile proc exists for command. */
- Tcl_ObjCmdProc *objProc; /* Object-based command procedure. */
- void *objClientData; /* Arbitrary value passed to object proc. */
+ Tcl_ObjCmdProc2 *objProc2; /* Object-based command procedure. */
+ void *objClientData2; /* Arbitrary value passed to object proc. */
Tcl_CmdProc *proc; /* String-based command procedure. */
void *clientData; /* Arbitrary value passed to string proc. */
Tcl_CmdDeleteProc *deleteProc;
@@ -1724,7 +1724,7 @@ typedef struct Command {
* command. */
CommandTrace *tracePtr; /* First in list of all traces set for this
* command. */
- Tcl_ObjCmdProc *nreProc; /* NRE implementation of this command. */
+ Tcl_ObjCmdProc2 *nreProc2; /* NRE implementation of this command. */
} Command;
/*
@@ -2436,7 +2436,14 @@ typedef enum TclEolTranslation {
#define TCL_INVOKE_NO_UNKNOWN (1<<1)
#define TCL_INVOKE_NO_TRACEBACK (1<<2)
+/*
+ * ListSizeT is the type for holding list element counts. It's defined
+ * simplify sharing source between Tcl8 and Tcl9.
+ */
#if TCL_MAJOR_VERSION > 8
+
+typedef size_t ListSizeT;
+
/*
* SSIZE_MAX, NOT SIZE_MAX as negative differences need to be expressed
* between values of the Tcl_Size type so limit the range to signed
@@ -2932,31 +2939,31 @@ enum CheckEmptyStringResult {
*----------------------------------------------------------------
*/
-MODULE_SCOPE Tcl_ObjCmdProc TclNRApplyObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNREvalObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRCatchObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRExprObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRForObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRForeachCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRIfObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRLmapCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRPackageObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRSourceObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRSubstObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRSwitchObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRTryObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRUplevelObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRWhileObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRApplyObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNREvalObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRCatchObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRExprObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRForObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRForeachCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRIfObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRLmapCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRPackageObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRSourceObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRSubstObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRSwitchObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRTryObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRUplevelObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRWhileObjCmd;
MODULE_SCOPE Tcl_NRPostProc TclNRForIterCallback;
MODULE_SCOPE Tcl_NRPostProc TclNRCoroutineActivateCallback;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRTailcallObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRTailcallObjCmd;
MODULE_SCOPE Tcl_NRPostProc TclNRTailcallEval;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRCoroutineObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldmObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRYieldToObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRInvoke;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRCoroutineObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRYieldObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRYieldmObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRYieldToObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRInvoke;
MODULE_SCOPE Tcl_NRPostProc TclNRReleaseValues;
MODULE_SCOPE void TclSetTailcall(Tcl_Interp *interp, Tcl_Obj *tailcallPtr);
@@ -3035,11 +3042,11 @@ MODULE_SCOPE void TclAdvanceContinuations(size_t *line, int **next,
MODULE_SCOPE void TclAdvanceLines(size_t *line, const char *start,
const char *end);
MODULE_SCOPE void TclArgumentEnter(Tcl_Interp *interp,
- Tcl_Obj *objv[], int objc, CmdFrame *cf);
+ Tcl_Obj *objv[], Tcl_Size objc, CmdFrame *cf);
MODULE_SCOPE void TclArgumentRelease(Tcl_Interp *interp,
- Tcl_Obj *objv[], int objc);
+ Tcl_Obj *objv[], Tcl_Size objc);
MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp *interp,
- Tcl_Obj *objv[], int objc,
+ Tcl_Obj *objv[], Tcl_Size objc,
void *codePtr, CmdFrame *cfPtr, int cmd, size_t pc);
MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp *interp,
CmdFrame *cfPtr);
@@ -3060,7 +3067,7 @@ MODULE_SCOPE int TclCheckArrayTraces(Tcl_Interp *interp, Var *varPtr,
MODULE_SCOPE int TclCheckEmptyString(Tcl_Obj *objPtr);
MODULE_SCOPE int TclChanCaughtErrorBypass(Tcl_Interp *interp,
Tcl_Channel chan);
-MODULE_SCOPE Tcl_ObjCmdProc TclChannelNamesCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclChannelNamesCmd;
MODULE_SCOPE Tcl_NRPostProc TclClearRootEnsemble;
MODULE_SCOPE int TclCompareTwoNumbers(Tcl_Obj *valuePtr,
Tcl_Obj *value2Ptr);
@@ -3075,7 +3082,7 @@ MODULE_SCOPE size_t TclConvertElement(const char *src, size_t length,
char *dst, int flags);
MODULE_SCOPE Tcl_Command TclCreateObjCommandInNs(Tcl_Interp *interp,
const char *cmdName, Tcl_Namespace *nsPtr,
- Tcl_ObjCmdProc *proc, void *clientData,
+ Tcl_ObjCmdProc2 *proc, void *clientData,
Tcl_CmdDeleteProc *deleteProc);
MODULE_SCOPE Tcl_Command TclCreateEnsembleInNs(Tcl_Interp *interp,
const char *name, Tcl_Namespace *nameNamespacePtr,
@@ -3090,17 +3097,17 @@ MODULE_SCOPE int TclFindDictElement(Tcl_Interp *interp,
MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script,
size_t numBytes, int flags, size_t line,
int *clNextOuter, const char *outerScript);
-MODULE_SCOPE Tcl_ObjCmdProc TclFileAttrsCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileCopyCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileDeleteCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileLinkCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileMakeDirsCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileReadLinkCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileRenameCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileTempDirCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileTemporaryCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileHomeCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclFileTildeExpandCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileAttrsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileCopyCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileDeleteCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileLinkCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileMakeDirsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileReadLinkCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileRenameCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileTempDirCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileTemporaryCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileHomeCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclFileTildeExpandCmd;
MODULE_SCOPE void TclCreateLateExitHandler(Tcl_ExitProc *proc,
void *clientData);
MODULE_SCOPE void TclDeleteLateExitHandler(Tcl_ExitProc *proc,
@@ -3143,7 +3150,7 @@ MODULE_SCOPE int TclFSFileAttrIndex(Tcl_Obj *pathPtr,
const char *attributeName, int *indexPtr);
MODULE_SCOPE Tcl_Command TclNRCreateCommandInNs(Tcl_Interp *interp,
const char *cmdName, Tcl_Namespace *nsPtr,
- Tcl_ObjCmdProc *proc, Tcl_ObjCmdProc *nreProc,
+ Tcl_ObjCmdProc2 *proc, Tcl_ObjCmdProc2 *nreProc,
void *clientData, Tcl_CmdDeleteProc *deleteProc);
MODULE_SCOPE int TclNREvalFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
const char *encodingName);
@@ -3162,7 +3169,7 @@ MODULE_SCOPE int TclGetOpenModeEx(Tcl_Interp *interp,
const char *modeString, int *seekFlagPtr,
int *binaryPtr);
MODULE_SCOPE Tcl_Obj * TclGetProcessGlobalValue(ProcessGlobalValue *pgvPtr);
-MODULE_SCOPE Tcl_Obj * TclGetSourceFromFrame(CmdFrame *cfPtr, int objc,
+MODULE_SCOPE Tcl_Obj * TclGetSourceFromFrame(CmdFrame *cfPtr, Tcl_Size objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE char * TclGetStringStorage(Tcl_Obj *objPtr,
TCL_HASH_TYPE *sizePtr);
@@ -3175,12 +3182,12 @@ MODULE_SCOPE int TclIncrObj(Tcl_Interp *interp, Tcl_Obj *valuePtr,
Tcl_Obj *incrPtr);
MODULE_SCOPE Tcl_Obj * TclIncrObjVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr, int flags);
-MODULE_SCOPE Tcl_ObjCmdProc TclInfoExistsCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclInfoCoroutineCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoExistsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoCoroutineCmd;
MODULE_SCOPE Tcl_Obj * TclInfoFrame(Tcl_Interp *interp, CmdFrame *framePtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclInfoGlobalsCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclInfoLocalsCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclInfoVarsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoGlobalsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoLocalsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoVarsCmd;
MODULE_SCOPE void TclInitAlloc(void);
MODULE_SCOPE void TclInitDbCkalloc(void);
MODULE_SCOPE void TclInitDoubleConversion(void);
@@ -3228,7 +3235,7 @@ MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name,
MODULE_SCOPE int TclMakeSafe(Tcl_Interp *interp);
MODULE_SCOPE int TclMaxListLength(const char *bytes, size_t numBytes,
const char **endPtr);
-MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc,
+MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr,
int *codePtr, int *levelPtr);
MODULE_SCOPE Tcl_Obj * TclNarrowToBytes(Tcl_Obj *objPtr);
@@ -3239,8 +3246,18 @@ MODULE_SCOPE int TclNamespaceDeleted(Namespace *nsPtr);
MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, const char *operation,
const char *reason, int index);
+MODULE_SCOPE int TclObjInterpProc(void *clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *const objv[]);
+MODULE_SCOPE int TclObjInterpProc2(void *clientData,
+ Tcl_Interp *interp, size_t objc,
+ Tcl_Obj *const objv[]);
+#define TclObjInterpProc TclGetObjInterpProc()
+#define TclObjInterpProc2 TclGetObjInterpProc2()
+MODULE_SCOPE int TclObjInvoke(Tcl_Interp *interp, Tcl_Size objc,
+ Tcl_Obj *const objv[], int flags);
MODULE_SCOPE int TclObjInvokeNamespace(Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[],
+ Tcl_Size objc, Tcl_Obj *const objv[],
Tcl_Namespace *nsPtr, int flags);
MODULE_SCOPE int TclObjUnsetVar2(Tcl_Interp *interp,
Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags);
@@ -3354,8 +3371,8 @@ MODULE_SCOPE void * TclStackRealloc(Tcl_Interp *interp, void *ptr,
size_t numBytes);
typedef int (*memCmpFn_t)(const void*, const void*, size_t);
MODULE_SCOPE int TclStringCmp(Tcl_Obj *value1Ptr, Tcl_Obj *value2Ptr,
- int checkEq, int nocase, size_t reqlength);
-MODULE_SCOPE int TclStringCmpOpts(Tcl_Interp *interp, int objc,
+ int checkEq, int nocase, Tcl_Size reqlength);
+MODULE_SCOPE int TclStringCmpOpts(Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], int *nocase,
int *reqlength);
MODULE_SCOPE int TclStringMatch(const char *str, size_t strLen,
@@ -3381,7 +3398,7 @@ MODULE_SCOPE size_t TclTrimRight(const char *bytes, size_t numBytes,
const char *trim, size_t numTrim);
MODULE_SCOPE const char*TclGetCommandTypeName(Tcl_Command command);
MODULE_SCOPE void TclRegisterCommandTypeName(
- Tcl_ObjCmdProc *implementationProc,
+ Tcl_ObjCmdProc2 *implementationProc,
const char *nameStr);
MODULE_SCOPE int TclUtfCmp(const char *cs, const char *ct);
MODULE_SCOPE int TclUtfCasecmp(const char *cs, const char *ct);
@@ -3453,28 +3470,28 @@ MODULE_SCOPE int TclIsSpaceProc(int byte);
*----------------------------------------------------------------
*/
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_AfterObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_AppendObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ApplyObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_AfterObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_AppendObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ApplyObjCmd;
MODULE_SCOPE Tcl_Command TclInitArrayCmd(Tcl_Interp *interp);
MODULE_SCOPE Tcl_Command TclInitBinaryCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_BreakObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_CatchObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_CdObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_BreakObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_CatchObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_CdObjCmd;
MODULE_SCOPE Tcl_Command TclInitChanCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc TclChanCreateObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclChanPostEventObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclChanPopObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclChanPushObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclChanCreateObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclChanPostEventObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclChanPopObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclChanPushObjCmd;
MODULE_SCOPE void TclClockInit(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc TclClockOldscanObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_CloseObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ConcatObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ContinueObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclClockOldscanObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_CloseObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ConcatObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ContinueObjCmd;
MODULE_SCOPE Tcl_TimerToken TclCreateAbsoluteTimerHandler(
Tcl_Time *timePtr, Tcl_TimerProc *proc,
void *clientData);
-MODULE_SCOPE Tcl_ObjCmdProc TclDefaultBgErrorHandlerObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclDefaultBgErrorHandlerObjCmd;
MODULE_SCOPE Tcl_Command TclInitDictCmd(Tcl_Interp *interp);
MODULE_SCOPE int TclDictWithFinish(Tcl_Interp *interp, Var *varPtr,
Var *arrayPtr, Tcl_Obj *part1Ptr,
@@ -3482,91 +3499,91 @@ MODULE_SCOPE int TclDictWithFinish(Tcl_Interp *interp, Var *varPtr,
Tcl_Obj *const pathv[], Tcl_Obj *keysPtr);
MODULE_SCOPE Tcl_Obj * TclDictWithInit(Tcl_Interp *interp, Tcl_Obj *dictPtr,
size_t pathc, Tcl_Obj *const pathv[]);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_DisassembleObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_DisassembleObjCmd;
/* Assemble command function */
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_AssembleObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNRAssembleObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_AssembleObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRAssembleObjCmd;
MODULE_SCOPE Tcl_Command TclInitEncodingCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_EofObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ErrorObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_EvalObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ExecObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ExitObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ExprObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_FblockedObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_FconfigureObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_FcopyObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_EofObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ErrorObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_EvalObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ExecObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ExitObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ExprObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_FblockedObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_FconfigureObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_FcopyObjCmd;
MODULE_SCOPE Tcl_Command TclInitFileCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_FileEventObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_FlushObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ForObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ForeachObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_FormatObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_GetsObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_GlobalObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_GlobObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_IfObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_IncrObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_FileEventObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_FlushObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ForObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ForeachObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_FormatObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_GetsObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_GlobalObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_GlobObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_IfObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_IncrObjCmd;
MODULE_SCOPE Tcl_Command TclInitInfoCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_InterpObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_JoinObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LappendObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LassignObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LeditObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LindexObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LinsertObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LlengthObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ListObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LmapObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LoadObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LpopObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LrangeObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LremoveObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LrepeatObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LreplaceObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LreverseObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LsearchObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LseqObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LsetObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_LsortObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_InterpObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_JoinObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LappendObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LassignObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LeditObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LindexObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LinsertObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LlengthObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ListObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LmapObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LoadObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LpopObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LrangeObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LremoveObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LrepeatObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LreplaceObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LreverseObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LsearchObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LseqObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LsetObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_LsortObjCmd;
MODULE_SCOPE Tcl_Command TclInitNamespaceCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc TclNamespaceEnsembleCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_OpenObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_PackageObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_PidObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNamespaceEnsembleCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_OpenObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_PackageObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_PidObjCmd;
MODULE_SCOPE Tcl_Command TclInitPrefixCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_PutsObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_PwdObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ReadObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_RegexpObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_RegsubObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_RenameObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_RepresentationCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ReturnObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ScanObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_SeekObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_SetObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_SplitObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_SocketObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_SourceObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_PutsObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_PwdObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ReadObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_RegexpObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_RegsubObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_RenameObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_RepresentationCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ReturnObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ScanObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_SeekObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_SetObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_SplitObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_SocketObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_SourceObjCmd;
MODULE_SCOPE Tcl_Command TclInitStringCmd(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_SubstObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_SwitchObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_TellObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_ThrowObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_TimeObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_TimeRateObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_TraceObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_TryObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_UnloadObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_UnsetObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_UpdateObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_UplevelObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_UpvarObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_VariableObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_VwaitObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_WhileObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_SubstObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_SwitchObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_TellObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_ThrowObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_TimeObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_TimeRateObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_TraceObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_TryObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_UnloadObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_UnsetObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_UpdateObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_UplevelObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_UpvarObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_VariableObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_VwaitObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_WhileObjCmd;
/*
*----------------------------------------------------------------
@@ -3896,71 +3913,71 @@ MODULE_SCOPE int TclCompileBasicMin2ArgCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclInvertOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInvertOpCmd;
MODULE_SCOPE int TclCompileInvertOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclNotOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNotOpCmd;
MODULE_SCOPE int TclCompileNotOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclAddOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclAddOpCmd;
MODULE_SCOPE int TclCompileAddOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclMulOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclMulOpCmd;
MODULE_SCOPE int TclCompileMulOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclAndOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclAndOpCmd;
MODULE_SCOPE int TclCompileAndOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclOrOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOrOpCmd;
MODULE_SCOPE int TclCompileOrOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclXorOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclXorOpCmd;
MODULE_SCOPE int TclCompileXorOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclPowOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclPowOpCmd;
MODULE_SCOPE int TclCompilePowOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclLshiftOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclLshiftOpCmd;
MODULE_SCOPE int TclCompileLshiftOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclRshiftOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclRshiftOpCmd;
MODULE_SCOPE int TclCompileRshiftOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclModOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclModOpCmd;
MODULE_SCOPE int TclCompileModOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclNeqOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNeqOpCmd;
MODULE_SCOPE int TclCompileNeqOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclStrneqOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclStrneqOpCmd;
MODULE_SCOPE int TclCompileStrneqOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclInOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInOpCmd;
MODULE_SCOPE int TclCompileInOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclNiOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNiOpCmd;
MODULE_SCOPE int TclCompileNiOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclMinusOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclMinusOpCmd;
MODULE_SCOPE int TclCompileMinusOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-MODULE_SCOPE Tcl_ObjCmdProc TclDivOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclDivOpCmd;
MODULE_SCOPE int TclCompileDivOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
@@ -4004,7 +4021,7 @@ MODULE_SCOPE int TclCompileAssembleCmd(Tcl_Interp *interp,
* candidates for public interface.
*/
-MODULE_SCOPE Tcl_Obj * TclStringCat(Tcl_Interp *interp, int objc,
+MODULE_SCOPE Tcl_Obj * TclStringCat(Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], int flags);
MODULE_SCOPE Tcl_Obj * TclStringFirst(Tcl_Obj *needle, Tcl_Obj *haystack,
size_t start);
@@ -4013,7 +4030,7 @@ MODULE_SCOPE Tcl_Obj * TclStringLast(Tcl_Obj *needle, Tcl_Obj *haystack,
MODULE_SCOPE Tcl_Obj * TclStringRepeat(Tcl_Interp *interp, Tcl_Obj *objPtr,
size_t count, int flags);
MODULE_SCOPE Tcl_Obj * TclStringReplace(Tcl_Interp *interp, Tcl_Obj *objPtr,
- size_t first, size_t count, Tcl_Obj *insertPtr,
+ size_t first, Tcl_Size count, Tcl_Obj *insertPtr,
int flags);
MODULE_SCOPE Tcl_Obj * TclStringReverse(Tcl_Obj *objPtr, int flags);
@@ -4094,14 +4111,14 @@ MODULE_SCOPE int TclUniCharCaseMatch(const Tcl_UniChar *uniStr,
* Just for the purposes of command-type registration.
*/
-MODULE_SCOPE Tcl_ObjCmdProc TclEnsembleImplementationCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclAliasObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclLocalAliasObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclChildObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclInvokeImportedCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOPublicObjectCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOPrivateObjectCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOMyClassObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclEnsembleImplementationCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclAliasObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclLocalAliasObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclChildObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInvokeImportedCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOPublicObjectCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOPrivateObjectCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOMyClassObjCmd;
/*
* TIP #462.
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index b84b996..74d2bff 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -27,6 +27,10 @@
# endif
#endif
+#ifdef TCL_NO_DEPRECATED
+#define Tcl_ObjCmdProc void
+#endif
+
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
* script. Any modifications to the function declarations below should be made
@@ -144,14 +148,8 @@ EXTERN int TclInExit(void);
/* 51 */
EXTERN int TclInterpInit(Tcl_Interp *interp);
/* Slot 52 is reserved */
-/* 53 */
-EXTERN int TclInvokeObjectCommand(void *clientData,
- Tcl_Interp *interp, int argc,
- const char **argv);
-/* 54 */
-EXTERN int TclInvokeStringCommand(void *clientData,
- Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[]);
+/* Slot 53 is reserved */
+/* Slot 54 is reserved */
/* 55 */
EXTERN Proc * TclIsProc(Command *cmdPtr);
/* Slot 56 is reserved */
@@ -168,13 +166,8 @@ EXTERN int TclNeedSpace(const char *start, const char *end);
EXTERN Tcl_Obj * TclNewProcBodyObj(Proc *procPtr);
/* 62 */
EXTERN int TclObjCommandComplete(Tcl_Obj *cmdPtr);
-/* 63 */
-EXTERN int TclObjInterpProc(void *clientData,
- Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[]);
-/* 64 */
-EXTERN int TclObjInvoke(Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[], int flags);
+/* Slot 63 is reserved */
+/* Slot 64 is reserved */
/* Slot 65 is reserved */
/* Slot 66 is reserved */
/* Slot 67 is reserved */
@@ -504,9 +497,7 @@ EXTERN void TclInitVarHashTable(TclVarHashTable *tablePtr,
/* Slot 236 is reserved */
/* 237 */
EXTERN int TclResetCancellation(Tcl_Interp *interp, int force);
-/* 238 */
-EXTERN int TclNRInterpProc(void *clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
+/* Slot 238 is reserved */
/* 239 */
EXTERN int TclNRInterpProcCore(Tcl_Interp *interp,
Tcl_Obj *procNameObj, Tcl_Size skip,
@@ -642,8 +633,8 @@ typedef struct TclIntStubs {
void (*reserved50)(void);
int (*tclInterpInit) (Tcl_Interp *interp); /* 51 */
void (*reserved52)(void);
- int (*tclInvokeObjectCommand) (void *clientData, Tcl_Interp *interp, int argc, const char **argv); /* 53 */
- int (*tclInvokeStringCommand) (void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 54 */
+ void (*reserved53)(void);
+ void (*reserved54)(void);
Proc * (*tclIsProc) (Command *cmdPtr); /* 55 */
void (*reserved56)(void);
void (*reserved57)(void);
@@ -652,8 +643,8 @@ typedef struct TclIntStubs {
int (*tclNeedSpace) (const char *start, const char *end); /* 60 */
Tcl_Obj * (*tclNewProcBodyObj) (Proc *procPtr); /* 61 */
int (*tclObjCommandComplete) (Tcl_Obj *cmdPtr); /* 62 */
- int (*tclObjInterpProc) (void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 63 */
- int (*tclObjInvoke) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 64 */
+ void (*reserved63)(void);
+ void (*reserved64)(void);
void (*reserved65)(void);
void (*reserved66)(void);
void (*reserved67)(void);
@@ -827,7 +818,7 @@ typedef struct TclIntStubs {
void (*tclInitVarHashTable) (TclVarHashTable *tablePtr, Namespace *nsPtr); /* 235 */
void (*reserved236)(void);
int (*tclResetCancellation) (Tcl_Interp *interp, int force); /* 237 */
- int (*tclNRInterpProc) (void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 238 */
+ void (*reserved238)(void);
int (*tclNRInterpProcCore) (Tcl_Interp *interp, Tcl_Obj *procNameObj, Tcl_Size skip, ProcErrorProc *errorProc); /* 239 */
int (*tclNRRunCallbacks) (Tcl_Interp *interp, int result, struct NRE_callback *rootPtr); /* 240 */
int (*tclNREvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, const CmdFrame *invoker, int word); /* 241 */
@@ -944,10 +935,8 @@ extern const TclIntStubs *tclIntStubsPtr;
#define TclInterpInit \
(tclIntStubsPtr->tclInterpInit) /* 51 */
/* Slot 52 is reserved */
-#define TclInvokeObjectCommand \
- (tclIntStubsPtr->tclInvokeObjectCommand) /* 53 */
-#define TclInvokeStringCommand \
- (tclIntStubsPtr->tclInvokeStringCommand) /* 54 */
+/* Slot 53 is reserved */
+/* Slot 54 is reserved */
#define TclIsProc \
(tclIntStubsPtr->tclIsProc) /* 55 */
/* Slot 56 is reserved */
@@ -961,10 +950,8 @@ extern const TclIntStubs *tclIntStubsPtr;
(tclIntStubsPtr->tclNewProcBodyObj) /* 61 */
#define TclObjCommandComplete \
(tclIntStubsPtr->tclObjCommandComplete) /* 62 */
-#define TclObjInterpProc \
- (tclIntStubsPtr->tclObjInterpProc) /* 63 */
-#define TclObjInvoke \
- (tclIntStubsPtr->tclObjInvoke) /* 64 */
+/* Slot 63 is reserved */
+/* Slot 64 is reserved */
/* Slot 65 is reserved */
/* Slot 66 is reserved */
/* Slot 67 is reserved */
@@ -1224,8 +1211,7 @@ extern const TclIntStubs *tclIntStubsPtr;
/* Slot 236 is reserved */
#define TclResetCancellation \
(tclIntStubsPtr->tclResetCancellation) /* 237 */
-#define TclNRInterpProc \
- (tclIntStubsPtr->tclNRInterpProc) /* 238 */
+/* Slot 238 is reserved */
#define TclNRInterpProcCore \
(tclIntStubsPtr->tclNRInterpProcCore) /* 239 */
#define TclNRRunCallbacks \
@@ -1276,6 +1262,10 @@ extern const TclIntStubs *tclIntStubsPtr;
/* !END!: Do not edit above this line. */
+#ifdef TCL_NO_DEPRECATED
+#undef Tcl_ObjCmdProc
+#endif
+
#if defined(USE_TCL_STUBS)
#undef Tcl_StaticLibrary
#define Tcl_StaticLibrary \
@@ -1291,10 +1281,6 @@ extern const TclIntStubs *tclIntStubsPtr;
((unsigned long)tclIntStubsPtr->tclpGetSeconds())
#endif
-#undef TclObjInterpProc
-#define TclObjInterpProc TclGetObjInterpProc()
-#define TclObjInterpProc2 TclGetObjInterpProc2()
-
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 98e63db..864f727 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -215,52 +215,52 @@ struct LimitHandler {
static int AliasCreate(Tcl_Interp *interp,
Tcl_Interp *childInterp, Tcl_Interp *parentInterp,
- Tcl_Obj *namePtr, Tcl_Obj *targetPtr, int objc,
+ Tcl_Obj *namePtr, Tcl_Obj *targetPtr, size_t objc,
Tcl_Obj *const objv[]);
static int AliasDelete(Tcl_Interp *interp,
Tcl_Interp *childInterp, Tcl_Obj *namePtr);
static int AliasDescribe(Tcl_Interp *interp,
Tcl_Interp *childInterp, Tcl_Obj *objPtr);
static int AliasList(Tcl_Interp *interp, Tcl_Interp *childInterp);
-static Tcl_ObjCmdProc AliasNRCmd;
+static Tcl_ObjCmdProc2 AliasNRCmd;
static Tcl_CmdDeleteProc AliasObjCmdDeleteProc;
static Tcl_Interp * GetInterp(Tcl_Interp *interp, Tcl_Obj *pathPtr);
-static Tcl_Interp * GetInterp2(Tcl_Interp *interp, int objc,
+static Tcl_Interp * GetInterp2(Tcl_Interp *interp, size_t objc,
Tcl_Obj *const objv[]);
static Tcl_InterpDeleteProc InterpInfoDeleteProc;
static int ChildBgerror(Tcl_Interp *interp,
- Tcl_Interp *childInterp, int objc,
+ Tcl_Interp *childInterp, size_t objc,
Tcl_Obj *const objv[]);
static Tcl_Interp * ChildCreate(Tcl_Interp *interp, Tcl_Obj *pathPtr,
int safe);
static int ChildDebugCmd(Tcl_Interp *interp,
Tcl_Interp *childInterp,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static int ChildEval(Tcl_Interp *interp, Tcl_Interp *childInterp,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static int ChildExpose(Tcl_Interp *interp,
- Tcl_Interp *childInterp, int objc,
+ Tcl_Interp *childInterp, size_t objc,
Tcl_Obj *const objv[]);
static int ChildHide(Tcl_Interp *interp, Tcl_Interp *childInterp,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static int ChildHidden(Tcl_Interp *interp,
Tcl_Interp *childInterp);
static int ChildInvokeHidden(Tcl_Interp *interp,
Tcl_Interp *childInterp,
const char *namespaceName,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static int ChildMarkTrusted(Tcl_Interp *interp,
Tcl_Interp *childInterp);
static Tcl_CmdDeleteProc ChildObjCmdDeleteProc;
static int ChildRecursionLimit(Tcl_Interp *interp,
- Tcl_Interp *childInterp, int objc,
+ Tcl_Interp *childInterp, size_t objc,
Tcl_Obj *const objv[]);
static int ChildCommandLimitCmd(Tcl_Interp *interp,
- Tcl_Interp *childInterp, int consumedObjc,
- int objc, Tcl_Obj *const objv[]);
+ Tcl_Interp *childInterp, size_t consumedObjc,
+ size_t objc, Tcl_Obj *const objv[]);
static int ChildTimeLimitCmd(Tcl_Interp *interp,
- Tcl_Interp *childInterp, int consumedObjc,
- int objc, Tcl_Obj *const objv[]);
+ Tcl_Interp *childInterp, size_t consumedObjc,
+ size_t objc, Tcl_Obj *const objv[]);
static void InheritLimitsFromParent(Tcl_Interp *childInterp,
Tcl_Interp *parentInterp);
static void SetScriptLimitCallback(Tcl_Interp *interp, int type,
@@ -274,8 +274,8 @@ static void TimeLimitCallback(ClientData clientData);
/* NRE enabling */
static Tcl_NRPostProc NRPostInvokeHidden;
-static Tcl_ObjCmdProc NRInterpCmd;
-static Tcl_ObjCmdProc NRChildCmd;
+static Tcl_ObjCmdProc2 NRInterpCmd;
+static Tcl_ObjCmdProc2 NRChildCmd;
/*
@@ -496,7 +496,7 @@ TclInterpInit(
childPtr->interpCmd = NULL;
Tcl_InitHashTable(&childPtr->aliasTable, TCL_STRING_KEYS);
- Tcl_NRCreateCommand(interp, "interp", Tcl_InterpObjCmd, NRInterpCmd,
+ Tcl_NRCreateCommand2(interp, "interp", Tcl_InterpObjCmd, NRInterpCmd,
NULL, NULL);
Tcl_CallWhenDeleted(interp, InterpInfoDeleteProc, NULL);
@@ -603,17 +603,17 @@ int
Tcl_InterpObjCmd(
ClientData clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, NRInterpCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, NRInterpCmd, clientData, objc, objv);
}
static int
NRInterpCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *childInterp;
@@ -709,7 +709,8 @@ NRInterpCmd(
}
return ChildBgerror(interp, childInterp, objc - 3, objv + 3);
case OPT_CANCEL: {
- int i, flags;
+ size_t i;
+ int flags;
Tcl_Obj *resultObjPtr;
static const char *const cancelOptions[] = {
"-unwind", "--", NULL
@@ -781,7 +782,8 @@ NRInterpCmd(
return Tcl_CancelEval(childInterp, resultObjPtr, 0, flags);
}
case OPT_CREATE: {
- int i, last, safe;
+ int last, safe;
+ size_t i;
Tcl_Obj *childPtr;
char buf[16 + TCL_INTEGER_SPACE];
static const char *const createOptions[] = {
@@ -832,7 +834,7 @@ NRInterpCmd(
for (i = 0; ; i++) {
Tcl_CmdInfo cmdInfo;
- sprintf(buf, "interp%d", i);
+ sprintf(buf, "interp%" TCL_Z_MODIFIER "d", i);
if (Tcl_GetCommandInfo(interp, buf, &cmdInfo) == 0) {
break;
}
@@ -863,7 +865,7 @@ NRInterpCmd(
}
return ChildDebugCmd(interp, childInterp, objc - 3, objv + 3);
case OPT_DELETE: {
- int i;
+ size_t i;
InterpInfo *iiPtr;
for (i = 2; i < objc; i++) {
@@ -941,7 +943,7 @@ NRInterpCmd(
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(Tcl_IsSafe(childInterp)));
return TCL_OK;
case OPT_INVOKEHID: {
- int i;
+ size_t i;
const char *namespaceName;
static const char *const hiddenOptions[] = {
"-global", "-namespace", "--", NULL
@@ -1162,7 +1164,7 @@ static Tcl_Interp *
GetInterp2(
Tcl_Interp *interp, /* Default interp if no interp was specified
* on the command line. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc == 2) {
@@ -1431,8 +1433,8 @@ TclPreventAliasLoop(
* create or rename the command.
*/
- if (cmdPtr->objProc != TclAliasObjCmd
- && cmdPtr->objProc != TclLocalAliasObjCmd) {
+ if (cmdPtr->objProc2 != TclAliasObjCmd
+ && cmdPtr->objProc2 != TclLocalAliasObjCmd) {
return TCL_OK;
}
@@ -1442,7 +1444,7 @@ TclPreventAliasLoop(
* chain then we have a loop.
*/
- aliasPtr = (Alias *)cmdPtr->objClientData;
+ aliasPtr = (Alias *)cmdPtr->objClientData2;
nextAliasPtr = aliasPtr;
while (1) {
Tcl_Obj *cmdNamePtr;
@@ -1487,11 +1489,11 @@ TclPreventAliasLoop(
* Otherwise we do not have a loop.
*/
- if (aliasCmdPtr->objProc != TclAliasObjCmd
- && aliasCmdPtr->objProc != TclLocalAliasObjCmd) {
+ if (aliasCmdPtr->objProc2 != TclAliasObjCmd
+ && aliasCmdPtr->objProc2 != TclLocalAliasObjCmd) {
return TCL_OK;
}
- nextAliasPtr = (Alias *)aliasCmdPtr->objClientData;
+ nextAliasPtr = (Alias *)aliasCmdPtr->objClientData2;
}
}
@@ -1521,7 +1523,7 @@ AliasCreate(
* invoked. */
Tcl_Obj *namePtr, /* Name of alias cmd. */
Tcl_Obj *targetNamePtr, /* Name of target cmd. */
- int objc, /* Additional arguments to store */
+ size_t objc, /* Additional arguments to store */
Tcl_Obj *const objv[]) /* with alias. */
{
Alias *aliasPtr;
@@ -1530,7 +1532,8 @@ AliasCreate(
Child *childPtr;
Parent *parentPtr;
Tcl_Obj **prefv;
- int isNew, i;
+ int isNew;
+ size_t i;
aliasPtr = (Alias *)Tcl_Alloc(sizeof(Alias) + objc * sizeof(Tcl_Obj *));
aliasPtr->token = namePtr;
@@ -1551,11 +1554,11 @@ AliasCreate(
Tcl_Preserve(parentInterp);
if (childInterp == parentInterp) {
- aliasPtr->childCmd = Tcl_NRCreateCommand(childInterp,
+ aliasPtr->childCmd = Tcl_NRCreateCommand2(childInterp,
TclGetString(namePtr), TclLocalAliasObjCmd, AliasNRCmd,
aliasPtr, AliasObjCmdDeleteProc);
} else {
- aliasPtr->childCmd = Tcl_CreateObjCommand(childInterp,
+ aliasPtr->childCmd = Tcl_CreateObjCommand2(childInterp,
TclGetString(namePtr), TclAliasObjCmd, aliasPtr,
AliasObjCmdDeleteProc);
}
@@ -1822,7 +1825,7 @@ static int
AliasNRCmd(
ClientData clientData, /* Alias record. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument vector. */
{
Alias *aliasPtr = (Alias *)clientData;
@@ -1875,7 +1878,7 @@ int
TclAliasObjCmd(
ClientData clientData, /* Alias record. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument vector. */
{
#define ALIAS_CMDV_PREALLOC 10
@@ -1966,7 +1969,7 @@ int
TclLocalAliasObjCmd(
ClientData clientData, /* Alias record. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument vector. */
{
#define ALIAS_CMDV_PREALLOC 10
@@ -2377,7 +2380,7 @@ static int
ChildBgerror(
Tcl_Interp *interp, /* Interp for error return. */
Tcl_Interp *childInterp, /* Interp in which limit is set/queried. */
- int objc, /* Set or Query. */
+ size_t objc, /* Set or Query. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
if (objc) {
@@ -2467,7 +2470,7 @@ ChildCreate(
childPtr->parentInterp = parentInterp;
childPtr->childEntryPtr = hPtr;
childPtr->childInterp = childInterp;
- childPtr->interpCmd = Tcl_NRCreateCommand(parentInterp, path,
+ childPtr->interpCmd = Tcl_NRCreateCommand2(parentInterp, path,
TclChildObjCmd, NRChildCmd, childInterp, ChildObjCmdDeleteProc);
Tcl_InitHashTable(&childPtr->aliasTable, TCL_STRING_KEYS);
Tcl_SetHashValue(hPtr, childPtr);
@@ -2554,17 +2557,17 @@ int
TclChildObjCmd(
ClientData clientData, /* Child interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, NRChildCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, NRChildCmd, clientData, objc, objv);
}
static int
NRChildCmd(
ClientData clientData, /* Child interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *childInterp = (Tcl_Interp *)clientData;
@@ -2665,7 +2668,7 @@ NRChildCmd(
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(Tcl_IsSafe(childInterp)));
return TCL_OK;
case OPT_INVOKEHIDDEN: {
- int i;
+ size_t i;
const char *namespaceName;
static const char *const hiddenOptions[] = {
"-global", "-namespace", "--", NULL
@@ -2814,7 +2817,7 @@ ChildDebugCmd(
Tcl_Interp *interp, /* Interp for error return. */
Tcl_Interp *childInterp, /* The child interpreter in which command
* will be evaluated. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const debugTypes[] = {
@@ -2885,7 +2888,7 @@ ChildEval(
Tcl_Interp *interp, /* Interp for error return. */
Tcl_Interp *childInterp, /* The child interpreter in which command
* will be evaluated. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
@@ -2948,7 +2951,7 @@ static int
ChildExpose(
Tcl_Interp *interp, /* Interp for error return. */
Tcl_Interp *childInterp, /* Interp in which command will be exposed. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
const char *name;
@@ -2992,7 +2995,7 @@ static int
ChildRecursionLimit(
Tcl_Interp *interp, /* Interp for error return. */
Tcl_Interp *childInterp, /* Interp in which limit is set/queried. */
- int objc, /* Set or Query. */
+ size_t objc, /* Set or Query. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
Interp *iPtr;
@@ -3054,7 +3057,7 @@ static int
ChildHide(
Tcl_Interp *interp, /* Interp for error return. */
Tcl_Interp *childInterp, /* Interp in which command will be exposed. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
const char *name;
@@ -3139,7 +3142,7 @@ ChildInvokeHidden(
Tcl_Interp *childInterp, /* The child interpreter in which command will
* be invoked. */
const char *namespaceName, /* The namespace to use, if any. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
@@ -4484,8 +4487,8 @@ static int
ChildCommandLimitCmd(
Tcl_Interp *interp, /* Current interpreter. */
Tcl_Interp *childInterp, /* Interpreter being adjusted. */
- int consumedObjc, /* Number of args already parsed. */
- int objc, /* Total number of arguments. */
+ size_t consumedObjc, /* Number of args already parsed. */
+ size_t objc, /* Total number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const options[] = {
@@ -4585,8 +4588,7 @@ ChildCommandLimitCmd(
Tcl_WrongNumArgs(interp, consumedObjc, objv, "?-option value ...?");
return TCL_ERROR;
} else {
- int i;
- size_t scriptLen = 0, limitLen = 0;
+ size_t i, scriptLen = 0, limitLen = 0;
Tcl_Obj *scriptObj = NULL, *granObj = NULL, *limitObj = NULL;
int gran = 0, limit = 0;
@@ -4672,8 +4674,8 @@ static int
ChildTimeLimitCmd(
Tcl_Interp *interp, /* Current interpreter. */
Tcl_Interp *childInterp, /* Interpreter being adjusted. */
- int consumedObjc, /* Number of args already parsed. */
- int objc, /* Total number of arguments. */
+ size_t consumedObjc, /* Number of args already parsed. */
+ size_t objc, /* Total number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const options[] = {
@@ -4790,8 +4792,7 @@ ChildTimeLimitCmd(
Tcl_WrongNumArgs(interp, consumedObjc, objv, "?-option value ...?");
return TCL_ERROR;
} else {
- int i;
- size_t scriptLen = 0, milliLen = 0, secLen = 0;
+ size_t i, scriptLen = 0, milliLen = 0, secLen = 0;
Tcl_Obj *scriptObj = NULL, *granObj = NULL;
Tcl_Obj *milliObj = NULL, *secObj = NULL;
int gran = 0;
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index fa0b584..b536b76 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -126,7 +126,7 @@ int
Tcl_LoadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *target;
@@ -552,14 +552,15 @@ int
Tcl_UnloadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *target; /* Which interpreter to unload from. */
LoadedLibrary *libraryPtr;
Tcl_DString pfx, tmp;
InterpLibrary *ipFirstPtr, *ipPtr;
- int i, code, complain = 1, keepLibrary = 0;
+ size_t i;
+ int code, complain = 1, keepLibrary = 0;
const char *fullFileName = "";
const char *prefix;
static const char *const options[] = {
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 979426c..f2dfceb 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -91,28 +91,28 @@ static void FreeNsNameInternalRep(Tcl_Obj *objPtr);
static int GetNamespaceFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr);
static int InvokeImportedNRCmd(ClientData clientData,
- Tcl_Interp *interp,int objc,Tcl_Obj *const objv[]);
-static Tcl_ObjCmdProc NamespaceChildrenCmd;
-static Tcl_ObjCmdProc NamespaceCodeCmd;
-static Tcl_ObjCmdProc NamespaceCurrentCmd;
-static Tcl_ObjCmdProc NamespaceDeleteCmd;
-static Tcl_ObjCmdProc NamespaceEvalCmd;
-static Tcl_ObjCmdProc NRNamespaceEvalCmd;
-static Tcl_ObjCmdProc NamespaceExistsCmd;
-static Tcl_ObjCmdProc NamespaceExportCmd;
-static Tcl_ObjCmdProc NamespaceForgetCmd;
+ Tcl_Interp *interp,size_t objc,Tcl_Obj *const objv[]);
+static Tcl_ObjCmdProc2 NamespaceChildrenCmd;
+static Tcl_ObjCmdProc2 NamespaceCodeCmd;
+static Tcl_ObjCmdProc2 NamespaceCurrentCmd;
+static Tcl_ObjCmdProc2 NamespaceDeleteCmd;
+static Tcl_ObjCmdProc2 NamespaceEvalCmd;
+static Tcl_ObjCmdProc2 NRNamespaceEvalCmd;
+static Tcl_ObjCmdProc2 NamespaceExistsCmd;
+static Tcl_ObjCmdProc2 NamespaceExportCmd;
+static Tcl_ObjCmdProc2 NamespaceForgetCmd;
static void NamespaceFree(Namespace *nsPtr);
-static Tcl_ObjCmdProc NamespaceImportCmd;
-static Tcl_ObjCmdProc NamespaceInscopeCmd;
-static Tcl_ObjCmdProc NRNamespaceInscopeCmd;
-static Tcl_ObjCmdProc NamespaceOriginCmd;
-static Tcl_ObjCmdProc NamespaceParentCmd;
-static Tcl_ObjCmdProc NamespacePathCmd;
-static Tcl_ObjCmdProc NamespaceQualifiersCmd;
-static Tcl_ObjCmdProc NamespaceTailCmd;
-static Tcl_ObjCmdProc NamespaceUpvarCmd;
-static Tcl_ObjCmdProc NamespaceUnknownCmd;
-static Tcl_ObjCmdProc NamespaceWhichCmd;
+static Tcl_ObjCmdProc2 NamespaceImportCmd;
+static Tcl_ObjCmdProc2 NamespaceInscopeCmd;
+static Tcl_ObjCmdProc2 NRNamespaceInscopeCmd;
+static Tcl_ObjCmdProc2 NamespaceOriginCmd;
+static Tcl_ObjCmdProc2 NamespaceParentCmd;
+static Tcl_ObjCmdProc2 NamespacePathCmd;
+static Tcl_ObjCmdProc2 NamespaceQualifiersCmd;
+static Tcl_ObjCmdProc2 NamespaceTailCmd;
+static Tcl_ObjCmdProc2 NamespaceUpvarCmd;
+static Tcl_ObjCmdProc2 NamespaceUnknownCmd;
+static Tcl_ObjCmdProc2 NamespaceWhichCmd;
static int SetNsNameFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
static void UnlinkNsPath(Namespace *nsPtr);
@@ -947,7 +947,7 @@ Tcl_DeleteNamespace(
for (entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search);
entryPtr != NULL;) {
cmdPtr = (Command *)Tcl_GetHashValue(entryPtr);
- if (cmdPtr->nreProc == TclNRInterpCoroutine) {
+ if (cmdPtr->nreProc2 == TclNRInterpCoroutine) {
Tcl_DeleteCommandFromToken((Tcl_Interp *) iPtr,
(Tcl_Command) cmdPtr);
entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search);
@@ -1776,7 +1776,7 @@ DoImport(
Command *linkCmd = cmdPtr;
while (linkCmd->deleteProc == DeleteImportedCmd) {
- dataPtr = (ImportedCmdData *)linkCmd->objClientData;
+ dataPtr = (ImportedCmdData *)linkCmd->objClientData2;
linkCmd = dataPtr->realCmdPtr;
if (overwrite == linkCmd) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -1791,7 +1791,7 @@ DoImport(
}
dataPtr = (ImportedCmdData *)Tcl_Alloc(sizeof(ImportedCmdData));
- importedCmd = Tcl_NRCreateCommand(interp, Tcl_DStringValue(&ds),
+ importedCmd = Tcl_NRCreateCommand2(interp, Tcl_DStringValue(&ds),
TclInvokeImportedCmd, InvokeImportedNRCmd, dataPtr,
DeleteImportedCmd);
dataPtr->realCmdPtr = cmdPtr;
@@ -1814,7 +1814,7 @@ DoImport(
Command *overwrite = (Command *)Tcl_GetHashValue(found);
if (overwrite->deleteProc == DeleteImportedCmd) {
- ImportedCmdData *dataPtr = (ImportedCmdData *)overwrite->objClientData;
+ ImportedCmdData *dataPtr = (ImportedCmdData *)overwrite->objClientData2;
if (dataPtr->realCmdPtr == Tcl_GetHashValue(hPtr)) {
/*
@@ -1951,7 +1951,7 @@ Tcl_ForgetImport(
*/
Command *cmdPtr = (Command *) token;
- ImportedCmdData *dataPtr = (ImportedCmdData *)cmdPtr->objClientData;
+ ImportedCmdData *dataPtr = (ImportedCmdData *)cmdPtr->objClientData2;
Tcl_Command firstToken = (Tcl_Command) dataPtr->realCmdPtr;
if (firstToken == origin) {
@@ -2006,7 +2006,7 @@ TclGetOriginalCommand(
}
while (cmdPtr->deleteProc == DeleteImportedCmd) {
- dataPtr = (ImportedCmdData *)cmdPtr->objClientData;
+ dataPtr = (ImportedCmdData *)cmdPtr->objClientData2;
cmdPtr = dataPtr->realCmdPtr;
}
return (Tcl_Command) cmdPtr;
@@ -2036,7 +2036,7 @@ InvokeImportedNRCmd(
ClientData clientData, /* Points to the imported command's
* ImportedCmdData structure. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
ImportedCmdData *dataPtr = (ImportedCmdData *)clientData;
@@ -2051,10 +2051,10 @@ TclInvokeImportedCmd(
ClientData clientData, /* Points to the imported command's
* ImportedCmdData structure. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
- return Tcl_NRCallObjProc(interp, InvokeImportedNRCmd, clientData,
+ return Tcl_NRCallObjProc2(interp, InvokeImportedNRCmd, clientData,
objc, objv);
}
@@ -3007,7 +3007,7 @@ static int
NamespaceChildrenCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
@@ -3136,7 +3136,7 @@ static int
NamespaceCodeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Namespace *currNsPtr;
@@ -3217,7 +3217,7 @@ static int
NamespaceCurrentCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Namespace *currNsPtr;
@@ -3280,12 +3280,12 @@ static int
NamespaceDeleteCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
const char *name;
- int i;
+ size_t i;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?name name...?");
@@ -3357,10 +3357,10 @@ static int
NamespaceEvalCmd(
ClientData clientData, /* Arbitrary value passed to cmd. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, NRNamespaceEvalCmd, clientData, objc,
+ return Tcl_NRCallObjProc2(interp, NRNamespaceEvalCmd, clientData, objc,
objv);
}
@@ -3368,7 +3368,7 @@ static int
NRNamespaceEvalCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -3500,7 +3500,7 @@ static int
NamespaceExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
@@ -3555,10 +3555,10 @@ static int
NamespaceExportCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int firstArg, i;
+ size_t firstArg, i;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?-clear? ?pattern pattern...?");
@@ -3637,11 +3637,12 @@ static int
NamespaceForgetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *pattern;
- int i, result;
+ size_t i;
+ int result;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?pattern pattern...?");
@@ -3702,13 +3703,13 @@ static int
NamespaceImportCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int allowOverwrite = 0;
const char *string, *pattern;
- int i, result;
- int firstArg;
+ size_t i, firstArg;
+ int result;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?-force? ?pattern pattern...?");
@@ -3806,10 +3807,10 @@ static int
NamespaceInscopeCmd(
ClientData clientData, /* Arbitrary value passed to cmd. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, NRNamespaceInscopeCmd, clientData, objc,
+ return Tcl_NRCallObjProc2(interp, NRNamespaceInscopeCmd, clientData, objc,
objv);
}
@@ -3817,12 +3818,12 @@ static int
NRNamespaceInscopeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
CallFrame *framePtr, **framePtrPtr;
- int i;
+ size_t i;
Tcl_Obj *cmdObjPtr;
if (objc < 3) {
@@ -3914,7 +3915,7 @@ static int
NamespaceOriginCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Command cmd, origCmd;
@@ -3974,7 +3975,7 @@ static int
NamespaceParentCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *nsPtr;
@@ -4032,7 +4033,7 @@ static int
NamespacePathCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Namespace *nsPtr = (Namespace *) TclGetCurrentNamespace(interp);
@@ -4259,7 +4260,7 @@ static int
NamespaceQualifiersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name, *p;
@@ -4327,7 +4328,7 @@ static int
NamespaceUnknownCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *currNsPtr;
@@ -4514,7 +4515,7 @@ static int
NamespaceTailCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name, *p;
@@ -4572,7 +4573,7 @@ static int
NamespaceUpvarCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -4646,7 +4647,7 @@ static int
NamespaceWhichCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const opts[] = {
diff --git a/generic/tclOO.c b/generic/tclOO.c
index 0d9c7da..c7ee155 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -22,7 +22,7 @@
static const struct {
const char *name;
- Tcl_ObjCmdProc *objProc;
+ Tcl_ObjCmdProc2 *objProc;
int flag;
} defineCmds[] = {
{"constructor", TclOODefineConstructorObjCmd, 0},
@@ -86,13 +86,13 @@ static inline void RemoveObject(Object **list, int num, int idx);
static inline void SquelchCachedName(Object *oPtr);
static int PublicNRObjectCmd(ClientData clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, size_t objc,
Tcl_Obj *const *objv);
static int PrivateNRObjectCmd(ClientData clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, size_t objc,
Tcl_Obj *const *objv);
static int MyClassNRObjCmd(ClientData clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, size_t objc,
Tcl_Obj *const *objv);
static void MyClassDeleted(ClientData clientData);
@@ -106,7 +106,7 @@ static void MyClassDeleted(ClientData clientData);
#define DCM(name,visibility,proc) \
{name,visibility,\
- {TCL_OO_METHOD_VERSION_CURRENT,"core method: "#name,proc,NULL,NULL}}
+ {TCL_OO_METHOD_VERSION_2,"core method: "#name,proc,NULL,NULL}}
static const DeclaredClassMethod objMethods[] = {
DCM("destroy", 1, TclOO_Object_Destroy),
@@ -126,8 +126,8 @@ static const DeclaredClassMethod objMethods[] = {
* And for the oo::class constructor...
*/
-static const Tcl_MethodType classConstructor = {
- TCL_OO_METHOD_VERSION_CURRENT,
+static const Tcl_MethodType2 classConstructor = {
+ TCL_OO_METHOD_VERSION_2,
"oo::class constructor",
TclOO_Class_Constructor, NULL, NULL
};
@@ -339,7 +339,7 @@ InitFoundation(
Tcl_IncrRefCount(fPtr->destructorName);
Tcl_IncrRefCount(fPtr->clonedName);
Tcl_IncrRefCount(fPtr->defineName);
- Tcl_CreateObjCommand(interp, "::oo::UnknownDefinition",
+ Tcl_CreateObjCommand2(interp, "::oo::UnknownDefinition",
TclOOUnknownDefinition, NULL, NULL);
TclNewLiteralStringObj(namePtr, "::oo::UnknownDefinition");
Tcl_SetNamespaceUnknownHandler(interp, fPtr->defineNs, namePtr);
@@ -353,14 +353,14 @@ InitFoundation(
for (i = 0 ; defineCmds[i].name ; i++) {
TclDStringAppendLiteral(&buffer, "::oo::define::");
Tcl_DStringAppend(&buffer, defineCmds[i].name, -1);
- Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer),
+ Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&buffer),
defineCmds[i].objProc, INT2PTR(defineCmds[i].flag), NULL);
Tcl_DStringFree(&buffer);
}
for (i = 0 ; objdefCmds[i].name ; i++) {
TclDStringAppendLiteral(&buffer, "::oo::objdefine::");
Tcl_DStringAppend(&buffer, objdefCmds[i].name, -1);
- Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer),
+ Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&buffer),
objdefCmds[i].objProc, INT2PTR(objdefCmds[i].flag), NULL);
Tcl_DStringFree(&buffer);
}
@@ -401,20 +401,20 @@ InitFoundation(
* ensemble.
*/
- cmdPtr = (Command *) Tcl_NRCreateCommand(interp, "::oo::Helpers::next",
+ cmdPtr = (Command *) Tcl_NRCreateCommand2(interp, "::oo::Helpers::next",
NULL, TclOONextObjCmd, NULL, NULL);
cmdPtr->compileProc = TclCompileObjectNextCmd;
- cmdPtr = (Command *) Tcl_NRCreateCommand(interp, "::oo::Helpers::nextto",
+ cmdPtr = (Command *) Tcl_NRCreateCommand2(interp, "::oo::Helpers::nextto",
NULL, TclOONextToObjCmd, NULL, NULL);
cmdPtr->compileProc = TclCompileObjectNextToCmd;
- cmdPtr = (Command *) Tcl_CreateObjCommand(interp, "::oo::Helpers::self",
+ cmdPtr = (Command *) Tcl_CreateObjCommand2(interp, "::oo::Helpers::self",
TclOOSelfObjCmd, NULL, NULL);
cmdPtr->compileProc = TclCompileObjectSelfCmd;
- Tcl_CreateObjCommand(interp, "::oo::define", TclOODefineObjCmd, NULL,
+ Tcl_CreateObjCommand2(interp, "::oo::define", TclOODefineObjCmd, NULL,
NULL);
- Tcl_CreateObjCommand(interp, "::oo::objdefine", TclOOObjDefObjCmd, NULL,
+ Tcl_CreateObjCommand2(interp, "::oo::objdefine", TclOOObjDefObjCmd, NULL,
NULL);
- Tcl_CreateObjCommand(interp, "::oo::copy", TclOOCopyObjectCmd, NULL,NULL);
+ Tcl_CreateObjCommand2(interp, "::oo::copy", TclOOCopyObjectCmd, NULL,NULL);
TclOOInitInfo(interp);
/*
@@ -737,7 +737,7 @@ AllocObject(
*/
cmdPtr = (Command *) oPtr->command;
- cmdPtr->nreProc = PublicNRObjectCmd;
+ cmdPtr->nreProc2 = PublicNRObjectCmd;
cmdPtr->tracePtr = tracePtr = (CommandTrace *)Tcl_Alloc(sizeof(CommandTrace));
tracePtr->traceProc = ObjectRenamedTrace;
tracePtr->clientData = oPtr;
@@ -1167,7 +1167,7 @@ ObjectNamespaceDeleted(
contextPtr->callPtr->flags |= DESTRUCTOR;
contextPtr->skip = 0;
state = Tcl_SaveInterpState(interp, TCL_OK);
- result = Tcl_NRCallObjProc(interp, TclOOInvokeContext,
+ result = Tcl_NRCallObjProc2(interp, TclOOInvokeContext,
contextPtr, 0, NULL);
if (result != TCL_OK) {
Tcl_BackgroundException(interp, result);
@@ -1683,7 +1683,7 @@ Tcl_NewObjectInstance(
}
/*
- * Run constructors, except when objc < 0, which is a special flag case
+ * Run constructors, except when objc == TCL_INDEX_NONE, which is a special flag case
* used for object cloning only.
*/
@@ -1704,7 +1704,7 @@ Tcl_NewObjectInstance(
*/
isRoot = TclInitRewriteEnsemble(interp, skip, skip, objv);
- result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr,
+ result = Tcl_NRCallObjProc2(interp, TclOOInvokeContext, contextPtr,
objc, objv);
if (isRoot) {
@@ -2212,7 +2212,7 @@ Tcl_CopyObjectInstance(
Tcl_IncrRefCount(args[0]);
Tcl_IncrRefCount(args[1]);
Tcl_IncrRefCount(args[2]);
- result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, 3,
+ result = Tcl_NRCallObjProc2(interp, TclOOInvokeContext, contextPtr, 3,
args);
TclDecrRefCount(args[0]);
TclDecrRefCount(args[1]);
@@ -2506,17 +2506,17 @@ int
TclOOPublicObjectCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
- return Tcl_NRCallObjProc(interp, PublicNRObjectCmd, clientData,objc,objv);
+ return Tcl_NRCallObjProc2(interp, PublicNRObjectCmd, clientData,objc,objv);
}
static int
PublicNRObjectCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
return TclOOObjectCmdCore((Object *)clientData, interp, objc, objv, PUBLIC_METHOD,
@@ -2527,17 +2527,17 @@ int
TclOOPrivateObjectCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
- return Tcl_NRCallObjProc(interp, PrivateNRObjectCmd,clientData,objc,objv);
+ return Tcl_NRCallObjProc2(interp, PrivateNRObjectCmd,clientData,objc,objv);
}
static int
PrivateNRObjectCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
return TclOOObjectCmdCore((Object *)clientData, interp, objc, objv, 0, NULL);
@@ -2588,17 +2588,17 @@ int
TclOOMyClassObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
- return Tcl_NRCallObjProc(interp, MyClassNRObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, MyClassNRObjCmd, clientData, objc, objv);
}
static int
MyClassNRObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *)clientData;
@@ -2610,7 +2610,7 @@ MyClassNRObjCmd(
return TclOOObjectCmdCore(oPtr->selfCls->thisPtr, interp, objc, objv, 0,
NULL);
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -2853,7 +2853,7 @@ Tcl_ObjectContextInvokeNext(
* Invoke the (advanced) method call context in the caller context.
*/
- result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr, objc,
+ result = Tcl_NRCallObjProc2(interp, TclOOInvokeContext, contextPtr, objc,
objv);
/*
@@ -2968,13 +2968,13 @@ Tcl_GetObjectFromObj(
if (cmdPtr == NULL) {
goto notAnObject;
}
- if (cmdPtr->objProc != TclOOPublicObjectCmd) {
+ if (cmdPtr->objProc2 != TclOOPublicObjectCmd) {
cmdPtr = (Command *) TclGetOriginalCommand((Tcl_Command) cmdPtr);
- if (cmdPtr == NULL || cmdPtr->objProc != TclOOPublicObjectCmd) {
+ if (cmdPtr == NULL || cmdPtr->objProc2 != TclOOPublicObjectCmd) {
goto notAnObject;
}
}
- return (Tcl_Object)cmdPtr->objClientData;
+ return (Tcl_Object)cmdPtr->objClientData2;
notAnObject:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
diff --git a/generic/tclOO.decls b/generic/tclOO.decls
index 3783adf..e84dd08 100644
--- a/generic/tclOO.decls
+++ b/generic/tclOO.decls
@@ -164,13 +164,13 @@ declare 0 {
declare 1 {
Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp, Object *oPtr,
int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj,
- const Tcl_MethodType *typePtr, void *clientData,
+ const Tcl_MethodType2 *typePtr, void *clientData,
Proc **procPtrPtr)
}
declare 2 {
Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp, Class *clsPtr,
int flags, Tcl_Obj *nameObj, const char *namePtr,
- Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr,
+ Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType2 *typePtr,
void *clientData, Proc **procPtrPtr)
}
declare 3 {
diff --git a/generic/tclOO.h b/generic/tclOO.h
index 6f18491..d38b523 100644
--- a/generic/tclOO.h
+++ b/generic/tclOO.h
@@ -60,8 +60,10 @@ typedef struct Tcl_ObjectContext_ *Tcl_ObjectContext;
* and to allow the attachment of arbitrary data to objects and classes.
*/
+#ifndef TCL_NO_DEPRECATED
typedef int (Tcl_MethodCallProc)(void *clientData, Tcl_Interp *interp,
Tcl_ObjectContext objectContext, int objc, Tcl_Obj *const *objv);
+#endif /* TCL_NO_DEPRECATED */
typedef int (Tcl_MethodCallProc2)(void *clientData, Tcl_Interp *interp,
Tcl_ObjectContext objectContext, size_t objc, Tcl_Obj *const *objv);
typedef void (Tcl_MethodDeleteProc)(void *clientData);
@@ -77,6 +79,7 @@ typedef int (Tcl_ObjectMapMethodNameProc)(Tcl_Interp *interp,
* how to create a clone of it (when the object or class is copied).
*/
+#ifndef TCL_NO_DEPRECATED
typedef struct {
int version; /* Structure version field. Always to be equal
* to TCL_OO_METHOD_VERSION_(1|CURRENT) in
@@ -93,6 +96,7 @@ typedef struct {
* data, or NULL if the type-specific data can
* be copied directly. */
} Tcl_MethodType;
+#endif /* TCL_NO_DEPRECATED */
typedef struct {
int version; /* Structure version field. Always to be equal
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index 72dc041..05d3261 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -79,17 +79,17 @@ TclOO_Class_Constructor(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
Tcl_Obj **invoke, *nameObj;
- if (objc-1 > (int)Tcl_ObjectContextSkippedArgs(context)) {
+ if (objc-1 > Tcl_ObjectContextSkippedArgs(context)) {
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
"?definitionScript?");
return TCL_ERROR;
- } else if (objc == (int)Tcl_ObjectContextSkippedArgs(context)) {
+ } else if (objc == Tcl_ObjectContextSkippedArgs(context)) {
return TCL_OK;
}
@@ -178,7 +178,7 @@ TclOO_Class_Create(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
@@ -243,7 +243,7 @@ TclOO_Class_CreateNs(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
@@ -316,7 +316,7 @@ TclOO_Class_New(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
@@ -360,13 +360,13 @@ TclOO_Object_Destroy(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
CallContext *contextPtr;
- if (objc != (int)Tcl_ObjectContextSkippedArgs(context)) {
+ if (objc != Tcl_ObjectContextSkippedArgs(context)) {
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
NULL);
return TCL_ERROR;
@@ -421,17 +421,17 @@ TclOO_Object_Eval(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
CallContext *contextPtr = (CallContext *) context;
Tcl_Object object = Tcl_ObjectContextObject(context);
- const int skip = Tcl_ObjectContextSkippedArgs(context);
+ size_t skip = Tcl_ObjectContextSkippedArgs(context);
CallFrame *framePtr, **framePtrPtr = &framePtr;
Tcl_Obj *scriptPtr;
CmdFrame *invoker;
- if (objc-1 < skip) {
+ if (objc < skip+1) {
Tcl_WrongNumArgs(interp, skip, objv, "arg ?arg ...?");
return TCL_ERROR;
}
@@ -522,7 +522,7 @@ TclOO_Object_Unknown(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
CallContext *contextPtr = (CallContext *) context;
@@ -530,7 +530,8 @@ TclOO_Object_Unknown(
Class *callerCls = NULL;
Object *oPtr = contextPtr->oPtr;
const char **methodNames;
- int numMethodNames, i, skip = Tcl_ObjectContextSkippedArgs(context);
+ int numMethodNames, i;
+ size_t skip = Tcl_ObjectContextSkippedArgs(context);
CallFrame *framePtr = ((Interp *) interp)->varFramePtr;
Tcl_Obj *errorMsg;
@@ -628,13 +629,13 @@ TclOO_Object_LinkVar(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Interp *iPtr = (Interp *) interp;
Tcl_Object object = Tcl_ObjectContextObject(context);
Namespace *savedNsPtr;
- int i;
+ size_t i;
if ((size_t)objc < Tcl_ObjectContextSkippedArgs(context)) {
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
@@ -730,7 +731,7 @@ TclOO_Object_VarName(
Tcl_Interp *interp, /* Interpreter in which to create the object;
* also used for error reporting. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Var *varPtr, *aryVar;
@@ -738,7 +739,7 @@ TclOO_Object_VarName(
CallFrame *framePtr = ((Interp *) interp)->varFramePtr;
const char *arg;
- if ((int)Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
+ if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
"varName");
return TCL_ERROR;
@@ -866,7 +867,7 @@ int
TclOONextObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
@@ -902,7 +903,7 @@ int
TclOONextToObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
@@ -1035,7 +1036,7 @@ int
TclOOSelfObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
static const char *const subcmds[] = {
@@ -1271,7 +1272,7 @@ int
TclOOCopyObjectCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Object oPtr, o2Ptr;
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 912c368..8c44f6c 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -311,7 +311,7 @@ TclOOInvokeContext(
* other sorts of context handling (e.g.,
* commands, variables) depending on method
* implementation. */
- int objc, /* The number of arguments. */
+ size_t objc, /* The number of arguments. */
Tcl_Obj *const objv[]) /* The arguments as actually seen. */
{
CallContext *const contextPtr = (CallContext *)clientData;
@@ -369,11 +369,17 @@ TclOOInvokeContext(
* Run the method implementation.
*/
- if (mPtr->typePtr->version < TCL_OO_METHOD_VERSION_2) {
- return (mPtr->typePtr->callProc)(mPtr->clientData, interp,
+#ifndef TCL_NO_DEPRECATED
+ if (mPtr->typePtr->version == TCL_OO_METHOD_VERSION_1) {
+ if (objc > INT_MAX) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?args?");
+ return TCL_ERROR;
+ }
+ return ((Tcl_MethodCallProc *)(void *)mPtr->typePtr->callProc)(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, objc, objv);
}
- return ((Tcl_MethodCallProc2 *)(void *)(mPtr->typePtr->callProc))(mPtr->clientData, interp,
+#endif /* TCL_NO_DEPRECATED */
+ return mPtr->typePtr->callProc(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, objc, objv);
}
diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h
index 0c141fe..269988c 100644
--- a/generic/tclOODecls.h
+++ b/generic/tclOODecls.h
@@ -18,6 +18,10 @@
# define USE_TCLOO_STUBS
#endif
+#ifdef TCL_NO_DEPRECATED
+# define Tcl_MethodType void
+#endif
+
/* !BEGIN!: Do not edit below this line. */
#ifdef __cplusplus
@@ -270,4 +274,11 @@ extern const TclOOStubs *tclOOStubsPtr;
/* !END!: Do not edit above this line. */
+#ifdef TCL_NO_DEPRECATED
+# undef Tcl_MethodType
+# undef Tcl_MethodIsType
+# undef Tcl_NewInstanceMethod
+# undef Tcl_NewMethod
+#endif
+
#endif /* _TCLOODECLS */
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index 63aca58..c3e24b9 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -35,18 +35,18 @@
struct DeclaredSlot {
const char *name;
- const Tcl_MethodType getterType;
- const Tcl_MethodType setterType;
- const Tcl_MethodType resolverType;
+ const Tcl_MethodType2 getterType;
+ const Tcl_MethodType2 setterType;
+ const Tcl_MethodType2 resolverType;
};
#define SLOT(name,getter,setter,resolver) \
{"::oo::" name, \
- {TCL_OO_METHOD_VERSION_CURRENT, "core method: " name " Getter", \
+ {TCL_OO_METHOD_VERSION_2, "core method: " name " Getter", \
getter, NULL, NULL}, \
- {TCL_OO_METHOD_VERSION_CURRENT, "core method: " name " Setter", \
+ {TCL_OO_METHOD_VERSION_2, "core method: " name " Setter", \
setter, NULL, NULL}, \
- {TCL_OO_METHOD_VERSION_CURRENT, "core method: " name " Resolver", \
+ {TCL_OO_METHOD_VERSION_2, "core method: " name " Resolver", \
resolver, NULL, NULL}}
/*
@@ -66,63 +66,63 @@ static inline void GenerateErrorInfo(Tcl_Interp *interp, Object *oPtr,
Tcl_Obj *savedNameObj, const char *typeOfSubject);
static inline int MagicDefinitionInvoke(Tcl_Interp *interp,
Tcl_Namespace *nsPtr, int cmdIndex,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static inline Class * GetClassInOuterContext(Tcl_Interp *interp,
Tcl_Obj *className, const char *errMsg);
static inline Tcl_Namespace *GetNamespaceInOuterContext(Tcl_Interp *interp,
Tcl_Obj *namespaceName);
static inline int InitDefineContext(Tcl_Interp *interp,
Tcl_Namespace *namespacePtr, Object *oPtr,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static inline void RecomputeClassCacheFlag(Object *oPtr);
static int RenameDeleteMethod(Tcl_Interp *interp, Object *oPtr,
int useClass, Tcl_Obj *const fromPtr,
Tcl_Obj *const toPtr);
static int ClassFilterGet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ClassFilterSet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ClassMixinGet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ClassMixinSet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ClassSuperGet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ClassSuperSet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ClassVarsGet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ClassVarsSet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ObjFilterGet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ObjFilterSet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ObjMixinGet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ObjMixinSet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ObjVarsGet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ObjVarsSet(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static int ResolveClass(ClientData clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
/*
* Now define the slots used in declarations.
@@ -698,7 +698,7 @@ int
TclOOUnknownDefinition(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Namespace *nsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp);
@@ -839,7 +839,7 @@ InitDefineContext(
Tcl_Interp *interp,
Tcl_Namespace *namespacePtr,
Object *oPtr,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
CallFrame *framePtr, **framePtrPtr = &framePtr;
@@ -1028,7 +1028,7 @@ MagicDefinitionInvoke(
Tcl_Interp *interp,
Tcl_Namespace *nsPtr,
int cmdIndex,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *objPtr, *obj2Ptr, **objs;
@@ -1096,7 +1096,7 @@ int
TclOODefineObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Namespace *nsPtr;
@@ -1172,7 +1172,7 @@ int
TclOOObjDefObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Namespace *nsPtr;
@@ -1241,7 +1241,7 @@ int
TclOODefineSelfObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Namespace *nsPtr;
@@ -1312,7 +1312,7 @@ int
TclOODefineObjSelfObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr;
@@ -1346,7 +1346,7 @@ int
TclOODefinePrivateObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int isInstancePrivate = (clientData != NULL);
@@ -1419,7 +1419,7 @@ int
TclOODefineClassObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr;
@@ -1528,7 +1528,7 @@ int
TclOODefineConstructorObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr;
@@ -1597,7 +1597,7 @@ int
TclOODefineDefnNsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
static const char *kindList[] = {
@@ -1682,12 +1682,12 @@ int
TclOODefineDeleteMethodObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int isInstanceDeleteMethod = (clientData != NULL);
Object *oPtr;
- int i;
+ size_t i;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?");
@@ -1739,7 +1739,7 @@ int
TclOODefineDestructorObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr;
@@ -1804,7 +1804,7 @@ int
TclOODefineExportObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int isInstanceExport = (clientData != NULL);
@@ -1812,7 +1812,8 @@ TclOODefineExportObjCmd(
Method *mPtr;
Tcl_HashEntry *hPtr;
Class *clsPtr;
- int i, isNew, changed = 0;
+ size_t i;
+ int isNew, changed = 0;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?");
@@ -1900,7 +1901,7 @@ int
TclOODefineForwardObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int isInstanceForward = (clientData != NULL);
@@ -1964,7 +1965,7 @@ int
TclOODefineMethodObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
/*
@@ -2060,7 +2061,7 @@ int
TclOODefineRenameMethodObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int isInstanceRenameMethod = (clientData != NULL);
@@ -2117,7 +2118,7 @@ int
TclOODefineUnexportObjCmd(
ClientData clientData,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
int isInstanceUnexport = (clientData != NULL);
@@ -2125,7 +2126,8 @@ TclOODefineUnexportObjCmd(
Method *mPtr;
Tcl_HashEntry *hPtr;
Class *clsPtr;
- int i, isNew, changed = 0;
+ size_t i;
+ int isNew, changed = 0;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?");
@@ -2319,7 +2321,7 @@ ClassFilterGet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2353,7 +2355,7 @@ ClassFilterSet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2399,7 +2401,7 @@ ClassMixinGet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2436,7 +2438,7 @@ ClassMixinSet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2505,7 +2507,7 @@ ClassSuperGet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2541,7 +2543,7 @@ ClassSuperSet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2673,7 +2675,7 @@ ClassVarsGet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2717,7 +2719,7 @@ ClassVarsSet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2788,7 +2790,7 @@ ObjFilterGet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2816,7 +2818,7 @@ ObjFilterSet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2856,7 +2858,7 @@ ObjMixinGet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2888,7 +2890,7 @@ ObjMixinSet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2942,7 +2944,7 @@ ObjVarsGet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -2980,7 +2982,7 @@ ObjVarsSet(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
@@ -3045,10 +3047,10 @@ ResolveClass(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
- int idx = Tcl_ObjectContextSkippedArgs(context);
+ size_t idx = Tcl_ObjectContextSkippedArgs(context);
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Class *clsPtr;
diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c
index b4f9c56..9d34d00 100644
--- a/generic/tclOOInfo.c
+++ b/generic/tclOOInfo.c
@@ -17,33 +17,33 @@
#include "tclOOInt.h"
static inline Class * GetClassFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr);
-static Tcl_ObjCmdProc InfoObjectCallCmd;
-static Tcl_ObjCmdProc InfoObjectClassCmd;
-static Tcl_ObjCmdProc InfoObjectDefnCmd;
-static Tcl_ObjCmdProc InfoObjectFiltersCmd;
-static Tcl_ObjCmdProc InfoObjectForwardCmd;
-static Tcl_ObjCmdProc InfoObjectIdCmd;
-static Tcl_ObjCmdProc InfoObjectIsACmd;
-static Tcl_ObjCmdProc InfoObjectMethodsCmd;
-static Tcl_ObjCmdProc InfoObjectMethodTypeCmd;
-static Tcl_ObjCmdProc InfoObjectMixinsCmd;
-static Tcl_ObjCmdProc InfoObjectNsCmd;
-static Tcl_ObjCmdProc InfoObjectVarsCmd;
-static Tcl_ObjCmdProc InfoObjectVariablesCmd;
-static Tcl_ObjCmdProc InfoClassCallCmd;
-static Tcl_ObjCmdProc InfoClassConstrCmd;
-static Tcl_ObjCmdProc InfoClassDefnCmd;
-static Tcl_ObjCmdProc InfoClassDefnNsCmd;
-static Tcl_ObjCmdProc InfoClassDestrCmd;
-static Tcl_ObjCmdProc InfoClassFiltersCmd;
-static Tcl_ObjCmdProc InfoClassForwardCmd;
-static Tcl_ObjCmdProc InfoClassInstancesCmd;
-static Tcl_ObjCmdProc InfoClassMethodsCmd;
-static Tcl_ObjCmdProc InfoClassMethodTypeCmd;
-static Tcl_ObjCmdProc InfoClassMixinsCmd;
-static Tcl_ObjCmdProc InfoClassSubsCmd;
-static Tcl_ObjCmdProc InfoClassSupersCmd;
-static Tcl_ObjCmdProc InfoClassVariablesCmd;
+static Tcl_ObjCmdProc2 InfoObjectCallCmd;
+static Tcl_ObjCmdProc2 InfoObjectClassCmd;
+static Tcl_ObjCmdProc2 InfoObjectDefnCmd;
+static Tcl_ObjCmdProc2 InfoObjectFiltersCmd;
+static Tcl_ObjCmdProc2 InfoObjectForwardCmd;
+static Tcl_ObjCmdProc2 InfoObjectIdCmd;
+static Tcl_ObjCmdProc2 InfoObjectIsACmd;
+static Tcl_ObjCmdProc2 InfoObjectMethodsCmd;
+static Tcl_ObjCmdProc2 InfoObjectMethodTypeCmd;
+static Tcl_ObjCmdProc2 InfoObjectMixinsCmd;
+static Tcl_ObjCmdProc2 InfoObjectNsCmd;
+static Tcl_ObjCmdProc2 InfoObjectVarsCmd;
+static Tcl_ObjCmdProc2 InfoObjectVariablesCmd;
+static Tcl_ObjCmdProc2 InfoClassCallCmd;
+static Tcl_ObjCmdProc2 InfoClassConstrCmd;
+static Tcl_ObjCmdProc2 InfoClassDefnCmd;
+static Tcl_ObjCmdProc2 InfoClassDefnNsCmd;
+static Tcl_ObjCmdProc2 InfoClassDestrCmd;
+static Tcl_ObjCmdProc2 InfoClassFiltersCmd;
+static Tcl_ObjCmdProc2 InfoClassForwardCmd;
+static Tcl_ObjCmdProc2 InfoClassInstancesCmd;
+static Tcl_ObjCmdProc2 InfoClassMethodsCmd;
+static Tcl_ObjCmdProc2 InfoClassMethodTypeCmd;
+static Tcl_ObjCmdProc2 InfoClassMixinsCmd;
+static Tcl_ObjCmdProc2 InfoClassSubsCmd;
+static Tcl_ObjCmdProc2 InfoClassSupersCmd;
+static Tcl_ObjCmdProc2 InfoClassVariablesCmd;
/*
* List of commands that are used to implement the [info object] subcommands.
@@ -173,7 +173,7 @@ static int
InfoObjectClassCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -230,7 +230,7 @@ static int
InfoObjectDefnCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -304,7 +304,7 @@ static int
InfoObjectFiltersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
size_t i;
@@ -343,7 +343,7 @@ static int
InfoObjectForwardCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -400,7 +400,7 @@ static int
InfoObjectIsACmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
static const char *const categories[] = {
@@ -520,7 +520,7 @@ static int
InfoObjectMethodsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -551,7 +551,7 @@ InfoObjectMethodsCmd(
return TCL_ERROR;
}
if (objc != 2) {
- int i;
+ size_t i;
for (i=2 ; i<objc ; i++) {
if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0,
@@ -640,7 +640,7 @@ static int
InfoObjectMethodTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -697,7 +697,7 @@ static int
InfoObjectMixinsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Class *mixinPtr;
@@ -740,7 +740,7 @@ static int
InfoObjectIdCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -772,7 +772,7 @@ static int
InfoObjectNsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -805,7 +805,7 @@ static int
InfoObjectVariablesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -860,7 +860,7 @@ static int
InfoObjectVarsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -921,7 +921,7 @@ static int
InfoClassConstrCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Proc *procPtr;
@@ -982,7 +982,7 @@ static int
InfoClassDefnCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_HashEntry *hPtr;
@@ -1050,7 +1050,7 @@ static int
InfoClassDefnNsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
static const char *kindList[] = {
@@ -1100,7 +1100,7 @@ static int
InfoClassDestrCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Proc *procPtr;
@@ -1144,7 +1144,7 @@ static int
InfoClassFiltersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
size_t i;
@@ -1182,7 +1182,7 @@ static int
InfoClassForwardCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_HashEntry *hPtr;
@@ -1233,7 +1233,7 @@ static int
InfoClassInstancesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -1281,7 +1281,7 @@ static int
InfoClassMethodsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
int flag = PUBLIC_METHOD, recurse = 0, scope = -1;
@@ -1310,7 +1310,7 @@ InfoClassMethodsCmd(
return TCL_ERROR;
}
if (objc != 2) {
- int i;
+ size_t i;
for (i=2 ; i<objc ; i++) {
if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0,
@@ -1397,7 +1397,7 @@ static int
InfoClassMethodTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_HashEntry *hPtr;
@@ -1449,7 +1449,7 @@ static int
InfoClassMixinsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Class *clsPtr, *mixinPtr;
@@ -1491,7 +1491,7 @@ static int
InfoClassSubsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Class *clsPtr, *subclassPtr;
@@ -1546,7 +1546,7 @@ static int
InfoClassSupersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Class *clsPtr, *superPtr;
@@ -1585,7 +1585,7 @@ static int
InfoClassVariablesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Class *clsPtr;
@@ -1640,7 +1640,7 @@ static int
InfoObjectCallCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
@@ -1686,7 +1686,7 @@ static int
InfoClassCallCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Class *clsPtr;
diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h
index b7fb34d..59f0626 100644
--- a/generic/tclOOInt.h
+++ b/generic/tclOOInt.h
@@ -42,7 +42,7 @@ struct Object;
*/
typedef struct Method {
- const Tcl_MethodType *typePtr;
+ const Tcl_MethodType2 *typePtr;
/* The type of method. If NULL, this is a
* special flag record which is just used for
* the setting of the flags field. */
@@ -437,7 +437,7 @@ typedef struct CallContext {
typedef struct {
const char *name; /* Name of the method in question. */
int isPublic; /* Whether the method is public by default. */
- Tcl_MethodType definition; /* How to call the method. */
+ Tcl_MethodType2 definition; /* How to call the method. */
} DeclaredClassMethod;
/*
@@ -447,40 +447,40 @@ typedef struct {
*/
MODULE_SCOPE int TclOOInit(Tcl_Interp *interp);
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOObjDefObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineConstructorObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineDefnNsObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineDeleteMethodObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineDestructorObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineExportObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineForwardObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineMethodObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineRenameMethodObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineUnexportObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineClassObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineSelfObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefineObjSelfObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOODefinePrivateObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOUnknownDefinition;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOCopyObjectCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOONextObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOONextToObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOSelfObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOObjDefObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineConstructorObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineDefnNsObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineDeleteMethodObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineDestructorObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineExportObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineForwardObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineMethodObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineRenameMethodObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineUnexportObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineClassObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineSelfObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefineObjSelfObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOODefinePrivateObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOUnknownDefinition;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOCopyObjectCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOONextObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOONextToObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOSelfObjCmd;
/*
* Method implementations (in tclOOBasic.c).
*/
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Class_Constructor;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Class_Create;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Class_CreateNs;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Class_New;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Object_Destroy;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Object_Eval;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Object_LinkVar;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Object_Unknown;
-MODULE_SCOPE Tcl_MethodCallProc TclOO_Object_VarName;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Class_Constructor;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Class_Create;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Class_CreateNs;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Class_New;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Object_Destroy;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Object_Eval;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Object_LinkVar;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Object_Unknown;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Object_VarName;
/*
* Private definitions, some of which perhaps ought to be exposed properly or
@@ -492,16 +492,13 @@ MODULE_SCOPE void TclOOAddToMixinSubs(Class *subPtr, Class *mixinPtr);
MODULE_SCOPE void TclOOAddToSubclasses(Class *subPtr, Class *superPtr);
MODULE_SCOPE Class * TclOOAllocClass(Tcl_Interp *interp,
Object *useThisObj);
-MODULE_SCOPE int TclMethodIsType(Tcl_Method method,
- const Tcl_MethodType *typePtr,
- void **clientDataPtr);
MODULE_SCOPE Tcl_Method TclNewInstanceMethod(Tcl_Interp *interp,
Tcl_Object object, Tcl_Obj *nameObj,
- int flags, const Tcl_MethodType *typePtr,
+ int flags, const Tcl_MethodType2 *typePtr,
void *clientData);
MODULE_SCOPE Tcl_Method TclNewMethod(Tcl_Interp *interp, Tcl_Class cls,
Tcl_Obj *nameObj, int flags,
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
void *clientData);
MODULE_SCOPE int TclNRNewObjectInstance(Tcl_Interp *interp,
Tcl_Class cls, const char *nameStr,
@@ -541,7 +538,7 @@ MODULE_SCOPE int TclOOGetSortedMethodList(Object *oPtr,
MODULE_SCOPE int TclOOInit(Tcl_Interp *interp);
MODULE_SCOPE void TclOOInitInfo(Tcl_Interp *interp);
MODULE_SCOPE int TclOOInvokeContext(void *clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, size_t objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE int TclNRObjectContextInvokeNext(Tcl_Interp *interp,
Tcl_ObjectContext context, size_t objc,
diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h
index 53c2a6f..5d9ad45 100644
--- a/generic/tclOOIntDecls.h
+++ b/generic/tclOOIntDecls.h
@@ -21,14 +21,14 @@ TCLAPI Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp);
TCLAPI Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp,
Object *oPtr, int flags, Tcl_Obj *nameObj,
Tcl_Obj *argsObj, Tcl_Obj *bodyObj,
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
void *clientData, Proc **procPtrPtr);
/* 2 */
TCLAPI Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp,
Class *clsPtr, int flags, Tcl_Obj *nameObj,
const char *namePtr, Tcl_Obj *argsObj,
Tcl_Obj *bodyObj,
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
void *clientData, Proc **procPtrPtr);
/* 3 */
TCLAPI Method * TclOONewProcInstanceMethod(Tcl_Interp *interp,
@@ -97,8 +97,8 @@ typedef struct TclOOIntStubs {
void *hooks;
Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp *interp); /* 0 */
- Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, void *clientData, Proc **procPtrPtr); /* 1 */
- Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, const char *namePtr, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, void *clientData, Proc **procPtrPtr); /* 2 */
+ Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType2 *typePtr, void *clientData, Proc **procPtrPtr); /* 1 */
+ Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, const char *namePtr, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType2 *typePtr, void *clientData, Proc **procPtrPtr); /* 2 */
Method * (*tclOONewProcInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr); /* 3 */
Method * (*tclOONewProcMethod) (Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr); /* 4 */
int (*tclOOObjectCmdCore) (Object *oPtr, Tcl_Interp *interp, size_t objc, Tcl_Obj *const *objv, int publicOnly, Class *startCls); /* 5 */
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 70f9503..62a2f01 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -63,18 +63,18 @@ typedef struct {
* Function declarations for things defined in this file.
*/
-static Tcl_Obj ** InitEnsembleRewrite(Tcl_Interp *interp, int objc,
+static Tcl_Obj ** InitEnsembleRewrite(Tcl_Interp *interp, size_t objc,
Tcl_Obj *const *objv, int toRewrite,
int rewriteLength, Tcl_Obj *const *rewriteObjs,
int *lengthPtr);
static int InvokeProcedureMethod(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static Tcl_NRPostProc FinalizeForwardCall;
static Tcl_NRPostProc FinalizePMCall;
static int PushMethodCallFrame(Tcl_Interp *interp,
CallContext *contextPtr, ProcedureMethod *pmPtr,
- int objc, Tcl_Obj *const *objv,
+ size_t objc, Tcl_Obj *const *objv,
PMFrameData *fdPtr);
static void DeleteProcedureMethodRecord(ProcedureMethod *pmPtr);
static void DeleteProcedureMethod(void *clientData);
@@ -86,7 +86,7 @@ static ProcErrorProc DestructorErrorHandler;
static Tcl_Obj * RenderDeclarerName(void *clientData);
static int InvokeForwardMethod(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ size_t objc, Tcl_Obj *const *objv);
static void DeleteForwardMethod(void *clientData);
static int CloneForwardMethod(Tcl_Interp *interp,
void *clientData, void **newClientData);
@@ -97,12 +97,12 @@ static Tcl_ResolveCompiledVarProc ProcedureMethodCompiledVarResolver;
* The types of methods defined by the core OO system.
*/
-static const Tcl_MethodType procMethodType = {
- TCL_OO_METHOD_VERSION_CURRENT, "method",
+static const Tcl_MethodType2 procMethodType = {
+ TCL_OO_METHOD_VERSION_2, "method",
InvokeProcedureMethod, DeleteProcedureMethod, CloneProcedureMethod
};
-static const Tcl_MethodType fwdMethodType = {
- TCL_OO_METHOD_VERSION_CURRENT, "forward",
+static const Tcl_MethodType2 fwdMethodType = {
+ TCL_OO_METHOD_VERSION_2, "forward",
InvokeForwardMethod, DeleteForwardMethod, CloneForwardMethod
};
@@ -134,7 +134,7 @@ TclNewInstanceMethod(
* up to caller to manage storage (e.g., when
* it is a constructor or destructor). */
int flags, /* Whether this is a public method. */
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
/* The type of method this is, which defines
* how to invoke, delete and clone the
* method. */
@@ -187,6 +187,8 @@ TclNewInstanceMethod(
oPtr->epoch++;
return (Tcl_Method) mPtr;
}
+
+#ifndef TCL_NO_DEPRECATED
Tcl_Method
Tcl_NewInstanceMethod(
TCL_UNUSED(Tcl_Interp *),
@@ -203,12 +205,14 @@ Tcl_NewInstanceMethod(
void *clientData) /* Some data associated with the particular
* method to be created. */
{
- if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
+ if (typePtr->version != TCL_OO_METHOD_VERSION_1) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_1", "Tcl_NewInstanceMethod");
}
return TclNewInstanceMethod(NULL, object, nameObj, flags,
- (const Tcl_MethodType *)typePtr, clientData);
+ (const Tcl_MethodType2 *)typePtr, clientData);
}
+#endif /* TCL_NO_DEPRECATED */
+
Tcl_Method
Tcl_NewInstanceMethod2(
TCL_UNUSED(Tcl_Interp *),
@@ -229,7 +233,7 @@ Tcl_NewInstanceMethod2(
Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_2", "Tcl_NewInstanceMethod2");
}
return TclNewInstanceMethod(NULL, object, nameObj, flags,
- (const Tcl_MethodType *)typePtr, clientData);
+ typePtr, clientData);
}
/*
@@ -250,7 +254,7 @@ TclNewMethod(
* for constructors or destructors); if so, up
* to caller to manage storage. */
int flags, /* Whether this is a public method. */
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
/* The type of method this is, which defines
* how to invoke, delete and clone the
* method. */
@@ -300,6 +304,7 @@ TclNewMethod(
return (Tcl_Method) mPtr;
}
+#ifndef TCL_NO_DEPRECATED
Tcl_Method
Tcl_NewMethod(
TCL_UNUSED(Tcl_Interp *),
@@ -315,11 +320,12 @@ Tcl_NewMethod(
void *clientData) /* Some data associated with the particular
* method to be created. */
{
- if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
+ if (typePtr->version != TCL_OO_METHOD_VERSION_1) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_1", "Tcl_NewMethod");
}
- return TclNewMethod(NULL, cls, nameObj, flags, typePtr, clientData);
+ return TclNewMethod(NULL, cls, nameObj, flags, (const Tcl_MethodType2 *)typePtr, clientData);
}
+#endif /* TCL_NO_DEPRECATED */
Tcl_Method
Tcl_NewMethod2(
@@ -339,7 +345,7 @@ Tcl_NewMethod2(
if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_2", "Tcl_NewMethod2");
}
- return TclNewMethod(NULL, cls, nameObj, flags, (const Tcl_MethodType *)typePtr, clientData);
+ return TclNewMethod(NULL, cls, nameObj, flags, typePtr, clientData);
}
/*
@@ -534,7 +540,7 @@ TclOOMakeProcInstanceMethod(
* which _must not_ be NULL. */
Tcl_Obj *bodyObj, /* The body of the method, which _must not_ be
* NULL. */
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
/* The type of the method to create. */
void *clientData, /* The per-method type-specific data. */
Proc **procPtrPtr) /* A pointer to the variable in which to write
@@ -647,7 +653,7 @@ TclOOMakeProcMethod(
* which _must not_ be NULL. */
Tcl_Obj *bodyObj, /* The body of the method, which _must not_ be
* NULL. */
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
/* The type of the method to create. */
void *clientData, /* The per-method type-specific data. */
Proc **procPtrPtr) /* A pointer to the variable in which to write
@@ -747,7 +753,7 @@ InvokeProcedureMethod(
void *clientData, /* Pointer to some per-method context. */
Tcl_Interp *interp,
Tcl_ObjectContext context, /* The method calling context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments as actually seen. */
{
ProcedureMethod *pmPtr = (ProcedureMethod *)clientData;
@@ -870,7 +876,7 @@ PushMethodCallFrame(
CallContext *contextPtr, /* Current method call context. */
ProcedureMethod *pmPtr, /* Information about this procedure-like
* method. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv, /* Array of arguments. */
PMFrameData *fdPtr) /* Place to store information about the call
* frame. */
@@ -1548,7 +1554,7 @@ InvokeForwardMethod(
void *clientData, /* Pointer to some per-method context. */
Tcl_Interp *interp,
Tcl_ObjectContext context, /* The method calling context. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments as actually seen. */
{
CallContext *contextPtr = (CallContext *) context;
@@ -1699,7 +1705,7 @@ TclOOGetFwdFromMethod(
static Tcl_Obj **
InitEnsembleRewrite(
Tcl_Interp *interp, /* Place to log the rewrite info. */
- int objc, /* Number of real arguments. */
+ size_t objc, /* Number of real arguments. */
Tcl_Obj *const *objv, /* The real arguments. */
int toRewrite, /* Number of real arguments to replace. */
int rewriteLength, /* Number of arguments to insert instead. */
@@ -1759,23 +1765,7 @@ Tcl_MethodName(
return ((Method *) method)->namePtr;
}
-int
-TclMethodIsType(
- Tcl_Method method,
- const Tcl_MethodType *typePtr,
- void **clientDataPtr)
-{
- Method *mPtr = (Method *) method;
-
- if (mPtr->typePtr == typePtr) {
- if (clientDataPtr != NULL) {
- *clientDataPtr = mPtr->clientData;
- }
- return 1;
- }
- return 0;
-}
-
+#ifndef TCL_NO_DEPRECATED
int
Tcl_MethodIsType(
Tcl_Method method,
@@ -1784,10 +1774,10 @@ Tcl_MethodIsType(
{
Method *mPtr = (Method *) method;
- if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
+ if (typePtr->version != TCL_OO_METHOD_VERSION_1) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_1", "Tcl_MethodIsType");
}
- if (mPtr->typePtr == typePtr) {
+ if (mPtr->typePtr == (const Tcl_MethodType2 *)typePtr) {
if (clientDataPtr != NULL) {
*clientDataPtr = mPtr->clientData;
}
@@ -1795,6 +1785,7 @@ Tcl_MethodIsType(
}
return 0;
}
+#endif /* TCL_NO_DEPRECATED */
int
Tcl_MethodIsType2(
@@ -1807,7 +1798,7 @@ Tcl_MethodIsType2(
if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_2", "Tcl_MethodIsType2");
}
- if (mPtr->typePtr == (const Tcl_MethodType *)typePtr) {
+ if (mPtr->typePtr == typePtr) {
if (clientDataPtr != NULL) {
*clientDataPtr = mPtr->clientData;
}
diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c
index 7b653cb..0ba5ce6 100644
--- a/generic/tclOOStubInit.c
+++ b/generic/tclOOStubInit.c
@@ -14,6 +14,12 @@ MODULE_SCOPE const TclOOStubs tclOOStubs;
#pragma GCC dependency "tclOO.decls"
#endif
+#ifdef TCL_NO_DEPRECATED
+# define Tcl_MethodIsType 0
+# define Tcl_NewInstanceMethod 0
+# define Tcl_NewMethod 0
+#endif
+
/* !BEGIN!: Do not edit below this line. */
static const TclOOIntStubs tclOOIntStubs = {
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d385ed0..da74915 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -4409,7 +4409,7 @@ int
Tcl_RepresentationCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *descObj;
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 4cbc52b..b02e10e 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -101,7 +101,7 @@ static int PkgRequireCoreFinal(ClientData data[], Tcl_Interp *interp, int resul
static int PkgRequireCoreCleanup(ClientData data[], Tcl_Interp *interp, int result);
static int PkgRequireCoreStep1(ClientData data[], Tcl_Interp *interp, int result);
static int PkgRequireCoreStep2(ClientData data[], Tcl_Interp *interp, int result);
-static int TclNRPkgRequireProc(ClientData clientData, Tcl_Interp *interp, int reqc, Tcl_Obj *const reqv[]);
+static int TclNRPkgRequireProc(ClientData clientData, Tcl_Interp *interp, size_t reqc, Tcl_Obj *const reqv[]);
static int SelectPackage(ClientData data[], Tcl_Interp *interp, int result);
static int SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result);
static int TclNRPackageObjCmdCleanup(ClientData data[], Tcl_Interp *interp, int result);
@@ -436,7 +436,7 @@ Tcl_PkgRequireProc(
args.name = name;
args.clientDataPtr = clientDataPtr;
- return Tcl_NRCallObjProc(interp,
+ return Tcl_NRCallObjProc2(interp,
TclNRPkgRequireProc, (void *) &args, reqc, reqv);
}
@@ -444,7 +444,7 @@ static int
TclNRPkgRequireProc(
ClientData clientData,
Tcl_Interp *interp,
- int reqc,
+ size_t reqc,
Tcl_Obj *const reqv[])
{
RequireProcArgs *args = (RequireProcArgs *)clientData;
@@ -1055,17 +1055,17 @@ int
Tcl_PackageObjCmd(
ClientData clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRPackageObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRPackageObjCmd, clientData, objc, objv);
}
int
TclNRPackageObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const pkgOptions[] = {
diff --git a/generic/tclProc.c b/generic/tclProc.c
index e51b80d..c398ba5 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -34,19 +34,21 @@ typedef struct {
static void DupLambdaInternalRep(Tcl_Obj *objPtr,
Tcl_Obj *copyPtr);
static void FreeLambdaInternalRep(Tcl_Obj *objPtr);
-static int InitArgsAndLocals(Tcl_Interp *interp, int skip);
+static int InitArgsAndLocals(Tcl_Interp *interp, size_t skip);
static void InitResolvedLocals(Tcl_Interp *interp,
ByteCode *codePtr, Var *defPtr,
Namespace *nsPtr);
static void InitLocalCache(Proc *procPtr);
static void ProcBodyDup(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr);
static void ProcBodyFree(Tcl_Obj *objPtr);
-static int ProcWrongNumArgs(Tcl_Interp *interp, int skip);
+static int ProcWrongNumArgs(Tcl_Interp *interp, size_t skip);
static void MakeProcError(Tcl_Interp *interp,
Tcl_Obj *procNameObj);
static void MakeLambdaError(Tcl_Interp *interp,
Tcl_Obj *procNameObj);
static int SetLambdaFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
+static Tcl_ObjCmdProc2 NRInterpProc2;
+
static Tcl_NRPostProc ApplyNR2;
static Tcl_NRPostProc InterpProcNR2;
@@ -148,7 +150,7 @@ static const Tcl_ObjType lambdaType = {
*----------------------------------------------------------------------
*/
-#undef TclObjInterpProc
+#undef TclObjInterpProc2
int
Tcl_ProcObjCmd(
TCL_UNUSED(void *),
@@ -206,7 +208,7 @@ Tcl_ProcObjCmd(
}
cmd = TclNRCreateCommandInNs(interp, simpleName, (Tcl_Namespace *) nsPtr,
- TclObjInterpProc, TclNRInterpProc, procPtr, TclProcDeleteProc);
+ TclObjInterpProc2, NRInterpProc2, procPtr, TclProcDeleteProc);
/*
* Now initialize the new procedure's cmdPtr field. This will be used
@@ -888,17 +890,17 @@ int
Tcl_UplevelObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRUplevelObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRUplevelObjCmd, clientData, objc, objv);
}
int
TclNRUplevelObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
@@ -1053,7 +1055,7 @@ TclIsProc(
cmdPtr = (Command *) origCmd;
}
if (cmdPtr->deleteProc == TclProcDeleteProc) {
- return (Proc *)cmdPtr->objClientData;
+ return (Proc *)cmdPtr->objClientData2;
}
return NULL;
}
@@ -1061,7 +1063,7 @@ TclIsProc(
static int
ProcWrongNumArgs(
Tcl_Interp *interp,
- int skip)
+ size_t skip)
{
CallFrame *framePtr = ((Interp *)interp)->varFramePtr;
Proc *procPtr = framePtr->procPtr;
@@ -1339,7 +1341,7 @@ static int
InitArgsAndLocals(
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
- int 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". */
{
CallFrame *framePtr = ((Interp *)interp)->varFramePtr;
@@ -1348,6 +1350,7 @@ InitArgsAndLocals(
Var *varPtr, *defPtr;
int localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax;
Tcl_Obj *const *argObjs;
+ int skip = skip1;
ByteCodeGetInternalRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
@@ -1580,7 +1583,7 @@ TclPushProcCallFrame(
/*
*----------------------------------------------------------------------
*
- * TclObjInterpProc --
+ * TclObjInterpProc2/NRInterpProc2 --
*
* When a Tcl procedure gets invoked during bytecode evaluation, this
* object-based routine gets invoked to interpret the procedure.
@@ -1595,12 +1598,12 @@ TclPushProcCallFrame(
*/
int
-TclObjInterpProc(
+TclObjInterpProc2(
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
- int objc, /* Count of number of arguments to this
+ size_t objc, /* Count of number of arguments to this
* procedure. */
Tcl_Obj *const objv[]) /* Argument value objects. */
{
@@ -1608,16 +1611,16 @@ TclObjInterpProc(
* Not used much in the core; external interface for iTcl
*/
- return Tcl_NRCallObjProc(interp, TclNRInterpProc, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, NRInterpProc2, clientData, objc, objv);
}
int
-TclNRInterpProc(
+NRInterpProc2(
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
- int objc, /* Count of number of arguments to this
+ size_t objc, /* Count of number of arguments to this
* procedure. */
Tcl_Obj *const objv[]) /* Argument value objects. */
{
@@ -1629,14 +1632,15 @@ TclNRInterpProc(
}
return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError);
}
-
+
+#ifndef TCL_NO_DEPRECATED
static int
-NRInterpProc2(
+NRInterpProc(
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
- size_t objc, /* Count of number of arguments to this
+ int objc, /* Count of number of arguments to this
* procedure. */
Tcl_Obj *const objv[]) /* Argument value objects. */
{
@@ -1649,13 +1653,14 @@ NRInterpProc2(
return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError);
}
-static int
-ObjInterpProc2(
+#undef TclObjInterpProc
+int
+TclObjInterpProc(
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
- size_t objc, /* Count of number of arguments to this
+ int objc, /* Count of number of arguments to this
* procedure. */
Tcl_Obj *const objv[]) /* Argument value objects. */
{
@@ -1663,10 +1668,11 @@ ObjInterpProc2(
* Not used much in the core; external interface for iTcl
*/
- return Tcl_NRCallObjProc2(interp, NRInterpProc2, clientData, objc, objv);
+ return Tcl_NRCallObjProc(interp, NRInterpProc, clientData, objc, objv);
}
+#endif /* TCL_NO_DEPRECATED */
+
-
/*
*----------------------------------------------------------------------
*
@@ -2056,7 +2062,7 @@ TclProcCompileProc(
*
* MakeProcError --
*
- * Function called by TclObjInterpProc to create the stack information
+ * Function called by TclObjInterpProc2 to create the stack information
* upon an error from a procedure.
*
* Results:
@@ -2258,16 +2264,15 @@ TclUpdateReturnInfo(
/*
*----------------------------------------------------------------------
*
- * TclGetObjInterpProc/TclGetObjInterpProc2 --
+ * TclGetObjInterpProc2 --
*
- * Returns a pointer to the TclObjInterpProc/ObjInterpProc2 functions;
- * this is different from the value obtained from the TclObjInterpProc
- * reference on systems like Windows where import and export versions
- * of a function exported by a DLL exist.
+ * Returns a pointer to the TclObjInterpProc2 function; this is different
+ * from the value obtained from the TclObjInterpProc2 reference on systems
+ * like Windows where import and export versions of a function exported
+ * by a DLL exist.
*
* Results:
- * Returns the internal address of the TclObjInterpProc/ObjInterpProc2
- * functions.
+ * Returns the internal address of the TclObjInterpProc2 function.
*
* Side effects:
* None.
@@ -2275,18 +2280,20 @@ TclUpdateReturnInfo(
*----------------------------------------------------------------------
*/
+Tcl_ObjCmdProc2 *
+TclGetObjInterpProc2(void)
+{
+ return TclObjInterpProc2;
+}
+
+#ifndef TCL_NO_DEPRECATED
Tcl_ObjCmdProc *
TclGetObjInterpProc(void)
{
return TclObjInterpProc;
}
+#endif /* TCL_NO_DEPRECATED */
-Tcl_ObjCmdProc2 *
-TclGetObjInterpProc2(void)
-{
- return ObjInterpProc2;
-}
-
/*
*----------------------------------------------------------------------
*
@@ -2650,17 +2657,17 @@ int
Tcl_ApplyObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, TclNRApplyObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRApplyObjCmd, clientData, objc, objv);
}
int
TclNRApplyObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Proc *procPtr = NULL;
@@ -2688,7 +2695,7 @@ TclNRApplyObjCmd(
/*
* Push a call frame for the lambda namespace.
- * Note that TclObjInterpProc() will pop it.
+ * Note that TclObjInterpProc2() will pop it.
*/
result = TclGetNamespaceFromObj(interp, nsObjPtr, &nsPtr);
@@ -2742,7 +2749,7 @@ ApplyNR2(
*
* MakeLambdaError --
*
- * Function called by TclObjInterpProc to create the stack information
+ * Function called by TclObjInterpProc2 to create the stack information
* upon an error from a lambda term.
*
* Results:
diff --git a/generic/tclProcess.c b/generic/tclProcess.c
index 075877e..821d58f 100644
--- a/generic/tclProcess.c
+++ b/generic/tclProcess.c
@@ -51,10 +51,10 @@ static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, size_t resolvedPid,
int options, int *codePtr, Tcl_Obj **msgPtr,
Tcl_Obj **errorObjPtr);
static Tcl_Obj * BuildProcessStatusObj(ProcessInfo *info);
-static Tcl_ObjCmdProc ProcessListObjCmd;
-static Tcl_ObjCmdProc ProcessStatusObjCmd;
-static Tcl_ObjCmdProc ProcessPurgeObjCmd;
-static Tcl_ObjCmdProc ProcessAutopurgeObjCmd;
+static Tcl_ObjCmdProc2 ProcessListObjCmd;
+static Tcl_ObjCmdProc2 ProcessStatusObjCmd;
+static Tcl_ObjCmdProc2 ProcessPurgeObjCmd;
+static Tcl_ObjCmdProc2 ProcessAutopurgeObjCmd;
/*
*----------------------------------------------------------------------
@@ -396,7 +396,7 @@ static int
ProcessListObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *list;
@@ -447,7 +447,7 @@ static int
ProcessStatusObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *dict;
@@ -594,7 +594,7 @@ static int
ProcessPurgeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_HashEntry *entry;
@@ -692,7 +692,7 @@ static int
ProcessAutopurgeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
diff --git a/generic/tclResult.c b/generic/tclResult.c
index c0266bc..ffff17e 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -810,7 +810,7 @@ TclProcessReturn(
int
TclMergeReturnOptions(
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument objects. */
Tcl_Obj **optionsPtrPtr, /* If not NULL, points to space for a (Tcl_Obj
* *) where the pointer to the merged return
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 0a8e9ae..b411532 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -566,7 +566,7 @@ int
Tcl_ScanObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *format;
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 7c0d626..01b14c2 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -3083,7 +3083,7 @@ TclStringRepeat(
Tcl_Obj *
TclStringCat(
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj * const objv[],
int flags)
{
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 4b2fd30..9e6571c 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -74,7 +74,6 @@
#undef Tcl_UtfToUniCharDString
#undef Tcl_UtfToUniChar
#undef Tcl_UniCharLen
-#undef TclObjInterpProc
#if !defined(_WIN32) && !defined(__CYGWIN__)
#undef Tcl_WinConvertError
#define Tcl_WinConvertError 0
@@ -86,6 +85,13 @@
#undef Tcl_GetByteArrayFromObj
#define Tcl_GetByteArrayFromObj 0
+#ifdef TCL_NO_DEPRECATED
+# define Tcl_CreateObjCommand 0
+# define Tcl_CreateObjTrace 0
+# define Tcl_NRCallObjProc 0
+# define Tcl_NRCreateCommand 0
+# define TclGetObjInterpProc 0
+#endif
#if TCL_UTF_MAX < 4
static void uniCodePanic() {
@@ -452,8 +458,8 @@ static const TclIntStubs tclIntStubs = {
0, /* 50 */
TclInterpInit, /* 51 */
0, /* 52 */
- TclInvokeObjectCommand, /* 53 */
- TclInvokeStringCommand, /* 54 */
+ 0, /* 53 */
+ 0, /* 54 */
TclIsProc, /* 55 */
0, /* 56 */
0, /* 57 */
@@ -462,8 +468,8 @@ static const TclIntStubs tclIntStubs = {
TclNeedSpace, /* 60 */
TclNewProcBodyObj, /* 61 */
TclObjCommandComplete, /* 62 */
- TclObjInterpProc, /* 63 */
- TclObjInvoke, /* 64 */
+ 0, /* 63 */
+ 0, /* 64 */
0, /* 65 */
0, /* 66 */
0, /* 67 */
@@ -637,7 +643,7 @@ static const TclIntStubs tclIntStubs = {
TclInitVarHashTable, /* 235 */
0, /* 236 */
TclResetCancellation, /* 237 */
- TclNRInterpProc, /* 238 */
+ 0, /* 238 */
TclNRInterpProcCore, /* 239 */
TclNRRunCallbacks, /* 240 */
TclNREvalObjEx, /* 241 */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 5d76afd..f2718e8 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -83,6 +83,17 @@ typedef struct TestAsyncHandler {
/* Next is list of handlers. */
} TestAsyncHandler;
+#if TCL_MAJOR_VERSION < 9 || !defined(TCL_NO_DEPRECATED)
+# undef Tcl_CreateObjCommand2
+# define Tcl_CreateObjCommand2 Tcl_CreateObjCommand
+# define Tcl_ObjCmdProc2 Tcl_ObjCmdProc
+# undef Tcl_CreateObjTrace2
+# define Tcl_CreateObjTrace2 Tcl_CreateObjTrace
+# define TclSizeT int
+#else
+# define TclSizeT size_t
+#endif
+
/*
* Start of the socket driver state structure to acces field testFlags
*/
@@ -204,25 +215,25 @@ static int EncodingFromUtfProc(void *clientData,
int *dstCharsPtr);
static void ExitProcEven(void *clientData);
static void ExitProcOdd(void *clientData);
-static Tcl_ObjCmdProc GetTimesObjCmd;
+static Tcl_ObjCmdProc2 GetTimesObjCmd;
static Tcl_ResolveCompiledVarProc InterpCompiledVarResolver;
static void MainLoop(void);
static Tcl_CmdProc NoopCmd;
-static Tcl_ObjCmdProc NoopObjCmd;
+static Tcl_ObjCmdProc2 NoopObjCmd;
static int ObjTraceProc(void *clientData,
Tcl_Interp *interp, int level, const char *command,
- Tcl_Command commandToken, int objc,
+ Tcl_Command commandToken, TclSizeT objc,
Tcl_Obj *const objv[]);
static void ObjTraceDeleteProc(void *clientData);
static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr);
static void SpecialFree(void *blockPtr);
static int StaticInitProc(Tcl_Interp *interp);
static Tcl_CmdProc TestasyncCmd;
-static Tcl_ObjCmdProc TestbumpinterpepochObjCmd;
-static Tcl_ObjCmdProc TestbytestringObjCmd;
-static Tcl_ObjCmdProc TestsetbytearraylengthObjCmd;
-static Tcl_ObjCmdProc TestpurebytesobjObjCmd;
-static Tcl_ObjCmdProc TeststringbytesObjCmd;
+static Tcl_ObjCmdProc2 TestbumpinterpepochObjCmd;
+static Tcl_ObjCmdProc2 TestbytestringObjCmd;
+static Tcl_ObjCmdProc2 TestsetbytearraylengthObjCmd;
+static Tcl_ObjCmdProc2 TestpurebytesobjObjCmd;
+static Tcl_ObjCmdProc2 TeststringbytesObjCmd;
static Tcl_CmdProc TestcmdinfoCmd;
static Tcl_CmdProc TestcmdtokenCmd;
static Tcl_CmdProc TestcmdtraceCmd;
@@ -231,69 +242,69 @@ static Tcl_CmdProc TestcreatecommandCmd;
static Tcl_CmdProc TestdcallCmd;
static Tcl_CmdProc TestdelCmd;
static Tcl_CmdProc TestdelassocdataCmd;
-static Tcl_ObjCmdProc TestdoubledigitsObjCmd;
+static Tcl_ObjCmdProc2 TestdoubledigitsObjCmd;
static Tcl_CmdProc TestdstringCmd;
-static Tcl_ObjCmdProc TestencodingObjCmd;
-static Tcl_ObjCmdProc TestevalexObjCmd;
-static Tcl_ObjCmdProc TestevalobjvObjCmd;
-static Tcl_ObjCmdProc TesteventObjCmd;
+static Tcl_ObjCmdProc2 TestencodingObjCmd;
+static Tcl_ObjCmdProc2 TestevalexObjCmd;
+static Tcl_ObjCmdProc2 TestevalobjvObjCmd;
+static Tcl_ObjCmdProc2 TesteventObjCmd;
static int TesteventProc(Tcl_Event *event, int flags);
static int TesteventDeleteProc(Tcl_Event *event,
void *clientData);
static Tcl_CmdProc TestexithandlerCmd;
static Tcl_CmdProc TestexprlongCmd;
-static Tcl_ObjCmdProc TestexprlongobjCmd;
+static Tcl_ObjCmdProc2 TestexprlongobjCmd;
static Tcl_CmdProc TestexprdoubleCmd;
-static Tcl_ObjCmdProc TestexprdoubleobjCmd;
-static Tcl_ObjCmdProc TestexprparserObjCmd;
+static Tcl_ObjCmdProc2 TestexprdoubleobjCmd;
+static Tcl_ObjCmdProc2 TestexprparserObjCmd;
static Tcl_CmdProc TestexprstringCmd;
-static Tcl_ObjCmdProc TestfileCmd;
-static Tcl_ObjCmdProc TestfilelinkCmd;
+static Tcl_ObjCmdProc2 TestfileCmd;
+static Tcl_ObjCmdProc2 TestfilelinkCmd;
static Tcl_CmdProc TestfeventCmd;
static Tcl_CmdProc TestgetassocdataCmd;
static Tcl_CmdProc TestgetintCmd;
static Tcl_CmdProc TestlongsizeCmd;
static Tcl_CmdProc TestgetplatformCmd;
-static Tcl_ObjCmdProc TestgetvarfullnameCmd;
+static Tcl_ObjCmdProc2 TestgetvarfullnameCmd;
static Tcl_CmdProc TestinterpdeleteCmd;
static Tcl_CmdProc TestlinkCmd;
-static Tcl_ObjCmdProc TestlinkarrayCmd;
-static Tcl_ObjCmdProc TestlistrepCmd;
-static Tcl_ObjCmdProc TestlocaleCmd;
+static Tcl_ObjCmdProc2 TestlinkarrayCmd;
+static Tcl_ObjCmdProc2 TestlistrepCmd;
+static Tcl_ObjCmdProc2 TestlocaleCmd;
static Tcl_CmdProc TestmainthreadCmd;
static Tcl_CmdProc TestsetmainloopCmd;
static Tcl_CmdProc TestexitmainloopCmd;
static Tcl_CmdProc TestpanicCmd;
-static Tcl_ObjCmdProc TestparseargsCmd;
-static Tcl_ObjCmdProc TestparserObjCmd;
-static Tcl_ObjCmdProc TestparsevarObjCmd;
-static Tcl_ObjCmdProc TestparsevarnameObjCmd;
-static Tcl_ObjCmdProc TestpreferstableObjCmd;
-static Tcl_ObjCmdProc TestprintObjCmd;
-static Tcl_ObjCmdProc TestregexpObjCmd;
-static Tcl_ObjCmdProc TestreturnObjCmd;
+static Tcl_ObjCmdProc2 TestparseargsCmd;
+static Tcl_ObjCmdProc2 TestparserObjCmd;
+static Tcl_ObjCmdProc2 TestparsevarObjCmd;
+static Tcl_ObjCmdProc2 TestparsevarnameObjCmd;
+static Tcl_ObjCmdProc2 TestpreferstableObjCmd;
+static Tcl_ObjCmdProc2 TestprintObjCmd;
+static Tcl_ObjCmdProc2 TestregexpObjCmd;
+static Tcl_ObjCmdProc2 TestreturnObjCmd;
static void TestregexpXflags(const char *string,
size_t length, int *cflagsPtr, int *eflagsPtr);
static Tcl_CmdProc TestsetassocdataCmd;
static Tcl_CmdProc TestsetCmd;
static Tcl_CmdProc Testset2Cmd;
static Tcl_CmdProc TestseterrorcodeCmd;
-static Tcl_ObjCmdProc TestsetobjerrorcodeCmd;
+static Tcl_ObjCmdProc2 TestsetobjerrorcodeCmd;
static Tcl_CmdProc TestsetplatformCmd;
static Tcl_CmdProc TeststaticlibraryCmd;
static Tcl_CmdProc TesttranslatefilenameCmd;
static Tcl_CmdProc TestupvarCmd;
static Tcl_ObjCmdProc2 TestWrongNumArgsObjCmd;
-static Tcl_ObjCmdProc TestGetIndexFromObjStructObjCmd;
+static Tcl_ObjCmdProc2 TestGetIndexFromObjStructObjCmd;
static Tcl_CmdProc TestChannelCmd;
static Tcl_CmdProc TestChannelEventCmd;
static Tcl_CmdProc TestSocketCmd;
-static Tcl_ObjCmdProc TestFilesystemObjCmd;
-static Tcl_ObjCmdProc TestSimpleFilesystemObjCmd;
+static Tcl_ObjCmdProc2 TestFilesystemObjCmd;
+static Tcl_ObjCmdProc2 TestSimpleFilesystemObjCmd;
static void TestReport(const char *cmd, Tcl_Obj *arg1,
Tcl_Obj *arg2);
-static Tcl_ObjCmdProc TestgetencpathObjCmd;
-static Tcl_ObjCmdProc TestsetencpathObjCmd;
+static Tcl_ObjCmdProc2 TestgetencpathObjCmd;
+static Tcl_ObjCmdProc2 TestsetencpathObjCmd;
static Tcl_Obj * TestReportGetNativePath(Tcl_Obj *pathPtr);
static Tcl_FSStatProc TestReportStat;
static Tcl_FSAccessProc TestReportAccess;
@@ -326,22 +337,22 @@ static Tcl_FSListVolumesProc SimpleListVolumes;
static Tcl_FSPathInFilesystemProc SimplePathInFilesystem;
static Tcl_Obj * SimpleRedirect(Tcl_Obj *pathPtr);
static Tcl_FSMatchInDirectoryProc SimpleMatchInDirectory;
-static Tcl_ObjCmdProc TestUtfNextCmd;
-static Tcl_ObjCmdProc TestUtfPrevCmd;
-static Tcl_ObjCmdProc TestNumUtfCharsCmd;
-static Tcl_ObjCmdProc TestFindFirstCmd;
-static Tcl_ObjCmdProc TestFindLastCmd;
-static Tcl_ObjCmdProc TestHashSystemHashCmd;
-static Tcl_ObjCmdProc TestGetIntForIndexCmd;
+static Tcl_ObjCmdProc2 TestUtfNextCmd;
+static Tcl_ObjCmdProc2 TestUtfPrevCmd;
+static Tcl_ObjCmdProc2 TestNumUtfCharsCmd;
+static Tcl_ObjCmdProc2 TestFindFirstCmd;
+static Tcl_ObjCmdProc2 TestFindLastCmd;
+static Tcl_ObjCmdProc2 TestHashSystemHashCmd;
+static Tcl_ObjCmdProc2 TestGetIntForIndexCmd;
static Tcl_NRPostProc NREUnwind_callback;
-static Tcl_ObjCmdProc TestNREUnwind;
-static Tcl_ObjCmdProc TestNRELevels;
-static Tcl_ObjCmdProc TestInterpResolverCmd;
+static Tcl_ObjCmdProc2 TestNREUnwind;
+static Tcl_ObjCmdProc2 TestNRELevels;
+static Tcl_ObjCmdProc2 TestInterpResolverCmd;
#if defined(HAVE_CPUID) && !defined(MAC_OSX_TCL)
-static Tcl_ObjCmdProc TestcpuidCmd;
+static Tcl_ObjCmdProc2 TestcpuidCmd;
#endif
-static Tcl_ObjCmdProc TestApplyLambdaObjCmd;
+static Tcl_ObjCmdProc2 TestApplyLambdaObjCmd;
static const Tcl_Filesystem testReportingFilesystem = {
"reporting",
@@ -546,14 +557,13 @@ Tcltest_Init(
}
if (Tcl_GetCommandInfo(interp, "::tcl::build-info", &info)) {
-#if TCL_MAJOR_VERSION > 8
- if (info.isNativeObjectProc == 2) {
- Tcl_CreateObjCommand2(interp, "::tcl::test::build-info",
- info.objProc2, (void *)version, NULL);
- } else
-#endif
+#if TCL_MAJOR_VERSION > 8 && defined(TCL_NO_DEPRECATED)
+ Tcl_CreateObjCommand2(interp, "::tcl::test::build-info",
+ info.objProc2, (void *)version, NULL);
+#else
Tcl_CreateObjCommand(interp, "::tcl::test::build-info",
info.objProc, (void *)version, NULL);
+#endif
}
if (Tcl_PkgProvideEx(interp, "tcl::test", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
return TCL_ERROR;
@@ -563,23 +573,23 @@ Tcltest_Init(
* Create additional commands and math functions for testing Tcl.
*/
- Tcl_CreateObjCommand(interp, "gettimes", GetTimesObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "gettimes", GetTimesObjCmd, NULL, NULL);
Tcl_CreateCommand(interp, "noop", NoopCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "noop", NoopObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testpurebytesobj", TestpurebytesobjObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetbytearraylength", TestsetbytearraylengthObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testbytestring", TestbytestringObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "teststringbytes", TeststringbytesObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "noop", NoopObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testpurebytesobj", TestpurebytesobjObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsetbytearraylength", TestsetbytearraylengthObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testbytestring", TestbytestringObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "teststringbytes", TeststringbytesObjCmd, NULL, NULL);
Tcl_CreateObjCommand2(interp, "testwrongnumargs", TestWrongNumArgsObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfilesystem", TestFilesystemObjCmd,
+ Tcl_CreateObjCommand2(interp, "testfilesystem", TestFilesystemObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsimplefilesystem", TestSimpleFilesystemObjCmd,
+ Tcl_CreateObjCommand2(interp, "testsimplefilesystem", TestSimpleFilesystemObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetindexfromobjstruct",
+ Tcl_CreateObjCommand2(interp, "testgetindexfromobjstruct",
TestGetIndexFromObjStructObjCmd, NULL, NULL);
Tcl_CreateCommand(interp, "testasync", TestasyncCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testbumpinterpepoch",
+ Tcl_CreateObjCommand2(interp, "testbumpinterpepoch",
TestbumpinterpepochObjCmd, NULL, NULL);
Tcl_CreateCommand(interp, "testchannel", TestChannelCmd,
NULL, NULL);
@@ -599,40 +609,40 @@ Tcltest_Init(
Tcl_CreateCommand(interp, "testdel", TestdelCmd, NULL, NULL);
Tcl_CreateCommand(interp, "testdelassocdata", TestdelassocdataCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testdoubledigits", TestdoubledigitsObjCmd,
+ Tcl_CreateObjCommand2(interp, "testdoubledigits", TestdoubledigitsObjCmd,
NULL, NULL);
Tcl_DStringInit(&dstring);
Tcl_CreateCommand(interp, "testdstring", TestdstringCmd, NULL,
NULL);
- Tcl_CreateObjCommand(interp, "testencoding", TestencodingObjCmd, NULL,
+ Tcl_CreateObjCommand2(interp, "testencoding", TestencodingObjCmd, NULL,
NULL);
- Tcl_CreateObjCommand(interp, "testevalex", TestevalexObjCmd,
+ Tcl_CreateObjCommand2(interp, "testevalex", TestevalexObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testevalobjv", TestevalobjvObjCmd,
+ Tcl_CreateObjCommand2(interp, "testevalobjv", TestevalobjvObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testevent", TesteventObjCmd,
+ Tcl_CreateObjCommand2(interp, "testevent", TesteventObjCmd,
NULL, NULL);
Tcl_CreateCommand(interp, "testexithandler", TestexithandlerCmd,
NULL, NULL);
Tcl_CreateCommand(interp, "testexprlong", TestexprlongCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprlongobj", TestexprlongobjCmd,
+ Tcl_CreateObjCommand2(interp, "testexprlongobj", TestexprlongobjCmd,
NULL, NULL);
Tcl_CreateCommand(interp, "testexprdouble", TestexprdoubleCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprdoubleobj", TestexprdoubleobjCmd,
+ Tcl_CreateObjCommand2(interp, "testexprdoubleobj", TestexprdoubleobjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprparser", TestexprparserObjCmd,
+ Tcl_CreateObjCommand2(interp, "testexprparser", TestexprparserObjCmd,
NULL, NULL);
Tcl_CreateCommand(interp, "testexprstring", TestexprstringCmd,
NULL, NULL);
Tcl_CreateCommand(interp, "testfevent", TestfeventCmd, NULL,
NULL);
- Tcl_CreateObjCommand(interp, "testfilelink", TestfilelinkCmd,
+ Tcl_CreateObjCommand2(interp, "testfilelink", TestfilelinkCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfile", TestfileCmd,
+ Tcl_CreateObjCommand2(interp, "testfile", TestfileCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testhashsystemhash",
+ Tcl_CreateObjCommand2(interp, "testhashsystemhash",
TestHashSystemHashCmd, NULL, NULL);
Tcl_CreateCommand(interp, "testgetassocdata", TestgetassocdataCmd,
NULL, NULL);
@@ -642,30 +652,30 @@ Tcltest_Init(
NULL, NULL);
Tcl_CreateCommand(interp, "testgetplatform", TestgetplatformCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetvarfullname",
+ Tcl_CreateObjCommand2(interp, "testgetvarfullname",
TestgetvarfullnameCmd, NULL, NULL);
Tcl_CreateCommand(interp, "testinterpdelete", TestinterpdeleteCmd,
NULL, NULL);
Tcl_CreateCommand(interp, "testlink", TestlinkCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testlinkarray", TestlinkarrayCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testlistrep", TestlistrepCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testlocale", TestlocaleCmd, NULL,
+ Tcl_CreateObjCommand2(interp, "testlinkarray", TestlinkarrayCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlistrep", TestlistrepCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlocale", TestlocaleCmd, NULL,
NULL);
Tcl_CreateCommand(interp, "testpanic", TestpanicCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testparseargs", TestparseargsCmd,NULL,NULL);
- Tcl_CreateObjCommand(interp, "testparser", TestparserObjCmd,
+ Tcl_CreateObjCommand2(interp, "testparseargs", TestparseargsCmd,NULL,NULL);
+ Tcl_CreateObjCommand2(interp, "testparser", TestparserObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testparsevar", TestparsevarObjCmd,
+ Tcl_CreateObjCommand2(interp, "testparsevar", TestparsevarObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testparsevarname", TestparsevarnameObjCmd,
+ Tcl_CreateObjCommand2(interp, "testparsevarname", TestparsevarnameObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testpreferstable", TestpreferstableObjCmd,
+ Tcl_CreateObjCommand2(interp, "testpreferstable", TestpreferstableObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testprint", TestprintObjCmd,
+ Tcl_CreateObjCommand2(interp, "testprint", TestprintObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testregexp", TestregexpObjCmd,
+ Tcl_CreateObjCommand2(interp, "testregexp", TestregexpObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testreturn", TestreturnObjCmd,
+ Tcl_CreateObjCommand2(interp, "testreturn", TestreturnObjCmd,
NULL, NULL);
Tcl_CreateCommand(interp, "testservicemode", TestServiceModeCmd,
NULL, NULL);
@@ -679,19 +689,19 @@ Tcltest_Init(
INT2PTR(TCL_LEAVE_ERR_MSG), NULL);
Tcl_CreateCommand(interp, "testseterrorcode", TestseterrorcodeCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetobjerrorcode",
+ Tcl_CreateObjCommand2(interp, "testsetobjerrorcode",
TestsetobjerrorcodeCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testutfnext",
+ Tcl_CreateObjCommand2(interp, "testutfnext",
TestUtfNextCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testutfprev",
+ Tcl_CreateObjCommand2(interp, "testutfprev",
TestUtfPrevCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testnumutfchars",
+ Tcl_CreateObjCommand2(interp, "testnumutfchars",
TestNumUtfCharsCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfindfirst",
+ Tcl_CreateObjCommand2(interp, "testfindfirst",
TestFindFirstCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfindlast",
+ Tcl_CreateObjCommand2(interp, "testfindlast",
TestFindLastCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetintforindex",
+ Tcl_CreateObjCommand2(interp, "testgetintforindex",
TestGetIntForIndexCmd, NULL, NULL);
Tcl_CreateCommand(interp, "testsetplatform", TestsetplatformCmd,
NULL, NULL);
@@ -709,20 +719,20 @@ Tcltest_Init(
Tcl_CreateCommand(interp, "testexitmainloop", TestexitmainloopCmd,
NULL, NULL);
#if defined(HAVE_CPUID) && !defined(MAC_OSX_TCL)
- Tcl_CreateObjCommand(interp, "testcpuid", TestcpuidCmd,
+ Tcl_CreateObjCommand2(interp, "testcpuid", TestcpuidCmd,
NULL, NULL);
#endif
- Tcl_CreateObjCommand(interp, "testnreunwind", TestNREUnwind,
+ Tcl_CreateObjCommand2(interp, "testnreunwind", TestNREUnwind,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testnrelevels", TestNRELevels,
+ Tcl_CreateObjCommand2(interp, "testnrelevels", TestNRELevels,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testinterpresolver", TestInterpResolverCmd,
+ Tcl_CreateObjCommand2(interp, "testinterpresolver", TestInterpResolverCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetencpath", TestgetencpathObjCmd,
+ Tcl_CreateObjCommand2(interp, "testgetencpath", TestgetencpathObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetencpath", TestsetencpathObjCmd,
+ Tcl_CreateObjCommand2(interp, "testsetencpath", TestsetencpathObjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testapplylambda", TestApplyLambdaObjCmd,
+ Tcl_CreateObjCommand2(interp, "testapplylambda", TestApplyLambdaObjCmd,
NULL, NULL);
if (TclObjTest_Init(interp) != TCL_OK) {
@@ -806,14 +816,13 @@ Tcltest_SafeInit(
return TCL_ERROR;
}
if (Tcl_GetCommandInfo(interp, "::tcl::build-info", &info)) {
-#if TCL_MAJOR_VERSION > 8
- if (info.isNativeObjectProc == 2) {
- Tcl_CreateObjCommand2(interp, "::tcl::test::build-info",
- info.objProc2, (void *)version, NULL);
- } else
-#endif
- Tcl_CreateObjCommand(interp, "::tcl::test::build-info",
+#if TCL_MAJOR_VERSION > 8 && defined(TCL_NO_DEPRECATED)
+ Tcl_CreateObjCommand2(interp, "::tcl::test::build-info",
+ info.objProc2, (void *)version, NULL);
+#else
+ Tcl_CreateObjCommand2(interp, "::tcl::test::build-info",
info.objProc, (void *)version, NULL);
+#endif
}
if (Tcl_PkgProvideEx(interp, "tcl::test", TCL_PATCH_LEVEL, NULL) == TCL_ERROR) {
return TCL_ERROR;
@@ -1044,7 +1053,7 @@ static int
TestbumpinterpepochObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *)interp;
@@ -1120,16 +1129,23 @@ TestcmdinfoCmd(
Tcl_AppendResult(interp, " unknown", NULL);
}
Tcl_AppendResult(interp, " ", info.namespacePtr->fullName, NULL);
- if (info.isNativeObjectProc) {
- Tcl_AppendResult(interp, " nativeObjectProc", NULL);
- } else {
+ if (info.isNativeObjectProc == 2) {
+ Tcl_AppendResult(interp, " nativeObjectProc2", NULL);
+ } else if (info.isNativeObjectProc == 0) {
Tcl_AppendResult(interp, " stringProc", NULL);
+ } else {
+ Tcl_AppendResult(interp, " nativeObjectProc", NULL);
}
} else if (strcmp(argv[1], "modify") == 0) {
info.proc = CmdProc2;
info.clientData = (void *) "new_command_data";
+#if TCL_MAJOR_VERSION > 8
+ info.objProc2 = NULL;
+ info.objClientData2 = NULL;
+#else
info.objProc = NULL;
info.objClientData = NULL;
+#endif
info.deleteProc = CmdDelProc2;
info.deleteData = (void *) "new_delete_data";
if (Tcl_SetCommandInfo(interp, argv[2], &info) == 0) {
@@ -1339,7 +1355,7 @@ TestcmdtraceCmd(
static int deleteCalled;
deleteCalled = 0;
- cmdTrace = Tcl_CreateObjTrace(interp, 50000,
+ cmdTrace = Tcl_CreateObjTrace2(interp, 50000,
TCL_ALLOW_INLINE_COMPILATION, ObjTraceProc,
&deleteCalled, ObjTraceDeleteProc);
result = Tcl_EvalEx(interp, argv[2], TCL_INDEX_NONE, 0);
@@ -1425,7 +1441,7 @@ ObjTraceProc(
TCL_UNUSED(int) /*level*/,
const char *command,
TCL_UNUSED(Tcl_Command),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(TclSizeT) /*objc*/,
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *word = Tcl_GetString(objv[0]);
@@ -1745,7 +1761,7 @@ static int
TestdoubledigitsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ TclSizeT objc, /* Parameter count */
Tcl_Obj* const objv[]) /* Parameter vector */
{
static const char *options[] = {
@@ -1958,7 +1974,7 @@ static int
TestencodingObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Encoding encoding;
@@ -2138,7 +2154,7 @@ static int
TestevalexObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int length, flags;
@@ -2183,7 +2199,7 @@ static int
TestevalobjvObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int evalGlobal;
@@ -2232,7 +2248,7 @@ static int
TesteventObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ TclSizeT objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter vector */
{
static const char *const subcommands[] = { /* Possible subcommands */
@@ -2530,7 +2546,7 @@ static int
TestexprlongobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument objects. */
{
long exprResult;
@@ -2616,7 +2632,7 @@ static int
TestexprdoubleobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument objects. */
{
double exprResult;
@@ -2690,7 +2706,7 @@ static int
TestfilelinkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Obj *contents;
@@ -3343,7 +3359,7 @@ static int
TestlinkarrayCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *LinkOption[] = {
@@ -3362,7 +3378,8 @@ TestlinkarrayCmd(
TCL_LINK_FLOAT, TCL_LINK_DOUBLE, TCL_LINK_STRING, TCL_LINK_CHARS,
TCL_LINK_BINARY
};
- int typeIndex, readonly, i, size, length;
+ int typeIndex, readonly, size, length;
+ TclSizeT i;
char *name, *arg;
Tcl_WideInt addr;
@@ -3461,7 +3478,7 @@ static int
TestlistrepCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/* Subcommands supported by this command */
@@ -3613,7 +3630,7 @@ static int
TestlocaleCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
int index;
@@ -3699,7 +3716,7 @@ static int
TestparserObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
@@ -3755,7 +3772,7 @@ static int
TestexprparserObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
@@ -3903,7 +3920,7 @@ static int
TestparsevarObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *value, *name, *termPtr;
@@ -3944,7 +3961,7 @@ static int
TestparsevarnameObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
@@ -4007,7 +4024,7 @@ static int
TestpreferstableObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(TclSizeT) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
Interp *iPtr = (Interp *) interp;
@@ -4037,7 +4054,7 @@ static int
TestprintObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_WideInt argv1 = 0;
@@ -4078,10 +4095,11 @@ static int
TestregexpObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, indices, stringLength, match, about;
+ int indices, stringLength, match, about;
+ TclSizeT i;
size_t ii;
int hasxflags, cflags, eflags;
Tcl_RegExp regExpr;
@@ -4150,7 +4168,7 @@ TestregexpObjCmd(
}
endOfForLoop:
- if (objc - i < hasxflags + 2 - about) {
+ if (objc + about < hasxflags + 2 + i) {
Tcl_WrongNumArgs(interp, 1, objv,
"?-switch ...? exp string ?matchVar? ?subMatchVar ...?");
return TCL_ERROR;
@@ -4402,7 +4420,7 @@ static int
TestreturnObjCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(TclSizeT) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
return TCL_RETURN;
@@ -4726,7 +4744,7 @@ static int
TestsetobjerrorcodeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_SetObjErrorCode(interp, Tcl_ConcatObj(objc - 1, objv + 1));
@@ -4845,14 +4863,15 @@ static int
TestfileCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int argc, /* Number of arguments. */
+ TclSizeT argc, /* Number of arguments. */
Tcl_Obj *const argv[]) /* The argument objects. */
{
- int force, i, j, result;
+ int force, i, result;
Tcl_Obj *error = NULL;
const char *subcmd;
+ TclSizeT j;
- if (argc < 3) {
+ if (argc + 1 < 4) {
return TCL_ERROR;
}
@@ -4927,7 +4946,7 @@ static int
TestgetvarfullnameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *name, *arg;
@@ -5001,7 +5020,7 @@ static int
GetTimesObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The current interpreter. */
- TCL_UNUSED(int) /*cobjc*/,
+ TCL_UNUSED(TclSizeT) /*cobjc*/,
TCL_UNUSED(Tcl_Obj *const *) /*cobjv*/)
{
Interp *iPtr = (Interp *) interp;
@@ -5207,7 +5226,7 @@ static int
NoopObjCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(TclSizeT) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
return TCL_OK;
@@ -5232,7 +5251,7 @@ static int
TeststringbytesObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
int n;
@@ -5272,7 +5291,7 @@ static int
TestpurebytesobjObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Obj *objPtr;
@@ -5319,7 +5338,7 @@ static int
TestsetbytearraylengthObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
int n;
@@ -5368,7 +5387,7 @@ static int
TestbytestringObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
size_t n = 0;
@@ -6453,7 +6472,7 @@ static int
TestWrongNumArgsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- size_t objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t i, length;
@@ -6472,7 +6491,7 @@ TestWrongNumArgsObjCmd(
msg = NULL;
}
- if (i > objc - 3) {
+ if (i > (size_t)objc - 3) {
/*
* Asked for more arguments than were given.
*/
@@ -6505,7 +6524,7 @@ static int
TestGetIndexFromObjStructObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *const ary[] = {
@@ -6567,7 +6586,7 @@ static int
TestFilesystemObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
int res, boolVal;
@@ -6938,7 +6957,7 @@ static int
TestSimpleFilesystemObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
int res, boolVal;
@@ -7100,7 +7119,7 @@ static int
TestUtfNextCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
size_t numBytes;
@@ -7161,7 +7180,7 @@ static int
TestUtfPrevCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
size_t numBytes, offset;
@@ -7201,7 +7220,7 @@ static int
TestNumUtfCharsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
if (objc > 1) {
@@ -7230,7 +7249,7 @@ static int
TestFindFirstCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
if (objc > 1) {
@@ -7252,7 +7271,7 @@ static int
TestFindLastCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
if (objc > 1) {
@@ -7270,7 +7289,7 @@ static int
TestGetIntForIndexCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
size_t result;
@@ -7322,7 +7341,7 @@ static int
TestcpuidCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ TclSizeT objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
int status, index, i;
@@ -7358,7 +7377,7 @@ static int
TestHashSystemHashCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
static const Tcl_HashKeyType hkType = {
@@ -7503,7 +7522,7 @@ static int
TestNREUnwind(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(TclSizeT) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
/*
@@ -7521,7 +7540,7 @@ static int
TestNRELevels(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(TclSizeT) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
Interp *iPtr = (Interp *) interp;
@@ -7867,7 +7886,7 @@ static int
TestgetencpathObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
if (objc != 1) {
@@ -7900,7 +7919,7 @@ static int
TestsetencpathObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
if (objc != 2) {
@@ -7934,7 +7953,7 @@ static int
TestparseargsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ TclSizeT objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Arguments. */
{
static int foo = 0;
@@ -8173,7 +8192,7 @@ static int
TestInterpResolverCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ TclSizeT objc,
Tcl_Obj *const objv[])
{
static const char *const table[] = {
@@ -8235,7 +8254,7 @@ TestInterpResolverCmd(
int TestApplyLambdaObjCmd (
TCL_UNUSED(void*),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int), /* objc. */
+ TCL_UNUSED(TclSizeT), /* objc. */
TCL_UNUSED(Tcl_Obj *const *)) /* objv. */
{
Tcl_Obj *lambdaObjs[2];
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index 131601d..912238a 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -34,14 +34,14 @@ static int CheckIfVarUnset(Tcl_Interp *interp, Tcl_Obj **varPtr, size_t varInde
static int GetVariableIndex(Tcl_Interp *interp,
Tcl_Obj *obj, size_t *indexPtr);
static void SetVarToObj(Tcl_Obj **varPtr, size_t varIndex, Tcl_Obj *objPtr);
-static Tcl_ObjCmdProc TestbignumobjCmd;
-static Tcl_ObjCmdProc TestbooleanobjCmd;
-static Tcl_ObjCmdProc TestdoubleobjCmd;
-static Tcl_ObjCmdProc TestindexobjCmd;
-static Tcl_ObjCmdProc TestintobjCmd;
-static Tcl_ObjCmdProc TestlistobjCmd;
-static Tcl_ObjCmdProc TestobjCmd;
-static Tcl_ObjCmdProc TeststringobjCmd;
+static Tcl_ObjCmdProc2 TestbignumobjCmd;
+static Tcl_ObjCmdProc2 TestbooleanobjCmd;
+static Tcl_ObjCmdProc2 TestdoubleobjCmd;
+static Tcl_ObjCmdProc2 TestindexobjCmd;
+static Tcl_ObjCmdProc2 TestintobjCmd;
+static Tcl_ObjCmdProc2 TestlistobjCmd;
+static Tcl_ObjCmdProc2 TestobjCmd;
+static Tcl_ObjCmdProc2 TeststringobjCmd;
#define VARPTR_KEY "TCLOBJTEST_VARPTR"
#define NUMBER_OF_OBJECT_VARS 20
@@ -102,20 +102,20 @@ TclObjTest_Init(
varPtr[i] = NULL;
}
- Tcl_CreateObjCommand(interp, "testbignumobj", TestbignumobjCmd,
+ Tcl_CreateObjCommand2(interp, "testbignumobj", TestbignumobjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testbooleanobj", TestbooleanobjCmd,
+ Tcl_CreateObjCommand2(interp, "testbooleanobj", TestbooleanobjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testdoubleobj", TestdoubleobjCmd,
+ Tcl_CreateObjCommand2(interp, "testdoubleobj", TestdoubleobjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testintobj", TestintobjCmd,
+ Tcl_CreateObjCommand2(interp, "testintobj", TestintobjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testindexobj", TestindexobjCmd,
+ Tcl_CreateObjCommand2(interp, "testindexobj", TestindexobjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testlistobj", TestlistobjCmd,
+ Tcl_CreateObjCommand2(interp, "testlistobj", TestlistobjCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testobj", TestobjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "teststringobj", TeststringobjCmd,
+ Tcl_CreateObjCommand2(interp, "testobj", TestobjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "teststringobj", TeststringobjCmd,
NULL, NULL);
return TCL_OK;
}
@@ -142,7 +142,7 @@ static int
TestbignumobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Argument count */
+ size_t objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
{
const char *const subcmds[] = {
@@ -158,7 +158,7 @@ TestbignumobjCmd(
mp_int bignumValue;
Tcl_Obj **varPtr;
- if (objc < 3) {
+ if (objc + 1 < 4) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
@@ -341,7 +341,7 @@ static int
TestbooleanobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t varIndex;
@@ -349,7 +349,7 @@ TestbooleanobjCmd(
const char *subCmd;
Tcl_Obj **varPtr;
- if (objc < 3) {
+ if (objc + 1 < 4) {
wrongNumArgs:
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg ...?");
return TCL_ERROR;
@@ -441,7 +441,7 @@ static int
TestdoubleobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t varIndex;
@@ -449,7 +449,7 @@ TestdoubleobjCmd(
const char *subCmd;
Tcl_Obj **varPtr;
- if (objc < 3) {
+ if (objc + 1 < 4) {
wrongNumArgs:
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg ...?");
return TCL_ERROR;
@@ -557,10 +557,11 @@ static int
TestindexobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int allowAbbrev, index, setError, i, result;
+ int allowAbbrev, index, setError, result;
+ size_t i;
Tcl_WideInt index2;
const char **argv;
static const char *const tablePtr[] = {"a", "b", "check", NULL};
@@ -597,7 +598,7 @@ TestindexobjCmd(
return result;
}
- if (objc < 5) {
+ if (objc + 1 < 6) {
Tcl_AppendToObj(Tcl_GetObjResult(interp), "wrong # args", -1);
return TCL_ERROR;
}
@@ -647,7 +648,7 @@ static int
TestintobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t varIndex;
@@ -658,7 +659,7 @@ TestintobjCmd(
const char *subCmd;
Tcl_Obj **varPtr;
- if (objc < 3) {
+ if (objc + 1 < 4) {
wrongNumArgs:
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg ...?");
return TCL_ERROR;
@@ -875,7 +876,7 @@ static int
TestlistobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Number of arguments */
+ size_t objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
{
/* Subcommands supported by this command */
@@ -901,7 +902,7 @@ TestlistobjCmd(
Tcl_Obj **varPtr;
int i, len;
- if (objc < 3) {
+ if (objc + 1 < 4) {
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg...?");
return TCL_ERROR;
}
@@ -1025,7 +1026,7 @@ static int
TestobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
size_t varIndex, destIndex;
@@ -1046,7 +1047,7 @@ TestobjCmd(
TESTOBJ_INVALIDATESTRINGREP, TESTOBJ_REFCOUNT, TESTOBJ_TYPE,
} cmdIndex;
- if (objc < 2) {
+ if (objc + 1 < 3) {
wrongNumArgs:
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg ...?");
return TCL_ERROR;
@@ -1247,12 +1248,12 @@ static int
TeststringobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_UniChar *unicode;
- size_t size, varIndex;
- int option, i;
+ size_t size, varIndex, i;
+ int option;
Tcl_WideInt length;
#define MAX_STRINGS 11
const char *string, *strings[MAX_STRINGS+1];
@@ -1264,7 +1265,7 @@ TeststringobjCmd(
"appendself2", NULL
};
- if (objc < 3) {
+ if (objc + 1 < 4) {
wrongNumArgs:
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg ...?");
return TCL_ERROR;
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index 6d5e6ec..239a620 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -37,7 +37,7 @@ static const char checkCommand[] = "check";
typedef struct {
const char *cmdName; /* command name */
- Tcl_ObjCmdProc *proc; /* command proc */
+ Tcl_ObjCmdProc2 *proc; /* command proc */
int exportIt; /* if 1, export the command */
} CmdTable;
@@ -45,8 +45,8 @@ typedef struct {
* Declarations for functions defined in this file.
*/
-static Tcl_ObjCmdProc ProcBodyTestProcObjCmd;
-static Tcl_ObjCmdProc ProcBodyTestCheckObjCmd;
+static Tcl_ObjCmdProc2 ProcBodyTestProcObjCmd;
+static Tcl_ObjCmdProc2 ProcBodyTestCheckObjCmd;
static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe);
static int RegisterCommand(Tcl_Interp* interp,
const char *namesp, const CmdTable *cmdTablePtr);
@@ -152,7 +152,7 @@ RegisterCommand(
}
sprintf(buf, "%s::%s", namesp, cmdTablePtr->cmdName);
- Tcl_CreateObjCommand(interp, buf, cmdTablePtr->proc, 0, 0);
+ Tcl_CreateObjCommand2(interp, buf, cmdTablePtr->proc, 0, 0);
return TCL_OK;
}
@@ -228,7 +228,7 @@ static int
ProcBodyTestProcObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* the current interpreter */
- int objc, /* argument count */
+ size_t objc, /* argument count */
Tcl_Obj *const objv[]) /* arguments */
{
const char *fullName;
@@ -261,7 +261,7 @@ ProcBodyTestProcObjCmd(
* If a procedure, cmdPtr->objClientData is TclIsProc(cmdPtr).
*/
- if (cmdPtr->objClientData != TclIsProc(cmdPtr)) {
+ if (cmdPtr->objClientData2 != TclIsProc(cmdPtr)) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
"command \"", fullName, "\" is not a Tcl procedure", NULL);
return TCL_ERROR;
@@ -271,7 +271,7 @@ ProcBodyTestProcObjCmd(
* it is a Tcl procedure: the client data is the Proc structure
*/
- procPtr = (Proc *) cmdPtr->objClientData;
+ procPtr = (Proc *) cmdPtr->objClientData2;
if (procPtr == NULL) {
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "procedure \"",
fullName, "\" does not have a Proc struct!", NULL);
@@ -327,7 +327,7 @@ static int
ProcBodyTestCheckObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* the current interpreter */
- int objc, /* argument count */
+ size_t objc, /* argument count */
Tcl_Obj *const objv[]) /* arguments */
{
const char *version;
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index 6f37124..12ad969 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -119,7 +119,7 @@ static char *errorProcString;
TCL_DECLARE_MUTEX(threadMutex)
-static Tcl_ObjCmdProc ThreadObjCmd;
+static Tcl_ObjCmdProc2 ThreadObjCmd;
static int ThreadCreate(Tcl_Interp *interp, const char *script,
int joinable);
static int ThreadList(Tcl_Interp *interp);
@@ -169,7 +169,7 @@ TclThread_Init(
}
Tcl_MutexUnlock(&threadMutex);
- Tcl_CreateObjCommand(interp, "testthread", ThreadObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testthread", ThreadObjCmd, NULL, NULL);
return TCL_OK;
}
@@ -205,7 +205,7 @@ static int
ThreadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -220,7 +220,7 @@ ThreadObjCmd(
THREAD_WAIT, THREAD_ERRORPROC
} option;
- if (objc < 2) {
+ if (objc + 1 < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
@@ -245,7 +245,8 @@ ThreadObjCmd(
case THREAD_CANCEL: {
Tcl_WideInt id;
const char *result;
- int flags, arg;
+ int flags;
+ size_t arg;
if ((objc < 3) || (objc > 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? id ?result?");
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index d49c5c8..90fa59a 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -780,7 +780,7 @@ int
Tcl_AfterObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt ms = 0; /* Number of milliseconds to wait */
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 8999858..735571c 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -99,7 +99,7 @@ enum traceOptions {
#endif
};
typedef int (Tcl_TraceTypeObjCmd)(Tcl_Interp *interp, enum traceOptions optionIndex,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static Tcl_TraceTypeObjCmd TraceVariableObjCmd;
static Tcl_TraceTypeObjCmd TraceCommandObjCmd;
@@ -127,17 +127,17 @@ static Tcl_TraceTypeObjCmd *const traceSubCmds[] = {
static int CallTraceFunction(Tcl_Interp *interp, Trace *tracePtr,
Command *cmdPtr, const char *command, size_t numChars,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static char * TraceVarProc(void *clientData, Tcl_Interp *interp,
const char *name1, const char *name2, int flags);
static void TraceCommandProc(void *clientData,
Tcl_Interp *interp, const char *oldName,
const char *newName, int flags);
-static Tcl_CmdObjTraceProc TraceExecutionProc;
+static Tcl_CmdObjTraceProc2 TraceExecutionProc;
static int StringTraceProc(void *clientData,
Tcl_Interp *interp, int level,
const char *command, Tcl_Command commandInfo,
- int objc, Tcl_Obj *const objv[]);
+ size_t objc, Tcl_Obj *const objv[]);
static void StringTraceDeleteProc(void *clientData);
static void DisposeTraceResult(int flags, char *result);
static int TraceVarEx(Tcl_Interp *interp, const char *part1,
@@ -191,7 +191,7 @@ int
Tcl_TraceObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
#ifndef TCL_REMOVE_OBSOLETE_TRACES
@@ -399,7 +399,7 @@ static int
TraceExecutionObjCmd(
Tcl_Interp *interp, /* Current interpreter. */
enum traceOptions optionIndex, /* Add, info or remove */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name, *command;
@@ -647,7 +647,7 @@ static int
TraceCommandObjCmd(
Tcl_Interp *interp, /* Current interpreter. */
enum traceOptions optionIndex, /* Add, info or remove */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name, *command;
@@ -843,7 +843,7 @@ static int
TraceVariableObjCmd(
Tcl_Interp *interp, /* Current interpreter. */
enum traceOptions optionIndex, /* Add, info or remove */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name, *command;
@@ -1039,7 +1039,7 @@ TraceVariableObjCmd(
*----------------------------------------------------------------------
*/
-ClientData
+void *
Tcl_CommandTraceInfo(
Tcl_Interp *interp, /* Interpreter containing command. */
const char *cmdName, /* Name of command. */
@@ -1608,13 +1608,13 @@ TclCheckInterpTraces(
*/
if (tracePtr->flags & traceFlags) {
- if (tracePtr->proc == TraceExecutionProc) {
+ if (tracePtr->proc2 == TraceExecutionProc) {
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)tracePtr->clientData;
tcmdPtr->curFlags = traceFlags;
tcmdPtr->curCode = code;
}
- traceCode = tracePtr->proc(tracePtr->clientData, interp,
+ traceCode = tracePtr->proc2(tracePtr->clientData, interp,
curLevel, command, (Tcl_Command) cmdPtr, objc,
objv);
}
@@ -1677,7 +1677,7 @@ CallTraceFunction(
* command's source before substitutions. */
size_t numChars, /* The number of characters in the command's
* source. */
- int objc, /* Number of arguments for the command. */
+ size_t objc, /* Number of arguments for the command. */
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
{
Interp *iPtr = (Interp *) interp;
@@ -1696,7 +1696,7 @@ CallTraceFunction(
* Call the trace function then free allocated storage.
*/
- traceCode = tracePtr->proc(tracePtr->clientData, (Tcl_Interp *) iPtr,
+ traceCode = tracePtr->proc2(tracePtr->clientData, (Tcl_Interp *) iPtr,
iPtr->numLevels, commandCopy, (Tcl_Command) cmdPtr, objc, objv);
TclStackFree(interp, commandCopy);
@@ -1763,7 +1763,7 @@ TraceExecutionProc(
int level,
const char *command,
TCL_UNUSED(Tcl_Command),
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
int call = 0;
@@ -1818,7 +1818,7 @@ TraceExecutionProc(
if (call) {
Tcl_DString cmd, sub;
- int i, saveInterpFlags;
+ size_t i, saveInterpFlags;
Tcl_DStringInit(&cmd);
Tcl_DStringAppend(&cmd, tcmdPtr->command, tcmdPtr->length);
@@ -1925,7 +1925,7 @@ TraceExecutionProc(
tcmdPtr->startCmd = (char *)Tcl_Alloc(len);
memcpy(tcmdPtr->startCmd, command, len);
tcmdPtr->refCount++;
- tcmdPtr->stepTrace = Tcl_CreateObjTrace(interp, 0,
+ tcmdPtr->stepTrace = Tcl_CreateObjTrace2(interp, 0,
(tcmdPtr->flags & TCL_TRACE_ANY_EXEC) >> 2,
TraceExecutionProc, tcmdPtr, CommandObjTraceDeleted);
}
@@ -2074,7 +2074,7 @@ TraceVarProc(
/*
*----------------------------------------------------------------------
*
- * Tcl_CreateObjTrace --
+ * Tcl_CreateObjTrace/Tcl_CreateObjTrace2 --
*
* Arrange for a function to be called to trace command execution.
*
@@ -2087,7 +2087,7 @@ TraceVarProc(
* called to execute a Tcl command. Calls to proc will have the following
* form:
*
- * void proc(ClientData clientData,
+ * void proc(void * clientData,
* Tcl_Interp * interp,
* int level,
* const char * command,
@@ -2126,8 +2126,9 @@ TraceVarProc(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
typedef struct {
- Tcl_CmdObjTraceProc2 *proc;
+ Tcl_CmdObjTraceProc *proc;
Tcl_CmdObjTraceDeleteProc *delProc;
void *clientData;
} TraceWrapperInfo;
@@ -2138,10 +2139,13 @@ static int traceWrapperProc(
int level,
const char *command,
Tcl_Command commandInfo,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
TraceWrapperInfo *info = (TraceWrapperInfo *)clientData;
+ if (objc > INT_MAX) {
+ objc = -1; /* Signal Tcl_CmdObjTraceProc that objc is out of range */
+ }
return info->proc(info->clientData, interp, level, command, commandInfo, objc, objv);
}
@@ -2156,30 +2160,31 @@ static void traceWrapperDelProc(void *clientData)
}
Tcl_Trace
-Tcl_CreateObjTrace2(
+Tcl_CreateObjTrace(
Tcl_Interp *interp, /* Tcl interpreter */
int level, /* Maximum nesting level */
int flags, /* Flags, see above */
- Tcl_CmdObjTraceProc2 *proc, /* Trace callback */
+ Tcl_CmdObjTraceProc *proc, /* Trace callback */
void *clientData, /* Client data for the callback */
Tcl_CmdObjTraceDeleteProc *delProc)
/* Function to call when trace is deleted */
{
- TraceWrapperInfo *info = (TraceWrapperInfo *)Tcl_Alloc(sizeof(TraceWrapperInfo));
+ TraceWrapperInfo *info = (TraceWrapperInfo *)Tcl_Alloc(sizeof(TraceWrapperInfo));
info->proc = proc;
info->delProc = delProc;
info->clientData = clientData;
- return Tcl_CreateObjTrace(interp, level, flags,
+ return Tcl_CreateObjTrace2(interp, level, flags,
(proc ? traceWrapperProc : NULL),
info, traceWrapperDelProc);
}
+#endif /* TCL_NO_DEPRECATED */
Tcl_Trace
-Tcl_CreateObjTrace(
+Tcl_CreateObjTrace2(
Tcl_Interp *interp, /* Tcl interpreter */
int level, /* Maximum nesting level */
int flags, /* Flags, see above */
- Tcl_CmdObjTraceProc *proc, /* Trace callback */
+ Tcl_CmdObjTraceProc2 *proc2, /* Trace callback */
void *clientData, /* Client data for the callback */
Tcl_CmdObjTraceDeleteProc *delProc)
/* Function to call when trace is deleted */
@@ -2211,7 +2216,7 @@ Tcl_CreateObjTrace(
tracePtr = (Trace *)Tcl_Alloc(sizeof(Trace));
tracePtr->level = level;
- tracePtr->proc = proc;
+ tracePtr->proc2 = proc2;
tracePtr->clientData = clientData;
tracePtr->delProc = delProc;
tracePtr->nextPtr = iPtr->tracePtr;
@@ -2276,7 +2281,7 @@ Tcl_CreateTrace(
data->clientData = clientData;
data->proc = proc;
- return Tcl_CreateObjTrace(interp, level, 0, StringTraceProc,
+ return Tcl_CreateObjTrace2(interp, level, 0, StringTraceProc,
data, StringTraceDeleteProc);
}
@@ -2303,13 +2308,13 @@ StringTraceProc(
int level,
const char *command,
Tcl_Command commandInfo,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
StringTraceData *data = (StringTraceData *)clientData;
Command *cmdPtr = (Command *) commandInfo;
const char **argv; /* Args to pass to string trace proc */
- int i;
+ size_t i;
/*
* This is a bit messy because we have to emulate the old trace interface,
@@ -3036,7 +3041,7 @@ Tcl_UntraceVar2(
*----------------------------------------------------------------------
*/
-ClientData
+void *
Tcl_VarTraceInfo2(
Tcl_Interp *interp, /* Interpreter containing variable. */
const char *part1, /* Name of variable or array. */
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 337f923..2b442ef 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -185,7 +185,7 @@ static void ArrayPopulateSearch(Tcl_Interp *interp,
static void ArrayDoneSearch(Interp *iPtr, Var *varPtr,
ArraySearch *searchPtr);
static Tcl_NRPostProc ArrayForLoopCallback;
-static Tcl_ObjCmdProc ArrayForNRCmd;
+static Tcl_ObjCmdProc2 ArrayForNRCmd;
static void DeleteSearches(Interp *iPtr, Var *arrayVarPtr);
static void DeleteArray(Interp *iPtr, Tcl_Obj *arrayNamePtr,
Var *varPtr, int flags, int index);
@@ -209,7 +209,7 @@ static void UnsetVarStruct(Var *varPtr, Var *arrayPtr,
* TIP #508: [array default]
*/
-static Tcl_ObjCmdProc ArrayDefaultCmd;
+static Tcl_ObjCmdProc2 ArrayDefaultCmd;
static void DeleteArrayVar(Var *arrayPtr);
static void SetArrayDefault(Var *arrayPtr, Tcl_Obj *defaultObj);
@@ -1479,7 +1479,7 @@ int
Tcl_SetObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,/* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varValueObj;
@@ -2694,10 +2694,11 @@ int
Tcl_UnsetObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, flags = TCL_LEAVE_ERR_MSG;
+ size_t i;
+ int flags = TCL_LEAVE_ERR_MSG;
const char *name;
if (objc == 1) {
@@ -2761,13 +2762,13 @@ int
Tcl_AppendObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Var *varPtr, *arrayPtr;
Tcl_Obj *varValuePtr = NULL;
/* Initialized to avoid compiler warning. */
- int i;
+ size_t i;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "varName ?value ...?");
@@ -2826,7 +2827,7 @@ int
Tcl_LappendObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varValuePtr, *newValuePtr;
@@ -3032,17 +3033,17 @@ static int
ArrayForObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- return Tcl_NRCallObjProc(interp, ArrayForNRCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, ArrayForNRCmd, clientData, objc, objv);
}
static int
ArrayForNRCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *varListObj, *arrayNameObj, *scriptObj;
@@ -3273,7 +3274,7 @@ static int
ArrayStartSearchCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
@@ -3368,7 +3369,7 @@ static int
ArrayAnyMoreCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
@@ -3446,7 +3447,7 @@ static int
ArrayNextElementCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
@@ -3526,7 +3527,7 @@ static int
ArrayDoneSearchCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
@@ -3586,7 +3587,7 @@ static int
ArrayExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *)interp;
@@ -3626,7 +3627,7 @@ static int
ArrayGetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Var *varPtr, *varPtr2;
@@ -3786,7 +3787,7 @@ static int
ArrayNamesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
static const char *const options[] = {
@@ -3953,7 +3954,7 @@ static int
ArraySetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *arrayNameObj;
@@ -4130,7 +4131,7 @@ static int
ArraySizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
@@ -4189,7 +4190,7 @@ static int
ArrayStatsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
@@ -4243,7 +4244,7 @@ static int
ArrayUnsetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Var *varPtr, *varPtr2, *protectedVarPtr;
@@ -4811,14 +4812,15 @@ int
Tcl_GlobalObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
Tcl_Obj *objPtr, *tailPtr;
const char *varName;
const char *tail;
- int result, i;
+ int result;
+ size_t i;
/*
* If we are not executing inside a Tcl procedure, just return.
@@ -4915,14 +4917,15 @@ int
Tcl_VariableObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
const char *varName, *tail, *cp;
Var *varPtr, *arrayPtr;
Tcl_Obj *varValuePtr;
- int i, result;
+ size_t i;
+ int result;
Tcl_Obj *varNamePtr, *tailPtr;
for (i=1 ; i<objc ; i+=2) {
@@ -5048,7 +5051,7 @@ int
Tcl_UpvarObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
CallFrame *framePtr;
@@ -5864,7 +5867,7 @@ int
TclInfoVarsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -6055,7 +6058,7 @@ int
TclInfoGlobalsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *varName, *pattern;
@@ -6148,7 +6151,7 @@ int
TclInfoLocalsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -6455,7 +6458,7 @@ static int
ArrayDefaultCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const options[] = {
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index c7bf4f9..8b10c23 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -2218,7 +2218,7 @@ static int
ZipFSMountObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *mountPoint = NULL, *zipFile = NULL, *password = NULL;
@@ -2275,7 +2275,7 @@ static int
ZipFSMountBufferObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *mountPoint; /* Mount point path. */
@@ -2330,7 +2330,7 @@ static int
ZipFSRootObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(size_t) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *)) /*objv*/
{
Tcl_SetObjResult(interp, Tcl_NewStringObj(ZIPFS_VOLUME, -1));
@@ -2357,7 +2357,7 @@ static int
ZipFSUnmountObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
@@ -2388,7 +2388,7 @@ static int
ZipFSMkKeyObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int len, i = 0;
@@ -3460,7 +3460,7 @@ static int
ZipFSMkZipObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *stripPrefix, *password;
@@ -3485,7 +3485,7 @@ static int
ZipFSLMkZipObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *password;
@@ -3526,7 +3526,7 @@ static int
ZipFSMkImgObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *originFile, *stripPrefix, *password;
@@ -3553,7 +3553,7 @@ static int
ZipFSLMkImgObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *originFile, *password;
@@ -3595,7 +3595,7 @@ static int
ZipFSCanonicalObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *mntpoint = NULL;
@@ -3651,7 +3651,7 @@ static int
ZipFSExistsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *filename;
@@ -3704,7 +3704,7 @@ static int
ZipFSInfoObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *filename;
@@ -3754,7 +3754,7 @@ static int
ZipFSListObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *pattern = NULL;
@@ -3953,7 +3953,7 @@ static int
ZipFSTclLibraryObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(size_t) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *)) /*objv*/
{
if (!Tcl_IsSafe(interp)) {
@@ -5672,7 +5672,7 @@ TclZipfs_Init(
Tcl_GetEnsembleMappingDict(NULL, ensemble, &mapObj);
Tcl_DictObjPut(NULL, mapObj, Tcl_NewStringObj("find", -1),
Tcl_NewStringObj("::tcl::zipfs::find", -1));
- Tcl_CreateObjCommand(interp, "::tcl::zipfs::tcl_library_init",
+ Tcl_CreateObjCommand2(interp, "::tcl::zipfs::tcl_library_init",
ZipFSTclLibraryObjCmd, NULL, NULL);
Tcl_PkgProvide(interp, "tcl::zipfs", "2.0");
}
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 5effcb5..da23f47 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -171,11 +171,11 @@ static Tcl_DriverInputProc ZlibTransformInput;
static Tcl_DriverOutputProc ZlibTransformOutput;
static Tcl_DriverSetOptionProc ZlibTransformSetOption;
static Tcl_DriverWatchProc ZlibTransformWatch;
-static Tcl_ObjCmdProc ZlibCmd;
-static Tcl_ObjCmdProc ZlibStreamCmd;
-static Tcl_ObjCmdProc ZlibStreamAddCmd;
-static Tcl_ObjCmdProc ZlibStreamHeaderCmd;
-static Tcl_ObjCmdProc ZlibStreamPutCmd;
+static Tcl_ObjCmdProc2 ZlibCmd;
+static Tcl_ObjCmdProc2 ZlibStreamCmd;
+static Tcl_ObjCmdProc2 ZlibStreamAddCmd;
+static Tcl_ObjCmdProc2 ZlibStreamHeaderCmd;
+static Tcl_ObjCmdProc2 ZlibStreamPutCmd;
static void ConvertError(Tcl_Interp *interp, int code,
uLong adler);
@@ -185,7 +185,7 @@ static inline int Deflate(z_streamp strm, void *bufferPtr,
static void ExtractHeader(gz_header *headerPtr, Tcl_Obj *dictObj);
static int GenerateHeader(Tcl_Interp *interp, Tcl_Obj *dictObj,
GzipHeader *headerPtr, int *extraSizePtr);
-static int ZlibPushSubcmd(Tcl_Interp *interp, int objc,
+static int ZlibPushSubcmd(Tcl_Interp *interp, size_t objc,
Tcl_Obj *const objv[]);
static int ResultDecompress(ZlibChannelData *cd, char *buf,
int toRead, int flush, int *errorCodePtr);
@@ -194,7 +194,7 @@ static Tcl_Channel ZlibStackChannelTransform(Tcl_Interp *interp,
Tcl_Channel channel, Tcl_Obj *gzipHeaderDictPtr,
Tcl_Obj *compDictObj);
static void ZlibStreamCleanup(ZlibStreamHandle *zshPtr);
-static int ZlibStreamSubcmd(Tcl_Interp *interp, int objc,
+static int ZlibStreamSubcmd(Tcl_Interp *interp, size_t objc,
Tcl_Obj *const objv[]);
static inline void ZlibTransformEventTimerKill(ZlibChannelData *cd);
static void ZlibTransformTimerRun(void *clientData);
@@ -824,7 +824,7 @@ Tcl_ZlibStreamInit(
* Create the command.
*/
- zshPtr->cmd = Tcl_CreateObjCommand(interp, Tcl_DStringValue(&cmdname),
+ zshPtr->cmd = Tcl_CreateObjCommand2(interp, Tcl_DStringValue(&cmdname),
ZlibStreamCmd, zshPtr, ZlibStreamCmdDelete);
Tcl_DStringFree(&cmdname);
if (zshPtr->cmd == NULL) {
@@ -1949,11 +1949,11 @@ static int
ZlibCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
- int i, option, level = -1;
- size_t dlen = 0, start, buffersize = 0;
+ int option, level = -1;
+ size_t i, dlen = 0, start, buffersize = 0;
Tcl_WideInt wideLen;
Byte *data;
Tcl_Obj *headerDictObj;
@@ -2227,7 +2227,7 @@ ZlibCmd(
static int
ZlibStreamSubcmd(
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
static const char *const stream_formats[] = {
@@ -2238,7 +2238,8 @@ ZlibStreamSubcmd(
FMT_COMPRESS, FMT_DECOMPRESS, FMT_DEFLATE, FMT_GUNZIP, FMT_GZIP,
FMT_INFLATE
} fmt;
- int i, format, mode = 0, option, level;
+ size_t i;
+ int format, mode = 0, option, level;
enum objIndices {
OPT_COMPRESSION_DICTIONARY = 0,
OPT_GZIP_HEADER = 1,
@@ -2387,7 +2388,7 @@ ZlibStreamSubcmd(
static int
ZlibPushSubcmd(
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
static const char *const stream_formats[] = {
@@ -2399,7 +2400,7 @@ ZlibPushSubcmd(
FMT_INFLATE
} fmt;
Tcl_Channel chan;
- int chanMode, format, mode = 0, level, i;
+ int chanMode, format, mode = 0, level;
static const char *const pushCompressOptions[] = {
"-dictionary", "-header", "-level", NULL
};
@@ -2410,7 +2411,7 @@ ZlibPushSubcmd(
enum pushOptionsEnum {poDictionary, poHeader, poLevel, poLimit} option;
Tcl_Obj *headerObj = NULL, *compDictObj = NULL;
int limit = DEFAULT_BUFFER_SIZE;
- size_t dummy;
+ size_t i, dummy;
if (objc < 4) {
Tcl_WrongNumArgs(interp, 2, objv, "mode channel ?options...?");
@@ -2566,7 +2567,7 @@ static int
ZlibStreamCmd(
void *cd,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_ZlibStream zstream = (Tcl_ZlibStream)cd;
@@ -2692,11 +2693,12 @@ static int
ZlibStreamAddCmd(
void *cd,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_ZlibStream zstream = (Tcl_ZlibStream)cd;
- int code, buffersize = -1, flush = -1, i;
+ int code, buffersize = -1, flush = -1;
+ size_t i;
Tcl_Obj *obj, *compDictObj = NULL;
static const char *const add_options[] = {
"-buffer", "-dictionary", "-finalize", "-flush", "-fullflush", NULL
@@ -2819,11 +2821,12 @@ static int
ZlibStreamPutCmd(
void *cd,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
Tcl_ZlibStream zstream = (Tcl_ZlibStream)cd;
- int flush = -1, i;
+ int flush = -1;
+ size_t i;
Tcl_Obj *compDictObj = NULL;
static const char *const put_options[] = {
"-dictionary", "-finalize", "-flush", "-fullflush", NULL
@@ -2910,7 +2913,7 @@ static int
ZlibStreamHeaderCmd(
void *cd,
Tcl_Interp *interp,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
ZlibStreamHandle *zshPtr = (ZlibStreamHandle *)cd;
@@ -3946,7 +3949,7 @@ TclZlibInit(
* Create the public scripted interface to this file's functionality.
*/
- Tcl_CreateObjCommand(interp, "zlib", ZlibCmd, 0, 0);
+ Tcl_CreateObjCommand2(interp, "zlib", ZlibCmd, 0, 0);
/*
* Store the underlying configuration information.
diff --git a/library/init.tcl b/library/init.tcl
index 2646aa7..ceca663 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -19,7 +19,7 @@
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
-package require -exact tcl 9.0a4
+package require -exact tcl 9.1a0
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
diff --git a/tools/tsdPerf.c b/tools/tsdPerf.c
index 0bcc11b..e968f06 100644
--- a/tools/tsdPerf.c
+++ b/tools/tsdPerf.c
@@ -10,7 +10,7 @@ typedef struct {
static int
-tsdPerfSetObjCmd(void *cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) {
+tsdPerfSetObjCmd(void *cdata, Tcl_Interp *interp, size_t objc, Tcl_Obj *const *objv) {
TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf));
Tcl_WideInt i;
@@ -29,7 +29,7 @@ tsdPerfSetObjCmd(void *cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv
}
static int
-tsdPerfGetObjCmd(void *cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) {
+tsdPerfGetObjCmd(void *cdata, Tcl_Interp *interp, size_t objc, Tcl_Obj *const *objv) {
TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf));
@@ -40,12 +40,12 @@ tsdPerfGetObjCmd(void *cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv
int
Tsdperf_Init(Tcl_Interp *interp) {
- if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return TCL_ERROR;
}
- Tcl_CreateObjCommand(interp, "tsdPerfSet", tsdPerfSetObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "tsdPerfGet", tsdPerfGetObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "tsdPerfSet", tsdPerfSetObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "tsdPerfGet", tsdPerfGetObjCmd, NULL, NULL);
return TCL_OK;
}
diff --git a/unix/configure b/unix/configure
index ca94150..ac6e9ce 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for tcl 9.0.
+# Generated by GNU Autoconf 2.71 for tcl 9.1.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -608,8 +608,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='tcl'
PACKAGE_TARNAME='tcl'
-PACKAGE_VERSION='9.0'
-PACKAGE_STRING='tcl 9.0'
+PACKAGE_VERSION='9.1'
+PACKAGE_STRING='tcl 9.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1372,7 +1372,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tcl 9.0 to adapt to many kinds of systems.
+\`configure' configures tcl 9.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1434,7 +1434,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tcl 9.0:";;
+ short | recursive ) echo "Configuration of tcl 9.1:";;
esac
cat <<\_ACEOF
@@ -1551,7 +1551,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tcl configure 9.0
+tcl configure 9.1
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2019,7 +2019,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tcl $as_me 9.0, which was
+It was created by tcl $as_me 9.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2681,10 +2681,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-TCL_VERSION=9.0
+TCL_VERSION=9.1
TCL_MAJOR_VERSION=9
-TCL_MINOR_VERSION=0
-TCL_PATCH_LEVEL="a4"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VERSION=${TCL_VERSION}
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
@@ -11841,7 +11841,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tcl $as_me 9.0, which was
+This file was extended by tcl $as_me 9.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11900,7 +11900,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-tcl config.status 9.0
+tcl config.status 9.1
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/unix/configure.ac b/unix/configure.ac
index 29933bd..fe0826e 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
-AC_INIT([tcl],[9.0])
+AC_INIT([tcl],[9.1])
AC_PREREQ([2.69])
dnl This is only used when included from macosx/configure.ac
@@ -23,10 +23,10 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
#endif /* _TCLCONFIG */])
])
-TCL_VERSION=9.0
+TCL_VERSION=9.1
TCL_MAJOR_VERSION=9
-TCL_MINOR_VERSION=0
-TCL_PATCH_LEVEL="a4"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VERSION=${TCL_VERSION}
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c
index 579c323..f9177bb 100644
--- a/unix/dltest/pkga.c
+++ b/unix/dltest/pkga.c
@@ -35,12 +35,12 @@ static int
Pkga_EqObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
const char *str1, *str2;
- int len1, len2;
+ size_t len1, len2;
(void)dummy;
if (objc != 3) {
@@ -80,7 +80,7 @@ static int
Pkga_QuoteObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
(void)dummy;
@@ -124,8 +124,8 @@ Pkga_Init(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkga_eq", Pkga_EqObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "pkga_quote", Pkga_QuoteObjCmd, NULL,
+ Tcl_CreateObjCommand2(interp, "pkga_eq", Pkga_EqObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkga_quote", Pkga_QuoteObjCmd, NULL,
NULL);
return TCL_OK;
}
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index 651c132..72cf4a8 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -35,7 +35,7 @@ static int
Pkgb_SubObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int first, second;
@@ -77,7 +77,7 @@ static int
Pkgb_UnsafeObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
@@ -91,7 +91,7 @@ static int
Pkgb_DemoObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt numChars;
@@ -141,9 +141,9 @@ Pkgb_Init(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "pkgb_demo", Pkgb_DemoObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgb_unsafe", Pkgb_UnsafeObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgb_demo", Pkgb_DemoObjCmd, NULL, NULL);
return TCL_OK;
}
@@ -178,6 +178,6 @@ Pkgb_SafeInit(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgb_sub", Pkgb_SubObjCmd, NULL, NULL);
return TCL_OK;
}
diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c
index 8e9c829..befc843 100644
--- a/unix/dltest/pkgc.c
+++ b/unix/dltest/pkgc.c
@@ -35,7 +35,7 @@ static int
Pkgc_SubObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int first, second;
@@ -74,7 +74,7 @@ static int
Pkgc_UnsafeObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
@@ -116,8 +116,8 @@ Pkgc_Init(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "pkgc_unsafe", Pkgc_UnsafeObjCmd, NULL,
+ Tcl_CreateObjCommand2(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgc_unsafe", Pkgc_UnsafeObjCmd, NULL,
NULL);
return TCL_OK;
}
@@ -153,6 +153,6 @@ Pkgc_SafeInit(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgc_sub", Pkgc_SubObjCmd, NULL, NULL);
return TCL_OK;
}
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c
index 1b97d4c..3a07562 100644
--- a/unix/dltest/pkgd.c
+++ b/unix/dltest/pkgd.c
@@ -35,7 +35,7 @@ static int
Pkgd_SubObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int first, second;
@@ -74,7 +74,7 @@ static int
Pkgd_UnsafeObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
@@ -116,8 +116,8 @@ Pkgd_Init(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "pkgd_unsafe", Pkgd_UnsafeObjCmd, NULL,
+ Tcl_CreateObjCommand2(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgd_unsafe", Pkgd_UnsafeObjCmd, NULL,
NULL);
return TCL_OK;
}
@@ -153,6 +153,6 @@ Pkgd_SafeInit(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgd_sub", Pkgd_SubObjCmd, NULL, NULL);
return TCL_OK;
}
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index ec9fbfd..901e17c 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -35,7 +35,7 @@ static int
Pkgooa_StubsOKObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
@@ -151,6 +151,6 @@ Pkgooa_Init(
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "pkgooa_stubsok", Pkgooa_StubsOKObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "pkgooa_stubsok", Pkgooa_StubsOKObjCmd, NULL, NULL);
return TCL_OK;
}
diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c
index 16684a8..6a1f86a 100644
--- a/unix/dltest/pkgua.c
+++ b/unix/dltest/pkgua.c
@@ -122,7 +122,7 @@ static int
PkguaEqObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
@@ -167,7 +167,7 @@ static int
PkguaQuoteObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
(void)dummy;
@@ -225,10 +225,10 @@ Pkgua_Init(
cmdTokens = PkguaInterpToTokens(interp);
cmdTokens[0] =
- Tcl_CreateObjCommand(interp, "pkgua_eq", PkguaEqObjCmd, &cmdTokens[0],
+ Tcl_CreateObjCommand2(interp, "pkgua_eq", PkguaEqObjCmd, &cmdTokens[0],
CommandDeleted);
cmdTokens[1] =
- Tcl_CreateObjCommand(interp, "pkgua_quote", PkguaQuoteObjCmd,
+ Tcl_CreateObjCommand2(interp, "pkgua_quote", PkguaQuoteObjCmd,
&cmdTokens[1], CommandDeleted);
return TCL_OK;
}
diff --git a/unix/tcl.spec b/unix/tcl.spec
index f2d4bd5..b9ff9c5 100644
--- a/unix/tcl.spec
+++ b/unix/tcl.spec
@@ -4,7 +4,7 @@
Name: tcl
Summary: Tcl scripting language development environment
-Version: 9.0a4
+Version: 9.1a0
Release: 2
License: BSD
Group: Development/Languages
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 0692df5..a2fa5a4 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -1253,7 +1253,7 @@ int
Tcl_PidObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_Channel chan;
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index ccb9105..da93348 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -62,13 +62,13 @@ static const char *gotsig = "0";
* Forward declarations of functions defined later in this file:
*/
-static Tcl_ObjCmdProc TestalarmCmd;
-static Tcl_ObjCmdProc TestchmodCmd;
-static Tcl_ObjCmdProc TestfilehandlerCmd;
-static Tcl_ObjCmdProc TestfilewaitCmd;
-static Tcl_ObjCmdProc TestfindexecutableCmd;
-static Tcl_ObjCmdProc TestforkCmd;
-static Tcl_ObjCmdProc TestgotsigCmd;
+static Tcl_ObjCmdProc2 TestalarmCmd;
+static Tcl_ObjCmdProc2 TestchmodCmd;
+static Tcl_ObjCmdProc2 TestfilehandlerCmd;
+static Tcl_ObjCmdProc2 TestfilewaitCmd;
+static Tcl_ObjCmdProc2 TestfindexecutableCmd;
+static Tcl_ObjCmdProc2 TestforkCmd;
+static Tcl_ObjCmdProc2 TestgotsigCmd;
static Tcl_FileProc TestFileHandlerProc;
static void AlarmHandler(int signum);
@@ -93,19 +93,19 @@ int
TclplatformtestInit(
Tcl_Interp *interp) /* Interpreter to add commands to. */
{
- Tcl_CreateObjCommand(interp, "testchmod", TestchmodCmd,
+ Tcl_CreateObjCommand2(interp, "testchmod", TestchmodCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfilehandler", TestfilehandlerCmd,
+ Tcl_CreateObjCommand2(interp, "testfilehandler", TestfilehandlerCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfilewait", TestfilewaitCmd,
+ Tcl_CreateObjCommand2(interp, "testfilewait", TestfilewaitCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfindexecutable", TestfindexecutableCmd,
+ Tcl_CreateObjCommand2(interp, "testfindexecutable", TestfindexecutableCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfork", TestforkCmd,
+ Tcl_CreateObjCommand2(interp, "testfork", TestforkCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testalarm", TestalarmCmd,
+ Tcl_CreateObjCommand2(interp, "testalarm", TestalarmCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgotsig", TestgotsigCmd,
+ Tcl_CreateObjCommand2(interp, "testgotsig", TestgotsigCmd,
NULL, NULL);
return TCL_OK;
}
@@ -131,7 +131,7 @@ static int
TestfilehandlerCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Pipe *pipePtr;
@@ -152,7 +152,7 @@ TestfilehandlerCmd(
initialized = 1;
}
- if (objc < 2) {
+ if (objc + 1 < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "option ...");
return TCL_ERROR;
}
@@ -345,7 +345,7 @@ static int
TestfilewaitCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
int mask, result, timeout;
@@ -413,7 +413,7 @@ static int
TestfindexecutableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_Obj *saveName;
@@ -455,7 +455,7 @@ static int
TestforkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
pid_t pid;
@@ -501,7 +501,7 @@ static int
TestalarmCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
#ifdef SA_RESTART
@@ -579,7 +579,7 @@ static int
TestgotsigCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(size_t) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *))
{
Tcl_AppendResult(interp, gotsig, NULL);
@@ -610,12 +610,13 @@ static int
TestchmodCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
- int i, mode;
+ size_t i;
+ int mode;
- if (objc < 2) {
+ if (objc + 1 < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "mode file ?file ...?");
return TCL_ERROR;
}
diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c
index 09b16c5..da235fe 100644
--- a/unix/tclXtTest.c
+++ b/unix/tclXtTest.c
@@ -15,7 +15,7 @@
#include <X11/Intrinsic.h>
#include "tcl.h"
-static Tcl_ObjCmdProc TesteventloopCmd;
+static Tcl_ObjCmdProc2 TesteventloopCmd;
/*
* Functions defined in tclXtNotify.c for use by users of the Xt Notifier:
@@ -52,7 +52,7 @@ Tclxttest_Init(
}
XtToolkitInitialize();
InitNotifier();
- Tcl_CreateObjCommand(interp, "testeventloop", TesteventloopCmd,
+ Tcl_CreateObjCommand2(interp, "testeventloop", TesteventloopCmd,
NULL, NULL);
return TCL_OK;
}
@@ -79,14 +79,14 @@ static int
TesteventloopCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static int *framePtr = NULL;/* Pointer to integer on stack frame of
* innermost invocation of the "wait"
* subcommand. */
- if (objc < 2) {
+ if (objc + 1 < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "option ...");
return TCL_ERROR;
}
diff --git a/win/README b/win/README
index 9b001ba..f596c9b 100644
--- a/win/README
+++ b/win/README
@@ -1,4 +1,4 @@
-Tcl 9.0 for Windows
+Tcl 9.1 for Windows
1. Introduction
---------------
@@ -16,7 +16,7 @@ The information in this file is maintained on the web at:
In order to compile Tcl for Windows, you need the following:
- Tcl 9.0 Source Distribution (plus any patches)
+ Tcl 9.1 Source Distribution (plus any patches)
and
diff --git a/win/configure b/win/configure
index d47fc6cb..e6a0f8f 100755
--- a/win/configure
+++ b/win/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for tcl 9.0.
+# Generated by GNU Autoconf 2.71 for tcl 9.1.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -608,8 +608,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='tcl'
PACKAGE_TARNAME='tcl'
-PACKAGE_VERSION='9.0'
-PACKAGE_STRING='tcl 9.0'
+PACKAGE_VERSION='9.1'
+PACKAGE_STRING='tcl 9.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tcl 9.0 to adapt to many kinds of systems.
+\`configure' configures tcl 9.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1433,7 +1433,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tcl 9.0:";;
+ short | recursive ) echo "Configuration of tcl 9.1:";;
esac
cat <<\_ACEOF
@@ -1530,7 +1530,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tcl configure 9.0
+tcl configure 9.1
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1734,7 +1734,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tcl $as_me 9.0, which was
+It was created by tcl $as_me 9.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2399,10 +2399,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# /bin/sh. The bash shell seems to suffer from some strange failures.
SHELL=/bin/sh
-TCL_VERSION=9.0
+TCL_VERSION=9.1
TCL_MAJOR_VERSION=9
-TCL_MINOR_VERSION=0
-TCL_PATCH_LEVEL="a4"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
@@ -6498,7 +6498,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tcl $as_me 9.0, which was
+This file was extended by tcl $as_me 9.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6553,7 +6553,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-tcl config.status 9.0
+tcl config.status 9.1
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/win/configure.ac b/win/configure.ac
index c6ff202..1f39910 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -3,7 +3,7 @@
# generate the file "configure", which is run during Tcl installation
# to configure the system for the local environment.
-AC_INIT([tcl],[9.0])
+AC_INIT([tcl],[9.1])
AC_CONFIG_SRCDIR([../generic/tcl.h])
AC_PREREQ([2.69])
@@ -12,10 +12,10 @@ AC_PREREQ([2.69])
# /bin/sh. The bash shell seems to suffer from some strange failures.
SHELL=/bin/sh
-TCL_VERSION=9.0
+TCL_VERSION=9.1
TCL_MAJOR_VERSION=9
-TCL_MINOR_VERSION=0
-TCL_PATCH_LEVEL="a4"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
diff --git a/win/tcl.m4 b/win/tcl.m4
index fa9d4a9..9241ade 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -1009,13 +1009,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
#------------------------------------------------------------------------
AC_DEFUN([SC_WITH_TCL], [
- if test -d ../../tcl9.0$1/win; then
- TCL_BIN_DEFAULT=../../tcl9.0$1/win
+ if test -d ../../tcl9.1$1/win; then
+ TCL_BIN_DEFAULT=../../tcl9.1$1/win
else
- TCL_BIN_DEFAULT=../../tcl9.0/win
+ TCL_BIN_DEFAULT=../../tcl9.1/win
fi
- AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 9.0 binaries from DIR],
+ AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 9.1 binaries from DIR],
TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
if test ! -d $TCL_BIN_DIR; then
AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 3fd3d7e..a67892c 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -2738,7 +2738,7 @@ int
Tcl_PidObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_Channel chan;
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index c012b53..e69556a 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -37,13 +37,13 @@
* Forward declarations of functions defined later in this file:
*/
-static Tcl_ObjCmdProc TesteventloopCmd;
-static Tcl_ObjCmdProc TestvolumetypeCmd;
-static Tcl_ObjCmdProc TestwinclockCmd;
-static Tcl_ObjCmdProc TestwinsleepCmd;
-static Tcl_ObjCmdProc TestExceptionCmd;
+static Tcl_ObjCmdProc2 TesteventloopCmd;
+static Tcl_ObjCmdProc2 TestvolumetypeCmd;
+static Tcl_ObjCmdProc2 TestwinclockCmd;
+static Tcl_ObjCmdProc2 TestwinsleepCmd;
+static Tcl_ObjCmdProc2 TestExceptionCmd;
static int TestplatformChmod(const char *nativePath, int pmode);
-static Tcl_ObjCmdProc TestchmodCmd;
+static Tcl_ObjCmdProc2 TestchmodCmd;
/*
*----------------------------------------------------------------------
@@ -70,13 +70,13 @@ TclplatformtestInit(
* Add commands for platform specific tests for Windows here.
*/
- Tcl_CreateObjCommand(interp, "testchmod", TestchmodCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testeventloop", TesteventloopCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testvolumetype", TestvolumetypeCmd,
+ Tcl_CreateObjCommand2(interp, "testchmod", TestchmodCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testeventloop", TesteventloopCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testvolumetype", TestvolumetypeCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testwinclock", TestwinclockCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testwinsleep", TestwinsleepCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexcept", TestExceptionCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testwinclock", TestwinclockCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testwinsleep", TestwinsleepCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexcept", TestExceptionCmd, NULL, NULL);
return TCL_OK;
}
@@ -102,14 +102,14 @@ static int
TesteventloopCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static int *framePtr = NULL;/* Pointer to integer on stack frame of
* innermost invocation of the "wait"
* subcommand. */
- if (objc < 2) {
+ if (objc + 1 < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "option ...");
return TCL_ERROR;
}
@@ -178,7 +178,7 @@ static int
TestvolumetypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ size_t objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
#define VOL_BUF_SIZE 32
@@ -244,7 +244,7 @@ static int
TestwinclockCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Argument count */
+ size_t objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
{
static const FILETIME posixEpoch = { 0xD53E8000, 0x019DB1DE };
@@ -293,7 +293,7 @@ static int
TestwinsleepCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
int ms;
@@ -336,7 +336,7 @@ static int
TestExceptionCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Argument count */
+ size_t objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
{
static const char *const cmds[] = {
@@ -624,12 +624,13 @@ static int
TestchmodCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Parameter count */
+ size_t objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
- int i, mode;
+ size_t i;
+ int mode;
- if (objc < 2) {
+ if (objc + 1 < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "mode file ?file ...?");
return TCL_ERROR;
}