Index: .github/workflows/win-build.yml
==================================================================
--- .github/workflows/win-build.yml
+++ .github/workflows/win-build.yml
@@ -20,11 +20,10 @@
working-directory: win
strategy:
matrix:
config:
- ""
- - "CHECKS=nodep"
- "OPTS=static"
- "OPTS=noembed"
- "OPTS=symbols"
- "OPTS=symbols STATS=compdbg,memdbg"
# Using powershell means we need to explicitly stop on failure
@@ -64,11 +63,10 @@
working-directory: win
strategy:
matrix:
config:
- ""
- - "CFLAGS=-DTCL_NO_DEPRECATED=1"
- "--disable-shared"
- "--disable-zipfs"
- "--enable-symbols"
- "--enable-symbols=mem"
- "--enable-symbols=all"
Index: README.md
==================================================================
--- README.md
+++ README.md
@@ -1,21 +1,31 @@
# README: Tcl
-This is the **Tcl 9.0.1** source distribution.
+This is the **Tcl 9.1a0** source distribution.
You can get any source release of Tcl from [our distribution
site](https://sourceforge.net/projects/tcl/files/Tcl/).
-9.0 (production release, daily build)
-[![Build Status](https://github.com/tcltk/tcl/actions/workflows/linux-build.yml/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions/workflows/linux-build.yml?query=branch%3Amain)
-[![Build Status](https://github.com/tcltk/tcl/actions/workflows/win-build.yml/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions/workflows/win-build.yml?query=branch%3Amain)
-[![Build Status](https://github.com/tcltk/tcl/actions/workflows/mac-build.yml/badge.svg?branch=main)](https://github.com/tcltk/tcl/actions/workflows/mac-build.yml?query=branch%3Amain)
+8.6 (production release, daily build)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-6-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-6-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-6-branch)
+
+8.7 (in development, daily build))
+[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-branch)
+[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-branch)
+
+9.0 (in development, daily build))
+[![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)
-8.7 (in development, daily build)
-[![Build Status](https://github.com/tcltk/tcl/actions/workflows/linux-build.yml/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions/workflows/linux-build.yml?query=branch%3Acore-8-branch)
-[![Build Status](https://github.com/tcltk/tcl/actions/workflows/win-build.yml/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions/workflows/win-build.yml?query=branch%3Acore-8-branch)
-[![Build Status](https://github.com/tcltk/tcl/actions/workflows/mac-build.yml/badge.svg?branch=core-8-branch)](https://github.com/tcltk/tcl/actions/workflows/mac-build.yml?query=branch%3Acore-8-branch)
+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)
2. [Documentation](#doc)
3. [Compiling and installing Tcl](#build)
Index: changes.md
==================================================================
--- changes.md
+++ changes.md
@@ -2,149 +2,14 @@
The source code for Tcl is managed by fossil. Tcl developers coordinate all
changes to the Tcl source code at
> [Tcl Source Code](https://core.tcl-lang.org/tcl/timeline)
-Release Tcl 9.0.1 arises from the check-in with tag `core-9-0-1`.
-
-## Changes since Tk 9.0.0
- - [zlib-8.8, zlib-8.16 fail on Fedora 40, gcc 14.1.1](https://core.tcl-lang.org/tcl/tktview/73d5cb)
-
-Release Tcl 9.0.0 arises from the check-in with tag `core-9-0-0`.
-
-Highlighted differences between Tcl 9.0 and Tcl 8.6 are summarized below,
+Release Tcl 9.1a0 arises from the check-in with tag core-9-1-a0.
+
+Highlighted differences between Tcl 9.1 and Tcl 9.0 are summarized below,
with focus on changes important to programmers using the Tcl library and
writing Tcl scripts.
-# Major Features
-
-## 64-bit capacity: Data values larger than 2Gb
- - Strings can be any length (that fits in your available memory)
- - Lists and dictionaries can have very large numbers of elements
-
-## Internationalization of text
- - Full Unicode range of codepoints
- - New encodings: `utf-16`/`utf-32`/`ucs-2`(`le`|`be`), `CESU-8`, etc.
- - `encoding` options `-profile`, `-failindex` manage encoding of I/O.
- - `msgcat` supports custom locale search list
- - `source` defaults to `-encoding utf-8`
-
-## Zip filesystems and attached archives.
- - Packaging of the Tcl script library with the Tcl binary library,
- meaning that the `TCL_LIBRARY` environment variable is usually not required.
- - Packaging of an application into a virtual filesystem is now a supported
- core Tcl feature.
-
-## Unix notifiers available using `epoll()` or `kqueue()`
- - This relieves limits on file descriptors imposed by legacy `select()` and fixes a performance bottleneck.
-
-# Incompatibilities
-
-## Notable incompatibilities
- - Unqualified varnames resolved in current namespace, not global.
- Note that in almost all cases where this causes a change, the change is actually the removal of a latent bug.
- - No `--disable-threads` build option. Always thread-enabled.
- - I/O malencoding default response: raise error (`-profile strict`)
- - Windows platform needs Windows 7 or Windows Server 2008 R2 or later
- - Ended interpretation of `~` as home directory in pathnames.
- (See `file home` and `file tildeexpand` for replacements when you need them.)
- - Removed the `identity` encoding.
- (There were only ever very few valid use cases for this; almost all uses
- were systematically wrong.)
- - Removed the encoding alias `binary` to `iso8859-1`.
- - `$::tcl_precision` no longer controls string generation of doubles.
- (If you need a particular precision, use `format`.)
- - Removed pre-Tcl 8 legacies: `case`, `puts` and `read` variant syntaxes.
- - Removed subcommands [`trace variable`|`vdelete`|`vinfo`]
- - Removed `-eofchar` option for write channels.
- - On Windows 10+ (Version 1903 or higher), system encoding is always utf-8.
- - `%b`/`%d`/`%o`/`%x` format modifiers (without size modifier) for `format`
- and `scan` always truncate to 32-bits on all platforms.
- - `%L` size modifier for `scan` no longer truncates to 64-bit.
- - Removed command `::tcl::unsupported::inject`.
- (See `coroinject` and `coroprobe` for supported commands with significantly
- more comprehensible semantics.)
-
-## Incompatibilities in C public interface
- - Extensions built against Tcl 8.6 and before will not work with Tcl 9.0;
- ABI compatibility was a non-goal for 9.0. In _most_ cases, rebuilding
- against Tcl 9.0 should work except when a removed API function is used.
- - Many arguments expanded type from `int` to `Tcl_Size`, a signed integer type
- large enough to support 64-bit sized memory objects.
- The constant `TCL_AUTO_LENGTH` is a value of that type that indicates that
- the length should be obtained using an appropriate function (typically `strlen()` for `char *` values).
- - Ended support for `Tcl_ChannelTypeVersion` less than 5
- - Introduced versioning of the `Tcl_ObjType` struct
- - Removed macros `CONST*`: Tcl 9 support means dropping Tcl 8.3 support.
- (Replaced with standard C `const` keyword going forward.)
- - Removed registration of several `Tcl_ObjType`s.
- - Removed API functions:
-
- `Tcl_Backslash()`,
- `Tcl_*VA()`,
- `Tcl_*MathFunc*()`,
- `Tcl_MakeSafe()`,
- `Tcl_(Save|Restore|Discard|Free)Result()`,
- `Tcl_EvalTokens()`,
- `Tcl_(Get|Set)DefaultEncodingDir()`,
- `Tcl_UniCharN(case)cmp()`,
- `Tcl_UniCharCaseMatch()`
-
- - Revised many internals; beware reliance on undocumented behaviors.
-
-# New Features
-
-## New commands
- - `array default` — Specify default values for arrays (note that this alters the behaviour of `append`, `incr`, `lappend`).
- - `array for` — Cheap iteration over an array's contents.
- - `chan isbinary` — Test if a channel is configured to work with binary data.
- - `coroinject`, `coroprobe` — Interact with paused coroutines.
- - `clock add weekdays` — Clock arithmetic with week days.
- - `const`, `info const*` — Commands for defining constants (variables that can't be modified).
- - `dict getwithdefault` — Define a fallback value to use when `dict get` would otherwise fail.
- - `file home` — Get the user home directory.
- - `file tempdir` — Create a temporary directory.
- - `file tildeexpand` — Expand a file path containing a `~`.
- - `info commandtype` — Introspection for the kinds of commands.
- - `ledit` — Equivalent to `lreplace` but on a list in a variable.
- - `lpop` — Remove an item from a list in a variable.
- - `lremove` — Remove a sublist from a list in a variable.
- - `lseq` — Generate a list of numbers in a sequence.
- - `package files` — Describe the contents of a package.
- - `string insert` — Insert a string as a substring of another string.
- - `string is dict` — Test whether a string is a dictionary.
- - `tcl::process` — Commands for working with subprocesses.
- - `*::build-info` — Obtain information about the build of Tcl.
- - `readFile`, `writeFile`, `foreachLine` — Simple procedures for basic working with files.
- - `tcl::idna::*` — Commands for working with encoded DNS names.
-
-## New command options
- - `chan configure ... -inputmode ...` — Support for raw terminal input and reading passwords.
- - `clock scan ... -validate ...`
- - `info loaded ... ?prefix?`
- - `lsearch ... -stride ...` — Search a list by groups of items.
- - `regsub ... -command ...` — Generate the replacement for a regular expression by calling a command.
- - `socket ... -nodelay ... -keepalive ...`
- - `vwait` controlled by several new options
- - `expr` string comparators `lt`, `gt`, `le`, `ge`
- - `expr` supports comments inside expressions
-
-## Numbers
- - 0NNN
format is no longer octal interpretation. Use 0oNNN
.
- - 0dNNNN
format to compel decimal interpretation.
- - NN_NNN_NNN
, underscores in numbers for optional readability
- - Functions: `isinf()`, `isnan()`, `isnormal()`, `issubnormal()`, `isunordered()`
- - Command: `fpclassify`
- - Function `int()` no longer truncates to word size
-
-## TclOO facilities
- - private variables and methods
- - class variables and methods
- - abstract and singleton classes
- - configurable properties
- - `method -export`, `method -unexport`
-
-# Known bugs
- - [changed behaviour wrt command names, namespaces and resolution](https://core.tcl-lang.org/tcl/tktview/f14b33)
- - [windows dos device paths inconsistencies and missing functionality](https://core.tcl-lang.org/tcl/tktview/d8f121)
- - [Temporary folder with file "tcl9registry13.dll" remains after "exit"](https://core.tcl-lang.org/tcl/tktview/6ce3c0)
+## Continued 64-bit capacity: Command line arguments larger than 2Gb
+
Index: doc/zipfs.n
==================================================================
--- doc/zipfs.n
+++ doc/zipfs.n
@@ -188,11 +188,11 @@
be silently overwritten.
.RS
.PP
If the \fIinfile\fR parameter is specified, this file is prepended in front of
the ZIP archive, otherwise the file returned by \fBinfo nameofexecutable\fR
-(i.e., the executable file of the running process,
+<(i.e., the executable file of the running process,
typically \fBwish\fR or \fBtclsh\fR) is used. If the
\fIpassword\fR parameter is not the empty string, an obfuscated version of that password
(see \fBzipfs mkkey\fR) is placed between the image and ZIP chunks of the
output file and the contents of the ZIP chunk are protected with that
password.
Index: generic/tcl.decls
==================================================================
--- generic/tcl.decls
+++ generic/tcl.decls
@@ -38,26 +38,26 @@
}
declare 2 {
TCL_NORETURN void Tcl_Panic(const char *format, ...)
}
declare 3 {
- void *Tcl_Alloc(TCL_HASH_TYPE size)
+ void *Tcl_Alloc(size_t size)
}
declare 4 {
void Tcl_Free(void *ptr)
}
declare 5 {
- void *Tcl_Realloc(void *ptr, TCL_HASH_TYPE size)
+ void *Tcl_Realloc(void *ptr, size_t size)
}
declare 6 {
- void *Tcl_DbCkalloc(TCL_HASH_TYPE size, const char *file, int line)
+ void *Tcl_DbCkalloc(size_t size, const char *file, int line)
}
declare 7 {
void Tcl_DbCkfree(void *ptr, const char *file, int line)
}
declare 8 {
- void *Tcl_DbCkrealloc(void *ptr, TCL_HASH_TYPE size,
+ void *Tcl_DbCkrealloc(void *ptr, size_t size,
const char *file, int line)
}
# Tcl_CreateFileHandler and Tcl_DeleteFileHandler are only available on Unix,
# but they are part of the old generic interface, so we include them here for
@@ -127,21 +127,10 @@
Tcl_Obj *Tcl_DuplicateObj(Tcl_Obj *objPtr)
}
declare 30 {
void TclFreeObj(Tcl_Obj *objPtr)
}
-declare 31 {
- int Tcl_GetBoolean(Tcl_Interp *interp, const char *src, int *intPtr)
-}
-declare 32 {
- int Tcl_GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
- int *intPtr)
-}
-# Only available in Tcl 8.x, NULL in Tcl 9.0
-declare 33 {
- unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, Tcl_Size *numBytesPtr)
-}
declare 34 {
int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr)
}
declare 35 {
int Tcl_GetDoubleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
@@ -257,14 +246,10 @@
void *clientData)
}
declare 80 {
void Tcl_CancelIdleCall(Tcl_IdleProc *idleProc, void *clientData)
}
-# Only available in Tcl 8.x, NULL in Tcl 9.0
-declare 81 {
- int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan)
-}
declare 82 {
int Tcl_CommandComplete(const char *cmd)
}
declare 83 {
char *Tcl_Concat(Tcl_Size argc, const char *const *argv)
@@ -1215,11 +1200,11 @@
declare 392 {
void Tcl_MutexFinalize(Tcl_Mutex *mutex)
}
declare 393 {
int Tcl_CreateThread(Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc,
- void *clientData, TCL_HASH_TYPE stackSize, int flags)
+ void *clientData, size_t stackSize, int flags)
}
# Introduced in 8.3.2
declare 394 {
Tcl_Size Tcl_ReadRaw(Tcl_Channel chan, char *dst, Tcl_Size bytesToRead)
@@ -1322,20 +1307,20 @@
declare 427 {
void Tcl_UntraceCommand(Tcl_Interp *interp, const char *varName,
int flags, Tcl_CommandTraceProc *proc, void *clientData)
}
declare 428 {
- void *Tcl_AttemptAlloc(TCL_HASH_TYPE size)
+ void *Tcl_AttemptAlloc(size_t size)
}
declare 429 {
- void *Tcl_AttemptDbCkalloc(TCL_HASH_TYPE size, const char *file, int line)
+ void *Tcl_AttemptDbCkalloc(size_t size, const char *file, int line)
}
declare 430 {
- void *Tcl_AttemptRealloc(void *ptr, TCL_HASH_TYPE size)
+ void *Tcl_AttemptRealloc(void *ptr, size_t size)
}
declare 431 {
- void *Tcl_AttemptDbCkrealloc(void *ptr, TCL_HASH_TYPE size,
+ void *Tcl_AttemptDbCkrealloc(void *ptr, size_t size,
const char *file, int line)
}
declare 432 {
int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, Tcl_Size length)
}
@@ -2142,11 +2127,11 @@
declare 636 {
void Tcl_FreeInternalRep(Tcl_Obj *objPtr)
}
declare 637 {
char *Tcl_InitStringRep(Tcl_Obj *objPtr, const char *bytes,
- TCL_HASH_TYPE numBytes)
+ size_t numBytes)
}
declare 638 {
Tcl_ObjInternalRep *Tcl_FetchInternalRep(Tcl_Obj *objPtr, const Tcl_ObjType *typePtr)
}
declare 639 {
Index: generic/tcl.h
==================================================================
--- generic/tcl.h
+++ generic/tcl.h
@@ -47,18 +47,19 @@
*/
#if !defined(TCL_MAJOR_VERSION)
# define TCL_MAJOR_VERSION 9
#endif
-#if TCL_MAJOR_VERSION == 9
-# define TCL_MINOR_VERSION 0
-# define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
-# define TCL_RELEASE_SERIAL 1
-
-# define TCL_VERSION "9.0"
-# define TCL_PATCH_LEVEL "9.0.1"
-#endif /* TCL_MAJOR_VERSION */
+#if TCL_MAJOR_VERSION != 9
+# error "This header-file is for Tcl 9 only"
+#endif
+#define TCL_MINOR_VERSION 1
+#define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE
+#define TCL_RELEASE_SERIAL 0
+
+#define TCL_VERSION "9.1"
+#define TCL_PATCH_LEVEL "9.1a0"
#if defined(RC_INVOKED)
/*
* Utility macros: STRINGIFY takes an argument and wraps it in "" (double
* quotation marks), JOIN joins two arguments.
@@ -319,28 +320,16 @@
#define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val)))
#define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val)))
#define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
#define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
-#if TCL_MAJOR_VERSION < 9
- typedef int Tcl_Size;
-# define TCL_SIZE_MAX ((int)(((unsigned int)-1)>>1))
-# define TCL_SIZE_MODIFIER ""
-#else
- typedef ptrdiff_t Tcl_Size;
-# define TCL_SIZE_MAX ((Tcl_Size)(((size_t)-1)>>1))
-# define TCL_SIZE_MODIFIER TCL_T_MODIFIER
-#endif /* TCL_MAJOR_VERSION */
+typedef ptrdiff_t Tcl_Size;
+#define TCL_SIZE_MAX ((Tcl_Size)(((size_t)-1)>>1))
+#define TCL_SIZE_MODIFIER TCL_T_MODIFIER
#ifdef _WIN32
-# if TCL_MAJOR_VERSION > 8 || defined(_WIN64) || defined(_USE_64BIT_TIME_T)
- typedef struct __stat64 Tcl_StatBuf;
-# elif defined(_USE_32BIT_TIME_T)
- typedef struct _stati64 Tcl_StatBuf;
-# else
- typedef struct _stat32i64 Tcl_StatBuf;
-# endif
+ typedef struct __stat64 Tcl_StatBuf;
#elif defined(__CYGWIN__)
typedef struct {
unsigned st_dev;
unsigned short st_ino;
unsigned short st_mode;
@@ -461,32 +450,22 @@
* relative to the start of the match string, not the beginning of the entire
* string.
*/
typedef struct Tcl_RegExpIndices {
-#if TCL_MAJOR_VERSION > 8
Tcl_Size start; /* Character offset of first character in
* match. */
Tcl_Size end; /* Character offset of first character after
* the match. */
-#else
- long start;
- long end;
-#endif
} Tcl_RegExpIndices;
typedef struct Tcl_RegExpInfo {
Tcl_Size nsubs; /* Number of subexpressions in the compiled
* expression. */
Tcl_RegExpIndices *matches; /* Array of nsubs match offset pairs. */
-#if TCL_MAJOR_VERSION > 8
Tcl_Size extendStart; /* The offset at which a subsequent match
* might begin. */
-#else
- long extendStart;
- long reserved; /* Reserved for later use. */
-#endif
} Tcl_RegExpInfo;
/*
* Picky compilers complain if this typdef doesn't appear before the struct's
* reference in tclDecls.h.
@@ -554,16 +533,18 @@
typedef void (Tcl_ChannelProc) (void *clientData, int mask);
typedef void (Tcl_CloseProc) (void *data);
typedef void (Tcl_CmdDeleteProc) (void *clientData);
typedef int (Tcl_CmdProc) (void *clientData, Tcl_Interp *interp,
int argc, const char *argv[]);
+#ifndef TCL_NO_DEPRECATED
typedef void (Tcl_CmdTraceProc) (void *clientData, Tcl_Interp *interp,
int level, char *command, Tcl_CmdProc *proc,
void *cmdClientData, int argc, const char *argv[]);
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 void (Tcl_CmdObjTraceDeleteProc) (void *clientData);
typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
struct Tcl_Obj *dupPtr);
typedef int (Tcl_EncodingConvertProc) (void *clientData, const char *src,
int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
@@ -579,13 +560,14 @@
typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr);
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);
-#if TCL_MAJOR_VERSION > 8
+#endif /* TCL_NO_DEPRECATED */
typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
Tcl_Size objc, struct Tcl_Obj *const *objv);
typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
Tcl_Size level, const char *command, Tcl_Command commandInfo, Tcl_Size objc,
struct Tcl_Obj *const *objv);
@@ -592,15 +574,10 @@
typedef void (Tcl_FreeProc) (void *blockPtr);
#define Tcl_ExitProc Tcl_FreeProc
#define Tcl_FileFreeProc Tcl_FreeProc
#define Tcl_FileFreeProc Tcl_FreeProc
#define Tcl_EncodingFreeProc Tcl_FreeProc
-#else
-#define Tcl_ObjCmdProc2 Tcl_ObjCmdProc
-#define Tcl_CmdObjTraceProc2 Tcl_CmdObjTraceProc
-typedef void (Tcl_FreeProc) (char *blockPtr);
-#endif
typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
typedef void (Tcl_PanicProc) (const char *format, ...);
typedef void (Tcl_TcpAcceptProc) (void *callbackData, Tcl_Channel chan,
char *address, int port);
@@ -665,11 +642,10 @@
* type's internal representation. */
Tcl_SetFromAnyProc *setFromAnyProc;
/* Called to convert the object's internal rep
* to this type. Frees the internal rep of the
* old type. Returns TCL_ERROR on failure. */
-#if TCL_MAJOR_VERSION > 8
size_t version; /* Version field for future-proofing. */
/* List emulation functions - ObjType Version 1 */
Tcl_ObjTypeLengthProc *lengthProc;
/* Return the [llength] of the AbstractList */
@@ -689,25 +665,18 @@
/* Replace sublist with another sublist */
Tcl_ObjTypeInOperatorProc *inOperProc;
/* "in" and "ni" expr list operation.
* Determine if the given string value matches
* an element in the list. */
-#endif
} Tcl_ObjType;
-#if TCL_MAJOR_VERSION > 8
-# define TCL_OBJTYPE_V0 0, \
- 0,0,0,0,0,0,0,0 /* Pre-Tcl 9 */
-# define TCL_OBJTYPE_V1(a) offsetof(Tcl_ObjType, indexProc), \
- a,0,0,0,0,0,0,0 /* Tcl 9 Version 1 */
-# define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) sizeof(Tcl_ObjType), \
- a,b,c,d,e,f,g,h /* Tcl 9 - AbstractLists */
-#else
-# define TCL_OBJTYPE_V0 /* just empty */
-# define TCL_OBJTYPE_V1(a) /* just empty */
-# define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) /* just empty */
-#endif
+#define TCL_OBJTYPE_V0 0, \
+ 0,0,0,0,0,0,0,0 /* Pre-Tcl 9 */
+#define TCL_OBJTYPE_V1(a) offsetof(Tcl_ObjType, indexProc), \
+ a,0,0,0,0,0,0,0 /* Tcl 9 Version 1 */
+#define TCL_OBJTYPE_V2(a,b,c,d,e,f,g,h) sizeof(Tcl_ObjType), \
+ a,b,c,d,e,f,g,h /* Tcl 9 - AbstractLists */
/*
* The following structure stores an internal representation (internalrep) for
* a Tcl value. An internalrep is associated with an Tcl_ObjType when both
* are stored in the same Tcl_Obj. The routines of the Tcl_ObjType govern
@@ -842,12 +811,17 @@
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;
/* Function to call when command is
* deleted. */
@@ -945,15 +919,11 @@
/*
* Flags that may be passed to Tcl_UniCharToUtf.
* TCL_COMBINE Combine surrogates
*/
-#if TCL_MAJOR_VERSION > 8
-# define TCL_COMBINE 0x1000000
-#else
-# define TCL_COMBINE 0
-#endif
+#define TCL_COMBINE 0x1000000
/*
*----------------------------------------------------------------------------
* Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
* WARNING: these bit choices must not conflict with the bit choices for
* evalFlag bits in tclInt.h!
@@ -1054,15 +1024,11 @@
*----------------------------------------------------------------------------
* Forward declarations of Tcl_HashTable and related types.
*/
#ifndef TCL_HASH_TYPE
-#if TCL_MAJOR_VERSION > 8
-# define TCL_HASH_TYPE size_t
-#else
-# define TCL_HASH_TYPE unsigned
-#endif
+# define TCL_HASH_TYPE size_t
#endif
typedef struct Tcl_HashKeyType Tcl_HashKeyType;
typedef struct Tcl_HashTable Tcl_HashTable;
typedef struct Tcl_HashEntry Tcl_HashEntry;
@@ -1183,19 +1149,14 @@
* **bucketPtr. */
Tcl_Size numEntries; /* Total number of entries present in
* table. */
Tcl_Size rebuildSize; /* Enlarge table when numEntries gets to be
* this large. */
-#if TCL_MAJOR_VERSION > 8
size_t mask; /* Mask value used in hashing function. */
-#endif
int downShift; /* Shift count used in hashing function.
* Designed to use high-order bits of
* randomized keys. */
-#if TCL_MAJOR_VERSION < 9
- int mask; /* Mask value used in hashing function. */
-#endif
int keyType; /* Type of keys used in this table. It's
* either TCL_CUSTOM_KEYS, TCL_STRING_KEYS,
* TCL_ONE_WORD_KEYS, or an integer giving the
* number of ints that is the size of the
* key. */
@@ -1309,16 +1270,12 @@
* absolute time (the number of seconds from the epoch) or as an elapsed time.
* On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
*/
typedef struct Tcl_Time {
-#if TCL_MAJOR_VERSION > 8
long long sec; /* Seconds. */
-#else
- long sec; /* Seconds. */
-#endif
-#if defined(_CYGWIN_) && TCL_MAJOR_VERSION > 8
+#if defined(_CYGWIN_)
int usec; /* Microseconds. */
#else
long usec; /* Microseconds. */
#endif
} Tcl_Time;
@@ -1365,15 +1322,11 @@
/*
* Value to use as the closeProc for a channel that supports the close2Proc
* interface.
*/
-#if TCL_MAJOR_VERSION > 8
-# define TCL_CLOSE2PROC NULL
-#else
-# define TCL_CLOSE2PROC ((void *) 1)
-#endif
+#define TCL_CLOSE2PROC NULL
/*
* Channel version tag. This was introduced in 8.3.2/8.4.
*/
@@ -1917,16 +1870,14 @@
Tcl_Size numTokens; /* Total number of tokens in command. */
Tcl_Size tokensAvailable; /* Total number of tokens available at
* *tokenPtr. */
int errorType; /* One of the parsing error types defined
* above. */
-#if TCL_MAJOR_VERSION > 8
int incomplete; /* This field is set to 1 by Tcl_ParseCommand
* if the command appears to be incomplete.
* This information is used by
* Tcl_CommandComplete. */
-#endif
/*
* The fields below are intended only for the private use of the parser.
* They should not be used by functions that invoke Tcl_ParseCommand.
*/
@@ -1941,13 +1892,10 @@
* terminated most recent token. Filled in by
* ParseTokens. If an error occurs, points to
* beginning of region where the error
* occurred (e.g. the open brace if the close
* brace is missing). */
-#if TCL_MAJOR_VERSION < 9
- int incomplete;
-#endif
Tcl_Token staticTokens[NUM_STATIC_TOKENS];
/* Initial space for tokens for command. This
* space should be large enough to accommodate
* most commands; dynamic space is allocated
* for very large commands that don't fit
@@ -2024,25 +1972,21 @@
* when adding bits.
*/
#define TCL_ENCODING_START 0x01
#define TCL_ENCODING_END 0x02
-#if TCL_MAJOR_VERSION > 8
-# define TCL_ENCODING_STOPONERROR 0x0 /* Not used any more */
-#else
-# define TCL_ENCODING_STOPONERROR 0x04
-#endif
+#define TCL_ENCODING_STOPONERROR 0x0 /* Not used any more */
#define TCL_ENCODING_NO_TERMINATE 0x08
#define TCL_ENCODING_CHAR_LIMIT 0x10
/* Internal use bits, do not define bits in this space. See above comment */
#define TCL_ENCODING_INTERNAL_USE_MASK 0xFF00
/*
* Reserve top byte for profile values (disjoint, not a mask). In case of
* changes, ensure ENCODING_PROFILE_* macros in tclInt.h are modified if
* necessary.
*/
-#define TCL_ENCODING_PROFILE_STRICT TCL_ENCODING_STOPONERROR
+#define TCL_ENCODING_PROFILE_STRICT 0x00000000
#define TCL_ENCODING_PROFILE_TCL8 0x01000000
#define TCL_ENCODING_PROFILE_REPLACE 0x02000000
/*
* The following definitions are the error codes returned by the conversion
@@ -2081,15 +2025,11 @@
* then Tcl_UniChar must be 2-bytes in size (UTF-16). Since Tcl 9.0, UCS-4
* mode is the default and recommended mode.
*/
#ifndef TCL_UTF_MAX
-# if TCL_MAJOR_VERSION > 8
-# define TCL_UTF_MAX 4
-# else
-# define TCL_UTF_MAX 3
-# endif
+# define TCL_UTF_MAX 4
#endif
/*
* This represents a Unicode character. Any changes to this should also be
* reflected in regcustom.h.
@@ -2134,15 +2074,11 @@
* Structure containing information about a limit handler to be called when a
* command- or time-limit is exceeded by an interpreter.
*/
typedef void (Tcl_LimitHandlerProc) (void *clientData, Tcl_Interp *interp);
-#if TCL_MAJOR_VERSION > 8
#define Tcl_LimitHandlerDeleteProc Tcl_FreeProc
-#else
-typedef void (Tcl_LimitHandlerDeleteProc) (void *clientData);
-#endif
#if 0
/*
*----------------------------------------------------------------------------
* We would like to provide an anonymous structure "mp_int" here, which is
@@ -2295,15 +2231,11 @@
*----------------------------------------------------------------------------
* The following constant is used to test for older versions of Tcl in the
* stubs tables.
*/
-#if TCL_MAJOR_VERSION > 8
-# define TCL_STUB_MAGIC ((int) 0xFCA3BACB + (int) sizeof(void *))
-#else
-# define TCL_STUB_MAGIC ((int) 0xFCA3BACF)
-#endif
+#define TCL_STUB_MAGIC ((int) 0xFCA3BACB + (int) sizeof(void *))
/*
* The following function is required to be defined in all stubs aware
* extensions. The function is actually implemented in the stub library, not
* the main Tcl library, although there is a trivial implementation in the
@@ -2321,47 +2253,18 @@
#else
# define Tcl_ConsolePanic ((Tcl_PanicProc *)NULL)
#endif
#ifdef USE_TCL_STUBS
-#if TCL_MAJOR_VERSION < 9
-# if TCL_UTF_MAX < 4
-# define Tcl_InitStubs(interp, version, exact) \
- (Tcl_InitStubs)(interp, version, \
- (exact)|(TCL_MAJOR_VERSION<<8)|(0xFF<<16), \
- TCL_STUB_MAGIC)
-# else
-# define Tcl_InitStubs(interp, version, exact) \
- (Tcl_InitStubs)(interp, "8.7b1", \
- (exact)|(TCL_MAJOR_VERSION<<8)|(0xFF<<16), \
- TCL_STUB_MAGIC)
-# endif
-#elif TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE
# define Tcl_InitStubs(interp, version, exact) \
(Tcl_InitStubs)(interp, version, \
(exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
TCL_STUB_MAGIC)
#else
-# define Tcl_InitStubs(interp, version, exact) \
- (Tcl_InitStubs)(interp, (((exact)&1) ? (version) : "9.0.0"), \
- (exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
- TCL_STUB_MAGIC)
-#endif
-#else
-#if TCL_MAJOR_VERSION < 9
-# define Tcl_InitStubs(interp, version, exact) \
- Tcl_Panic(((void)interp, (void)version, \
- (void)exact, "Please define -DUSE_TCL_STUBS"))
-#elif TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE
# define Tcl_InitStubs(interp, version, exact) \
Tcl_PkgInitStubsCheck(interp, version, \
(exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
-#else
-# define Tcl_InitStubs(interp, version, exact) \
- Tcl_PkgInitStubsCheck(interp, TCL_PATCH_LEVEL, \
- 1|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
-#endif
#endif
/*
* Public functions that are not accessible via the stubs table.
* Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171]
@@ -2399,11 +2302,11 @@
#endif
# define Tcl_MainEx Tcl_MainExW
EXTERN TCL_NORETURN void Tcl_MainExW(Tcl_Size argc, wchar_t **argv,
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
#endif
-#if defined(USE_TCL_STUBS) && (TCL_MAJOR_VERSION > 8)
+#if defined(USE_TCL_STUBS)
#define Tcl_SetPanicProc(panicProc) \
TclInitStubTable(((const char *(*)(Tcl_PanicProc *))TclStubCall((void *)panicProc))(panicProc))
#define Tcl_InitSubsystems() \
TclInitStubTable(((const char *(*)(void))TclStubCall((void *)1))())
#define Tcl_FindExecutable(argv0) \
Index: generic/tclAssembly.c
==================================================================
--- generic/tclAssembly.c
+++ generic/tclAssembly.c
@@ -771,26 +771,26 @@
int
Tcl_AssembleObjCmd(
void *clientData, /* clientData */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/*
* Boilerplate - make sure that there is an NRE trampoline on the C stack
* 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
ByteCode *codePtr; /* Pointer to the bytecode to execute */
Tcl_Obj* backtrace; /* Object where extra error information is
* constructed. */
Index: generic/tclBasic.c
==================================================================
--- generic/tclBasic.c
+++ generic/tclBasic.c
@@ -165,11 +165,11 @@
/*
* 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);
static int CancelEvalProc(void *clientData,
Tcl_Interp *interp, int code);
@@ -176,39 +176,39 @@
static int CheckDoubleResult(Tcl_Interp *interp, double dResult);
static void DeleteCoroutine(void *clientData);
static Tcl_FreeProc DeleteInterpProc;
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 InvokeStringCommand;
-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;
@@ -236,13 +236,13 @@
static Tcl_NRPostProc TEOV_RunLeaveTraces;
static Tcl_NRPostProc EvalObjvCore;
static Tcl_NRPostProc Dispatch;
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;
MODULE_SCOPE const TclStubs tclStubs;
@@ -261,13 +261,13 @@
* The following structure define the commands in the Tcl core.
*/
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;
#define CMD_IS_SAFE 1 /* Whether this command is part of the set of
* commands present by default in a safe
@@ -296,20 +296,10 @@
/*
* The built-in commands, and the functions that implement them:
*/
-static 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.
*/
@@ -351,11 +341,11 @@
{"lsearch", Tcl_LsearchObjCmd, NULL, NULL, CMD_IS_SAFE},
{"lseq", Tcl_LseqObjCmd, NULL, NULL, CMD_IS_SAFE},
{"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},
{"return", Tcl_ReturnObjCmd, TclCompileReturnCmd, NULL, CMD_IS_SAFE},
{"scan", Tcl_ScanObjCmd, NULL, NULL, CMD_IS_SAFE},
@@ -493,11 +483,11 @@
#define BINARY_TYPECAST(fn) \
(BuiltinUnaryFunc *)(void *)(BuiltinBinaryFunc *) fn
typedef struct {
const char *name; /* Name of the function. The full name is
* "::tcl::mathfunc::". */
- Tcl_ObjCmdProc *objCmdProc; /* Function that evaluates the function */
+ Tcl_ObjCmdProc2 *objCmdProc; /* Function that evaluates the function */
BuiltinUnaryFunc *fn; /* Real function pointer */
} BuiltinFuncDef;
static const BuiltinFuncDef BuiltinFuncTable[] = {
{ "abs", ExprAbsFunc, NULL },
{ "acos", ExprUnaryFunc, acos },
@@ -543,11 +533,11 @@
* TIP#174's math operators. All are safe.
*/
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;
int identity;
} i;
@@ -773,19 +763,21 @@
}
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(0));
return TCL_OK;
}
+#ifndef TCL_NO_DEPRECATED
static int
buildInfoObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
return buildInfoObjCmd2(clientData, interp, objc, objv);
}
+#endif
/*
*----------------------------------------------------------------------
*
* Tcl_CreateInterp --
@@ -854,13 +846,12 @@
}
Tcl_MutexUnlock(&cancelLock);
}
-#undef TclObjInterpProc
if (commandTypeInit == 0) {
- TclRegisterCommandTypeName(TclObjInterpProc, "proc");
+ TclRegisterCommandTypeName(TclObjInterpProc2, "proc");
TclRegisterCommandTypeName(TclEnsembleImplementationCmd, "ensemble");
TclRegisterCommandTypeName(TclAliasObjCmd, "alias");
TclRegisterCommandTypeName(TclLocalAliasObjCmd, "alias");
TclRegisterCommandTypeName(TclChildObjCmd, "interp");
TclRegisterCommandTypeName(TclInvokeImportedCmd, "import");
@@ -1107,11 +1098,11 @@
iPtr->pendingObjDataPtr = NULL;
iPtr->asyncReadyPtr = TclGetAsyncReadyPtr();
iPtr->deferredCallbacks = NULL;
/*
- * Create the core commands. Do it here, rather than calling Tcl_CreateObjCommand,
+ * Create the core commands. Do it here, rather than calling Tcl_CreateObjCommand2,
* because it's faster (there's no need to check for a preexisting command
* by the same name). Set the Tcl_CmdProc to NULL.
*/
for (cmdInfoPtr = builtInCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) {
@@ -1130,21 +1121,21 @@
cmdPtr->refCount = 1;
cmdPtr->cmdEpoch = 0;
cmdPtr->compileProc = cmdInfoPtr->compileProc;
cmdPtr->proc = NULL;
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;
if (cmdInfoPtr->flags & CMD_COMPILES_EXPANDED) {
cmdPtr->flags |= CMD_COMPILES_EXPANDED;
}
cmdPtr->importRefPtr = NULL;
cmdPtr->tracePtr = NULL;
- cmdPtr->nreProc = cmdInfoPtr->nreProc;
+ cmdPtr->nreProc2 = cmdInfoPtr->nreProc;
Tcl_SetHashValue(hPtr, cmdPtr);
}
}
/*
@@ -1181,36 +1172,36 @@
/*
* 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_CreateObjCommand(interp, "::tcl::unsupported::corotype",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::corotype",
CoroTypeObjCmd, NULL, NULL);
/* Load and intialize ICU */
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::loadIcu",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::loadIcu",
TclLoadIcuObjCmd, NULL, NULL);
/* Export unsupported commands */
nsPtr = Tcl_FindNamespace(interp, "::tcl::unsupported", NULL, 0);
if (nsPtr) {
@@ -1220,11 +1211,11 @@
#ifdef USE_DTRACE
/*
* Register the tcl::dtrace command.
*/
- Tcl_CreateObjCommand(interp, "::tcl::dtrace", DTraceObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "::tcl::dtrace", DTraceObjCmd, NULL, NULL);
#endif /* USE_DTRACE */
/*
* Register the builtin math functions.
*/
@@ -1236,11 +1227,11 @@
#define MATH_FUNC_PREFIX_LEN 17 /* == strlen("::tcl::mathfunc::") */
memcpy(mathFuncName, "::tcl::mathfunc::", MATH_FUNC_PREFIX_LEN);
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);
}
/*
@@ -1259,11 +1250,11 @@
occdPtr->op = opcmdInfoPtr->name;
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",
opcmdInfoPtr->name);
} else if (opcmdInfoPtr->compileProc != NULL) {
@@ -1321,17 +1312,22 @@
* TIP #599: Extended build information "+......"
*/
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);
Tcl_GetCommandInfoFromToken(buildInfoCmd, &info2);
info2.objProc2 = buildInfoObjCmd2;
info2.objClientData2 = (void *)version;
Tcl_SetCommandInfoFromToken(buildInfoCmd, &info2);
+#endif
if (TclTommath_Init(interp) != TCL_OK) {
Tcl_Panic("%s", Tcl_GetStringResult(interp));
}
@@ -1369,11 +1365,11 @@
* ---------------------------------------------------------------------
*/
void
TclRegisterCommandTypeName(
- Tcl_ObjCmdProc *implementationProc,
+ Tcl_ObjCmdProc2 *implementationProc,
const char *nameStr)
{
Tcl_HashEntry *hPtr;
Tcl_MutexLock(&commandTypeLock);
@@ -1400,15 +1396,15 @@
const char *
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) {
Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&commandTypeTable, procPtr);
@@ -1473,11 +1469,11 @@
TclGetString(hideName)) != TCL_OK) {
Tcl_Panic("problem making '%s %s' safe: %s",
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);
} else {
/*
@@ -1516,11 +1512,11 @@
static int
BadEnsembleSubcommand(
void *clientData,
Tcl_Interp *interp,
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /* objv */)
{
const UnsafeEnsembleInfo *infoPtr = (const UnsafeEnsembleInfo *)clientData;
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -2509,18 +2505,19 @@
*
* Side effects:
* 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
+ * the command is created with a wrapper Tcl_ObjCmdProc2
* (InvokeStringCommand) that eventually calls proc. 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
Tcl_Command
Tcl_CreateCommand(
Tcl_Interp *interp, /* Token for command interpreter returned by a
* previous call to Tcl_CreateInterp. */
const char *cmdName, /* Name of command. If it contains namespace
@@ -2652,20 +2649,20 @@
cmdPtr->hPtr = hPtr;
cmdPtr->nsPtr = nsPtr;
cmdPtr->refCount = 1;
cmdPtr->cmdEpoch = 0;
cmdPtr->compileProc = NULL;
- cmdPtr->objProc = InvokeStringCommand;
- cmdPtr->objClientData = cmdPtr;
+ cmdPtr->objProc2 = InvokeStringCommand;
+ cmdPtr->objClientData2 = cmdPtr;
cmdPtr->proc = proc;
cmdPtr->clientData = clientData;
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
* all of these references to point to the new command.
*/
@@ -2672,11 +2669,11 @@
if (oldRefPtr != NULL) {
cmdPtr->importRefPtr = oldRefPtr;
while (oldRefPtr != NULL) {
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
- dataPtr = (ImportedCmdData *)refCmdPtr->objClientData;
+ dataPtr = (ImportedCmdData *)refCmdPtr->objClientData2;
dataPtr->realCmdPtr = cmdPtr;
oldRefPtr = oldRefPtr->nextPtr;
}
}
@@ -2688,10 +2685,11 @@
*/
TclResetShadowedCmdRefs(interp, cmdPtr);
return (Tcl_Command) cmdPtr;
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
*
* Tcl_CreateObjCommand --
@@ -2706,37 +2704,39 @@
* If a command named "cmdName" already exists for interp, it is
* first deleted. Then the new command is created from the arguments.
*
* 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_Size 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, objc, objv);
+ return info->proc(info->clientData, interp, (int)objc, objv);
}
static void
cmdWrapperDeleteProc(
void *clientData)
@@ -2750,18 +2750,18 @@
deleteProc(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. */
Tcl_CmdDeleteProc *deleteProc)
/* If not NULL, gives a function to call when
@@ -2771,24 +2771,25 @@
info->proc = proc;
info->clientData = clientData;
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. */
Tcl_CmdDeleteProc *deleteProc)
/* If not NULL, gives a function to call when
@@ -2833,11 +2834,11 @@
TclCreateObjCommandInNs(
Tcl_Interp *interp,
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. */
Tcl_CmdDeleteProc *deleteProc)
/* If not NULL, gives a function to call when
@@ -2941,20 +2942,20 @@
cmdPtr->hPtr = hPtr;
cmdPtr->nsPtr = nsPtr;
cmdPtr->refCount = 1;
cmdPtr->cmdEpoch = 0;
cmdPtr->compileProc = NULL;
- cmdPtr->objProc = proc;
- cmdPtr->objClientData = clientData;
+ cmdPtr->objProc2 = proc;
+ cmdPtr->objClientData2 = clientData;
cmdPtr->proc = NULL;
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
* all of these references to point to the new command.
*/
@@ -2962,11 +2963,11 @@
if (oldRefPtr != NULL) {
cmdPtr->importRefPtr = oldRefPtr;
while (oldRefPtr != NULL) {
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
- dataPtr = (ImportedCmdData*)refCmdPtr->objClientData;
+ dataPtr = (ImportedCmdData*)refCmdPtr->objClientData2;
cmdPtr->refCount++;
TclCleanupCommandMacro(dataPtr->realCmdPtr);
dataPtr->realCmdPtr = cmdPtr;
oldRefPtr = oldRefPtr->nextPtr;
}
@@ -2986,13 +2987,13 @@
/*
*----------------------------------------------------------------------
*
* 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.
*
* Results:
* A standard Tcl object result value.
@@ -3006,16 +3007,22 @@
int
InvokeStringCommand(
void *clientData, /* Points to command's Command structure. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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++) {
argv[i] = TclGetString(objv[i]);
}
@@ -3290,45 +3297,47 @@
* None.
*
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
static int
invokeObj2Command(
void *clientData, /* Points to command's Command structure. */
Tcl_Interp *interp, /* Current interpreter. */
- Tcl_Size 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) {
- return TclCommandWordLimitError(interp, objc);
+ if (objc < 0) {
+ objc = TCL_INDEX_NONE;
}
- 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,
- Tcl_Size objc,
+ int objc,
Tcl_Obj *const objv[])
{
Command *cmdPtr = (Command *) clientData;
- if (objc > INT_MAX) {
- return TclCommandWordLimitError(interp, objc);
+ if (objc < 0) {
+ objc = -1;
}
- return cmdPtr->objProc(cmdPtr->objClientData, interp, objc, objv);
+ return cmdPtr->objProc2(cmdPtr->objClientData2, interp, (size_t)objc, objv);
}
+#endif
int
Tcl_SetCommandInfoFromToken(
Tcl_Command cmd,
const Tcl_CmdInfo *infoPtr)
@@ -3344,47 +3353,53 @@
*/
cmdPtr = (Command *) cmd;
cmdPtr->proc = infoPtr->proc;
cmdPtr->clientData = infoPtr->clientData;
- if (infoPtr->objProc == NULL) {
- cmdPtr->objProc = InvokeStringCommand;
- 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;
}
}
return 1;
@@ -3457,29 +3472,34 @@
* registered by a call to Tcl_CreateObjCommand2. Otherwise set it to 0.
*/
cmdPtr = (Command *) cmd;
infoPtr->isNativeObjectProc =
- (cmdPtr->objProc != InvokeStringCommand);
- 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;
}
@@ -3791,11 +3811,11 @@
* whether the objProc field holds a known value. Set the field to NULL so
* that such tests won't have false positives when applied to deleted
* commands.
*/
- cmdPtr->objProc = NULL;
+ cmdPtr->objProc2 = NULL;
/*
* Now free the Command structure, unless there is another reference to it
* from a CmdName Tcl object in some ByteCode code sequence. In that case,
* delay the cleanup until all references are either discarded (when a
@@ -4588,22 +4608,22 @@
TclNRAddCallback(interp, TEOV_RunLeaveTraces, INT2PTR(objc),
commandPtr, cmdPtr, objv);
}
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;
}
static int
Dispatch(
void *data[],
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];
Tcl_Size objc = PTR2INT(data[2]);
Tcl_Obj **objv = (Tcl_Obj **)data[3];
Interp *iPtr = (Interp *) interp;
@@ -5346,12 +5366,10 @@
iPtr->cmdFramePtr = eeFramePtr->nextPtr;
for (objectsUsed = 0, tokenPtr = parsePtr->tokenPtr;
objectsUsed < numWords;
objectsUsed++, tokenPtr += tokenPtr->numComponents + 1) {
- Tcl_Size additionalObjsCount;
-
/*
* TIP #280. Track lines to current word. Save the information
* on a per-word basis, signaling dynamic words as needed.
* Make the information available to the recursively called
* evaluator as well, including the type of context (source
@@ -5397,25 +5415,15 @@
break;
}
expandRequested = 1;
expand[objectsUsed] = 1;
- additionalObjsCount = (numElements ? numElements : 1);
-
+ objectsNeeded += (numElements ? numElements : 1);
} else {
expand[objectsUsed] = 0;
- additionalObjsCount = 1;
- }
-
- /* Currently max command words in INT_MAX */
- if (additionalObjsCount > INT_MAX ||
- objectsNeeded > (INT_MAX - additionalObjsCount)) {
- code = TclCommandWordLimitError(interp, -1);
- Tcl_DecrRefCount(objv[objectsUsed]);
- break;
- }
- objectsNeeded += additionalObjsCount;
+ objectsNeeded++;
+ }
if (wordCLNext) {
TclContinuationsEnterDerived(objv[objectsUsed],
wordStart - outerScript, wordCLNext);
}
@@ -6703,18 +6711,18 @@
return TCL_ERROR;
}
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,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
Tcl_HashTable *hTblPtr; /* Table of hidden commands. */
const char *cmdName; /* Name of the command from objv[0]. */
@@ -7041,11 +7049,11 @@
static int
ExprCeilFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
int code;
double d;
mp_int big;
@@ -7081,11 +7089,11 @@
static int
ExprFloorFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
int code;
double d;
mp_int big;
@@ -7120,11 +7128,11 @@
static int
ExprIsqrtFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
void *ptr;
int type;
double d;
@@ -7227,11 +7235,11 @@
static int
ExprSqrtFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter list. */
{
int code;
double d;
mp_int big;
@@ -7281,11 +7289,11 @@
void *clientData, /* Contains the address of a function that
* takes one double argument and returns a
* double result. */
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
int code;
double d;
BuiltinUnaryFunc *func = (BuiltinUnaryFunc *) clientData;
@@ -7345,11 +7353,11 @@
void *clientData, /* Contains the address of a function that
* takes two double arguments and returns a
* double result. */
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
int code;
double d1, d2;
BuiltinBinaryFunc *func = (BuiltinBinaryFunc *)clientData;
@@ -7395,11 +7403,11 @@
static int
ExprAbsFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
void *ptr;
int type;
mp_int big;
@@ -7504,11 +7512,11 @@
static int
ExprBoolFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
int value;
if (objc != 2) {
@@ -7525,11 +7533,11 @@
static int
ExprDoubleFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
double dResult;
if (objc != 2) {
@@ -7552,11 +7560,11 @@
static int
ExprIntFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
double d;
int type;
void *ptr;
@@ -7608,11 +7616,11 @@
static int
ExprWideFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
Tcl_WideInt wResult;
if (ExprIntFunc(NULL, interp, objc, objv) != TCL_OK) {
@@ -7629,18 +7637,18 @@
static int
ExprMaxMinFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv, /* Actual parameter vector. */
int op) /* Comparison direction */
{
Tcl_Obj *res;
double d;
int type;
- int i;
+ Tcl_Size i;
void *ptr;
if (objc < 2) {
MathFuncWrongNumArgs(interp, 2, objc, objv);
return TCL_ERROR;
@@ -7670,11 +7678,11 @@
static int
ExprMaxFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
return ExprMaxMinFunc(NULL, interp, objc, objv, MP_GT);
}
@@ -7681,11 +7689,11 @@
static int
ExprMinFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
return ExprMaxMinFunc(NULL, interp, objc, objv, MP_LT);
}
@@ -7692,11 +7700,11 @@
static int
ExprRandFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Actual parameter vector. */
{
Interp *iPtr = (Interp *) interp;
double dResult;
long tmp; /* Algorithm assumes at least 32 bits. Only
@@ -7785,11 +7793,11 @@
static int
ExprRoundFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
double d;
void *ptr;
int type;
@@ -7864,11 +7872,11 @@
static int
ExprSrandFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count. */
+ Tcl_Size objc, /* Actual parameter count. */
Tcl_Obj *const *objv) /* Parameter vector. */
{
Interp *iPtr = (Interp *) interp;
Tcl_WideInt w = 0; /* Initialized to avoid compiler warning. */
@@ -8053,11 +8061,11 @@
static int
ExprIsFiniteFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
void *ptr;
int type, result = 0;
@@ -8084,11 +8092,11 @@
static int
ExprIsInfinityFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
void *ptr;
int type, result = 0;
@@ -8114,11 +8122,11 @@
static int
ExprIsNaNFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
void *ptr;
int type, result = 1;
@@ -8144,11 +8152,11 @@
static int
ExprIsNormalFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
void *ptr;
int type, result = 0;
@@ -8174,11 +8182,11 @@
static int
ExprIsSubnormalFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
void *ptr;
int type, result = 0;
@@ -8204,11 +8212,11 @@
static int
ExprIsUnorderedFunc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
void *ptr;
int type, result = 0;
@@ -8245,11 +8253,11 @@
static int
FloatClassifyObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter in which to execute the
* function. */
- int objc, /* Actual parameter count */
+ Tcl_Size objc, /* Actual parameter count */
Tcl_Obj *const *objv) /* Actual parameter list */
{
double d;
Tcl_Obj *objPtr;
void *ptr;
@@ -8353,11 +8361,11 @@
static int
DTraceObjCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (TCL_DTRACE_TCL_PROBE_ENABLED()) {
char *a[10];
int i = 0;
@@ -8496,13 +8504,13 @@
*
*----------------------------------------------------------------------
*/
int
-Tcl_NRCallObjProc(
+Tcl_NRCallObjProc2(
Tcl_Interp *interp,
- Tcl_ObjCmdProc *objProc,
+ Tcl_ObjCmdProc2 *objProc,
void *clientData,
Tcl_Size objc,
Tcl_Obj *const objv[])
{
NRE_callback *rootPtr = TOP_CB(interp);
@@ -8510,31 +8518,29 @@
TclNRAddCallback(interp, Dispatch, objProc, clientData,
INT2PTR(objc), objv);
return TclNRRunCallbacks(interp, TCL_OK, rootPtr);
}
+#ifndef TCL_NO_DEPRECATED
static int
wrapperNRObjProc(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size 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, (Tcl_Size) 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,
Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc > INT_MAX) {
@@ -8549,10 +8555,11 @@
TclNRAddCallback(interp, Dispatch, wrapperNRObjProc, info,
INT2PTR(objc), objv);
return TclNRRunCallbacks(interp, TCL_OK, rootPtr);
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
*
* Tcl_NRCreateCommand --
@@ -8564,71 +8571,37 @@
* future calls to Tcl_GetCommandName.
*
* 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 InvokeStringCommand, 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,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
CmdWrapperInfo *info = (CmdWrapperInfo *) clientData;
- if (objc < 0) {
- objc = -1;
- }
return info->nreProc(info->clientData, interp, objc, objv);
}
-Tcl_Command
-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_ObjCmdProc2 *proc, /* Object-based function to associate with
- * name, provides direct access for direct
- * calls. */
- Tcl_ObjCmdProc2 *nreProc, /* Object-based function to associate with
- * name, provides NR implementation */
- void *clientData, /* Arbitrary value to pass to object
- * function. */
- Tcl_CmdDeleteProc *deleteProc)
- /* If not NULL, gives a function to call when
- * this command is deleted. */
-{
- CmdWrapperInfo *info = (CmdWrapperInfo *)Tcl_Alloc(sizeof(CmdWrapperInfo));
-
- info->proc = proc;
- info->clientData = clientData;
- info->nreProc = nreProc;
- info->deleteProc = deleteProc;
- info->deleteData = clientData;
- return Tcl_NRCreateCommand(interp, cmdName,
- (proc ? cmdWrapperProc : NULL),
- (nreProc ? cmdWrapperNreProc : NULL),
- info, cmdWrapperDeleteProc);
-}
-
Tcl_Command
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
@@ -8644,33 +8617,66 @@
* function. */
Tcl_CmdDeleteProc *deleteProc)
/* If not NULL, gives a function to call when
* this command is deleted. */
{
+ CmdWrapperInfo *info = (CmdWrapperInfo *)Tcl_Alloc(sizeof(CmdWrapperInfo));
+
+ info->proc = proc;
+ info->clientData = clientData;
+ info->nreProc = nreProc;
+ info->deleteProc = deleteProc;
+ info->deleteData = clientData;
+ return Tcl_NRCreateCommand2(interp, cmdName,
+ (proc ? cmdWrapperProc : NULL),
+ (nreProc ? cmdWrapperNreProc : NULL),
+ info, cmdWrapperDeleteProc);
+}
+#endif /* TCL_NO_DEPRECATED */
+
+Tcl_Command
+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_ObjCmdProc2 *proc, /* Object-based function to associate with
+ * name, provides direct access for direct
+ * calls. */
+ Tcl_ObjCmdProc2 *nreProc, /* Object-based function to associate with
+ * name, provides NR implementation */
+ void *clientData, /* Arbitrary value to pass to object
+ * function. */
+ Tcl_CmdDeleteProc *deleteProc)
+ /* If not NULL, gives a function to call when
+ * 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;
}
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)
{
Command *cmdPtr = (Command *)
TclCreateObjCommandInNs(interp, cmdName, nsPtr, proc, clientData,
deleteProc);
- cmdPtr->nreProc = nreProc;
+ cmdPtr->nreProc2 = nreProc;
return (Tcl_Command) cmdPtr;
}
/****************************************************************************
* Stuff for the public api
@@ -8824,11 +8830,11 @@
int
TclNRTailcallObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
if (objc < 1) {
@@ -8985,11 +8991,11 @@
int
TclNRYieldObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
if (objc > 2) {
@@ -9016,11 +9022,11 @@
int
TclNRYieldToObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
Tcl_Namespace *nsPtr = TclGetCurrentNamespace(interp);
Tcl_Obj *listPtr;
@@ -9313,11 +9319,11 @@
static int
CoroTypeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Command *cmdPtr;
CoroutineData *corPtr;
@@ -9329,11 +9335,11 @@
/*
* Look up the coroutine.
*/
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", TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COROUTINE",
TclGetString(objv[1]), (char *)NULL);
return TCL_ERROR;
@@ -9342,11 +9348,11 @@
/*
* An active coroutine is "active". Can't tell what it might do in the
* future.
*/
- corPtr = (CoroutineData *)cmdPtr->objClientData;
+ corPtr = (CoroutineData *)cmdPtr->objClientData2;
if (!COR_IS_SUSPENDED(corPtr)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("active", TCL_INDEX_NONE));
return TCL_OK;
}
@@ -9390,24 +9396,24 @@
* How to get a coroutine from its handle.
*/
Command *cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objPtr);
- if ((!cmdPtr) || (cmdPtr->nreProc != TclNRInterpCoroutine)) {
+ if ((!cmdPtr) || (cmdPtr->nreProc2 != TclNRInterpCoroutine)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(errMsg, TCL_INDEX_NONE));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COROUTINE",
TclGetString(objPtr), (char *)NULL);
return NULL;
}
- return (CoroutineData *)cmdPtr->objClientData;
+ return (CoroutineData *)cmdPtr->objClientData2;
}
static int
TclNRCoroInjectObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr;
/*
@@ -9448,11 +9454,11 @@
static int
TclNRCoroProbeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr;
/*
@@ -9629,11 +9635,11 @@
int
TclNRInterpCoroutine(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
CoroutineData *corPtr = (CoroutineData *)clientData;
if (!COR_IS_SUSPENDED(corPtr)) {
@@ -9693,11 +9699,11 @@
int
TclNRCoroutineObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Command *cmdPtr;
CoroutineData *corPtr;
const char *procName, *simpleName;
@@ -9827,11 +9833,11 @@
int
TclInfoCoroutineCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
if (objc != 1) {
Index: generic/tclBinary.c
==================================================================
--- generic/tclBinary.c
+++ generic/tclBinary.c
@@ -70,19 +70,19 @@
static void DeleteScanNumberCache(Tcl_HashTable *numberCachePtr);
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
*/
@@ -834,18 +834,18 @@
static int
BinaryFormatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int arg; /* Index of next argument to consume. */
+ Tcl_Size 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. */
- Tcl_Size count; /* Count associated with current format
+ Tcl_Size count; /* Count associated with current format
* character. */
int flags; /* Format field flags */
const char *format; /* Pointer to current position in format
* string. */
Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */
@@ -1346,18 +1346,18 @@
static int
BinaryScanCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int arg; /* Index of next argument to consume. */
+ Tcl_Size 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. */
- Tcl_Size count; /* Count associated with current format
+ Tcl_Size count; /* Count associated with current format
* character. */
int flags; /* Format field flags */
const char *format; /* Pointer to current position in format
* string. */
Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */
@@ -1765,18 +1765,18 @@
}
if (**formatPtr == '*') {
(*formatPtr)++;
*countPtr = BINARY_ALL;
} else if (isdigit(UCHAR(**formatPtr))) { /* INTL: digit */
- unsigned long long count;
+ unsigned long count;
errno = 0;
- count = strtoull(*formatPtr, (char **) formatPtr, 10);
- if (errno || (count > TCL_SIZE_MAX)) {
- *countPtr = TCL_SIZE_MAX;
+ count = strtoul(*formatPtr, (char **) formatPtr, 10);
+ if (errno || (count > (unsigned long) INT_MAX)) {
+ *countPtr = INT_MAX;
} else {
- *countPtr = count;
+ *countPtr = (int) count;
}
} else {
*countPtr = BINARY_NOCOUNT;
}
return 1;
@@ -2430,11 +2430,11 @@
static int
BinaryEncodeHex(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj = NULL;
unsigned char *data = NULL;
unsigned char *cursor = NULL;
@@ -2478,18 +2478,18 @@
static int
BinaryDecodeHex(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size 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;
- Tcl_Size size, cut = 0, count = 0;
+ int index, value, pure = 1, strict = 0;
+ Tcl_Size i, size, cut = 0, count = 0;
int ucs4;
enum {OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };
if (objc < 2 || objc > 3) {
@@ -2603,20 +2603,20 @@
static int
BinaryEncode64(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj;
unsigned char *data, *limit;
Tcl_WideInt maxlen = 0;
const char *wrapchar = "\n";
- Tcl_Size wrapcharlen = 1;
- int index, purewrap = 1;
- Tcl_Size i, offset, size, outindex = 0, count = 0;
+ Tcl_Size i, wrapcharlen = 1;
+ int index, outindex = 0, purewrap = 1;
+ Tcl_Size offset, size, count = 0;
enum { OPT_MAXLEN, OPT_WRAPCHAR };
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
if (objc < 2 || objc % 2 != 0) {
Tcl_WrongNumArgs(interp, 1, objv,
@@ -2729,21 +2729,20 @@
static int
BinaryEncodeUu(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj;
unsigned char *data, *start, *cursor;
- int i, bits, index;
- unsigned int n;
- int lineLength = 61;
+ int bits, index, lineLength = 61;
+ Tcl_Size rawLength;
const unsigned char SingleNewline[] = { UCHAR('\n') };
const unsigned char *wrapchar = SingleNewline;
- Tcl_Size j, rawLength, offset, count = 0, wrapcharlen = sizeof(SingleNewline);
+ Tcl_Size n, i, j, offset, count = 0, wrapcharlen = sizeof(SingleNewline);
enum { OPT_MAXLEN, OPT_WRAPCHAR };
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
if (objc < 2 || objc % 2 != 0) {
Tcl_WrongNumArgs(interp, 1, objv,
@@ -2881,18 +2880,18 @@
static int
BinaryDecodeUu(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size 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;
- Tcl_Size size, count = 0;
+ int index, pure = 1, strict = 0, lineLen;
+ Tcl_Size i, size, count = 0;
unsigned char c;
int ucs4;
enum { OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };
@@ -3055,20 +3054,20 @@
static int
BinaryDecode64(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *resultObj = NULL;
unsigned char *data, *datastart, *dataend, c = '\0';
unsigned char *begin = NULL;
unsigned char *cursor = NULL;
int pure = 1, strict = 0;
- int i, index, cut = 0;
- Tcl_Size size, count = 0;
+ int index, cut = 0;
+ Tcl_Size i, size, count = 0;
int ucs4;
enum { OPT_STRICT };
static const char *const optStrings[] = { "-strict", NULL };
if (objc < 2 || objc > 3) {
Index: generic/tclCkalloc.c
==================================================================
--- generic/tclCkalloc.c
+++ generic/tclCkalloc.c
@@ -797,11 +797,11 @@
*/
static int
MemoryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Obj values of arguments. */
{
const char *fileName;
FILE *fileP;
Tcl_DString buffer;
@@ -969,11 +969,11 @@
*/
static int
CheckmemCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Interpreter for evaluation. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Obj values of arguments. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "fileName");
return TCL_ERROR;
@@ -1003,12 +1003,12 @@
Tcl_InitMemory(
Tcl_Interp *interp) /* Interpreter in which commands should be
* 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);
}
#else /* TCL_MEM_DEBUG */
/* This is the !TCL_MEM_DEBUG case */
Index: generic/tclClock.c
==================================================================
--- generic/tclClock.c
+++ generic/tclClock.c
@@ -81,51 +81,51 @@
static int ConvertLocalToUTCUsingTable(Tcl_Interp *,
TclDateFields *, int, Tcl_Obj *const[],
Tcl_WideInt *rangesVal);
static int ConvertLocalToUTCUsingC(Tcl_Interp *,
TclDateFields *, int);
-static Tcl_ObjCmdProc ClockConfigureObjCmd;
+static Tcl_ObjCmdProc2 ClockConfigureObjCmd;
static void GetYearWeekDay(TclDateFields *, int);
static void GetGregorianEraYearDay(TclDateFields *, int);
static void GetMonthDay(TclDateFields *);
static Tcl_WideInt WeekdayOnOrBefore(int, Tcl_WideInt);
-static Tcl_ObjCmdProc ClockClicksObjCmd;
-static Tcl_ObjCmdProc ClockConvertlocaltoutcObjCmd;
+static Tcl_ObjCmdProc2 ClockClicksObjCmd;
+static Tcl_ObjCmdProc2 ClockConvertlocaltoutcObjCmd;
static int ClockGetDateFields(ClockClientData *,
Tcl_Interp *interp, TclDateFields *fields,
Tcl_Obj *timezoneObj, int changeover);
-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 ClockSecondsObjCmd;
-static Tcl_ObjCmdProc ClockFormatObjCmd;
-static Tcl_ObjCmdProc ClockScanObjCmd;
+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 ClockSecondsObjCmd;
+static Tcl_ObjCmdProc2 ClockFormatObjCmd;
+static Tcl_ObjCmdProc2 ClockScanObjCmd;
static int ClockScanCommit(DateInfo *info,
ClockFmtScnCmdArgs *opts);
static int ClockFreeScan(DateInfo *info,
Tcl_Obj *strObj, ClockFmtScnCmdArgs *opts);
static int ClockCalcRelTime(DateInfo *info);
-static Tcl_ObjCmdProc ClockAddObjCmd;
+static Tcl_ObjCmdProc2 ClockAddObjCmd;
static int ClockValidDate(DateInfo *,
ClockFmtScnCmdArgs *, int stage);
static struct tm * ThreadSafeLocalTime(const time_t *);
static size_t TzsetIfNecessary(void);
static void ClockDeleteCmdProc(void *);
-static Tcl_ObjCmdProc ClockSafeCatchCmd;
+static Tcl_ObjCmdProc2 ClockSafeCatchCmd;
static void ClockFinalize(void *);
/*
* Structure containing description of "native" clock commands to create.
*/
struct ClockCommand {
const char *name; /* The tail of the command name. The full name
* is "::tcl::clock::". 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. */
CompileProc *compileProc; /* The compiler for the command. */
void *clientData; /* Any clientData to give the command (if NULL
* a reference to ClockClientData will be sent) */
@@ -262,17 +262,17 @@
strcpy(cmdName + TCL_CLOCK_PREFIX_LEN, clockCmdPtr->name);
if (!(clientData = clockCmdPtr->clientData)) {
clientData = data;
data->refCount++;
}
- cmdPtr = (Command *)Tcl_CreateObjCommand(interp, cmdName,
+ cmdPtr = (Command *)Tcl_CreateObjCommand2(interp, cmdName,
clockCmdPtr->objCmdProc, clientData,
clockCmdPtr->clientData ? NULL : ClockDeleteCmdProc);
cmdPtr->compileProc = clockCmdPtr->compileProc ?
clockCmdPtr->compileProc : TclCompileBasicMin0ArgCmd;
}
- cmdPtr = (Command *) Tcl_CreateObjCommand(interp,
+ cmdPtr = (Command *) Tcl_CreateObjCommand2(interp,
"::tcl::unsupported::clock::configure",
ClockConfigureObjCmd, data, ClockDeleteCmdProc);
data->refCount++;
cmdPtr->compileProc = TclCompileBasicMin0ArgCmd;
}
@@ -957,11 +957,11 @@
static int
ClockConfigureObjCmd(
void *clientData, /* Client data containing literal pool */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter vector */
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
static const char *const options[] = {
"-default-locale", "-clear", "-current-locale",
@@ -1407,11 +1407,11 @@
static int
ClockConvertlocaltoutcObjCmd(
void *clientData, /* Literal table */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
Tcl_Obj *secondsObj;
Tcl_Obj *dict;
@@ -1497,11 +1497,11 @@
int
ClockGetdatefieldsObjCmd(
void *clientData, /* Opaque pointer to literal pool, etc. */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
TclDateFields fields;
Tcl_Obj *dict;
ClockClientData *dataPtr = (ClockClientData *)clientData;
@@ -1691,11 +1691,11 @@
static int
ClockGetjuliandayfromerayearmonthdayObjCmd(
void *clientData, /* Opaque pointer to literal pool, etc. */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
TclDateFields fields;
Tcl_Obj *dict;
ClockClientData *data = (ClockClientData *)clientData;
@@ -1777,11 +1777,11 @@
static int
ClockGetjuliandayfromerayearweekdayObjCmd(
void *clientData, /* Opaque pointer to literal pool, etc. */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter vector */
{
TclDateFields fields;
Tcl_Obj *dict;
ClockClientData *data = (ClockClientData *)clientData;
@@ -3018,11 +3018,11 @@
int
ClockGetenvObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
#ifdef _WIN32
const WCHAR *varName;
const WCHAR *varValue;
@@ -3122,11 +3122,11 @@
int
ClockClicksObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
static const char *const clicksSwitches[] = {
"-milliseconds", "-microseconds", NULL
};
@@ -3192,11 +3192,11 @@
int
ClockMillisecondsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
Tcl_Time now;
Tcl_Obj *timeObj;
@@ -3231,11 +3231,11 @@
int
ClockMicrosecondsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 0, objv, "clock microseconds");
return TCL_ERROR;
@@ -3525,11 +3525,11 @@
int
ClockFormatObjCmd(
void *clientData, /* Client data containing literal pool */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter values */
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
static const char *syntax = "clock format clockval|now "
"?-format string? "
@@ -3594,11 +3594,11 @@
int
ClockScanObjCmd(
void *clientData, /* Client data containing literal pool */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter values */
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
static const char *syntax = "clock scan string "
"?-base seconds? "
@@ -4357,11 +4357,11 @@
int
ClockAddObjCmd(
void *clientData, /* Client data containing literal pool */
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter values */
{
static const char *syntax = "clock add clockval|now ?number units?..."
"?-gmt boolean? "
"?-locale LOCALE? ?-timezone ZONE?";
@@ -4535,11 +4535,11 @@
int
ClockSecondsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const *objv) /* Parameter values */
{
Tcl_Time now;
Tcl_Obj *timeObj;
@@ -4567,11 +4567,11 @@
*/
int
ClockSafeCatchCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
typedef struct {
int status; /* return code status */
int flags; /* Each remaining field saves the */
@@ -4652,15 +4652,11 @@
#endif
#define TZ_INIT_MARKER ((WCHAR *) INT2PTR(-1))
typedef struct ClockTzStatic {
WCHAR *was; /* Previous value of TZ. */
-#if TCL_MAJOR_VERSION > 8
long long lastRefresh; /* Used for latency before next refresh. */
-#else
- long lastRefresh; /* Used for latency before next refresh. */
-#endif
size_t epoch; /* Epoch, signals that TZ changed. */
size_t envEpoch; /* Last env epoch, for faster signaling,
* that TZ changed via TCL */
} ClockTzStatic;
static ClockTzStatic tz = { /* Global timezone info; protected by
Index: generic/tclCmdAH.c
==================================================================
--- generic/tclCmdAH.c
+++ generic/tclCmdAH.c
@@ -45,16 +45,16 @@
* Prototypes for local procedures defined in this file:
*/
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 EncodingProfilesObjCmd;
-static Tcl_ObjCmdProc EncodingSystemObjCmd;
+static Tcl_ObjCmdProc2 EncodingConvertfromObjCmd;
+static Tcl_ObjCmdProc2 EncodingConverttoObjCmd;
+static Tcl_ObjCmdProc2 EncodingDirsObjCmd;
+static Tcl_ObjCmdProc2 EncodingNamesObjCmd;
+static Tcl_ObjCmdProc2 EncodingProfilesObjCmd;
+static Tcl_ObjCmdProc2 EncodingSystemObjCmd;
static inline int ForeachAssignments(Tcl_Interp *interp,
struct ForeachState *statePtr);
static inline void ForeachCleanup(Tcl_Interp *interp,
struct ForeachState *statePtr);
static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr,
@@ -61,45 +61,45 @@
Tcl_FSStatProc *statProc, Tcl_StatBuf *statPtr);
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[]);
+ Tcl_Size objc, Tcl_Obj *const objv[]);
static Tcl_NRPostProc CatchObjCmdCallback;
static Tcl_NRPostProc ExprCallback;
static Tcl_NRPostProc ForSetupCallback;
static Tcl_NRPostProc ForCondCallback;
static Tcl_NRPostProc ForNextCallback;
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;
/*
*----------------------------------------------------------------------
*
* Tcl_BreakObjCmd --
@@ -122,11 +122,11 @@
int
Tcl_BreakObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -153,21 +153,21 @@
int
Tcl_CatchObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varNamePtr = NULL;
Tcl_Obj *optionVarNamePtr = NULL;
Interp *iPtr = (Interp *) interp;
@@ -200,11 +200,11 @@
void *data[],
Tcl_Interp *interp,
int result)
{
Interp *iPtr = (Interp *) interp;
- int objc = PTR2INT(data[0]);
+ Tcl_Size objc = PTR2INT(data[0]);
Tcl_Obj *varNamePtr = (Tcl_Obj *)data[1];
Tcl_Obj *optionVarNamePtr = (Tcl_Obj *)data[2];
int rewind = iPtr->execEnvPtr->rewind;
/*
@@ -258,11 +258,11 @@
int
Tcl_CdObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *dir;
int result;
@@ -321,11 +321,11 @@
int
Tcl_ConcatObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc >= 2) {
Tcl_SetObjResult(interp, Tcl_ConcatObj(objc-1, objv+1));
}
@@ -355,11 +355,11 @@
int
Tcl_ContinueObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -423,17 +423,18 @@
*
*------------------------------------------------------------------------
*/
static int
EncodingConvertParseOptions(
- Tcl_Interp *interp, /* For error messages. May be NULL */
- int objc, /* Number of arguments */
- Tcl_Obj *const objv[], /* Argument objects as passed to command. */
- Tcl_Encoding *encPtr, /* Where to store the encoding */
- Tcl_Obj **dataObjPtr, /* Where to store ptr to Tcl_Obj containing data */
- int *profilePtr, /* Bit mask of encoding option profile */
- Tcl_Obj **failVarPtr) /* Where to store -failindex option value */
+ Tcl_Interp *interp, /* For error messages. May be NULL */
+ Tcl_Size objc, /* Number of arguments */
+ Tcl_Obj *const objv[], /* Argument objects as passed to command. */
+ Tcl_Encoding *encPtr, /* Where to store the encoding */
+ Tcl_Obj **dataObjPtr, /* Where to store ptr to Tcl_Obj containing data */
+ int *profilePtr, /* Bit mask of encoding option profile */
+ Tcl_Obj **failVarPtr /* Where to store -failindex option value */
+)
{
static const char *const options[] = {"-profile", "-failindex", NULL};
enum convertfromOptions { PROFILE, FAILINDEX } optIndex;
Tcl_Encoding encoding;
Tcl_Obj *dataObj;
@@ -516,11 +517,11 @@
int
EncodingConvertfromObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *data; /* Byte array to convert */
Tcl_DString ds; /* Buffer to hold the string */
Tcl_Encoding encoding; /* Encoding to use */
@@ -612,11 +613,11 @@
int
EncodingConverttoObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *data; /* String to convert */
Tcl_DString ds; /* Buffer to hold the byte array */
Tcl_Encoding encoding; /* Encoding to use */
@@ -707,11 +708,11 @@
int
EncodingDirsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *dirListObj;
if (objc > 2) {
@@ -751,11 +752,11 @@
int
EncodingNamesObjCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Number of command line args */
+ Tcl_Size objc, /* Number of command line args */
Tcl_Obj* const objv[]) /* Vector of command line args */
{
if (objc > 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -779,11 +780,11 @@
int
EncodingProfilesObjCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Number of command line args */
+ Tcl_Size objc, /* Number of command line args */
Tcl_Obj* const objv[]) /* Vector of command line args */
{
if (objc > 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -810,11 +811,11 @@
int
EncodingSystemObjCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Number of command line args */
+ Tcl_Size objc, /* Number of command line args */
Tcl_Obj* const objv[]) /* Vector of command line args */
{
if (objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?encoding?");
return TCL_ERROR;
@@ -847,11 +848,11 @@
int
Tcl_ErrorObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *options, *optName;
if ((objc < 2) || (objc > 4)) {
@@ -909,21 +910,21 @@
int
Tcl_EvalObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *objPtr;
Interp *iPtr = (Interp *) interp;
CmdFrame *invoker = NULL;
@@ -978,11 +979,11 @@
int
Tcl_ExitObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt value;
if ((objc != 1) && (objc != 2)) {
@@ -1025,21 +1026,21 @@
int
Tcl_ExprObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *resultPtr, *objPtr;
if (objc < 2) {
@@ -1173,11 +1174,11 @@
static int
FileAttrAccessTimeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
struct utimbuf tval;
@@ -1255,11 +1256,11 @@
static int
FileAttrModifyTimeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
struct utimbuf tval;
@@ -1334,11 +1335,11 @@
static int
FileAttrLinkStatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
if (objc < 2 || objc > 3) {
@@ -1374,11 +1375,11 @@
static int
FileAttrStatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
if (objc < 2 || objc > 3) {
@@ -1414,11 +1415,11 @@
static int
FileAttrTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
if (objc != 2) {
@@ -1452,11 +1453,11 @@
static int
FileAttrSizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
if (objc != 2) {
@@ -1489,11 +1490,11 @@
static int
FileAttrIsDirectoryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
int value = 0;
@@ -1527,11 +1528,11 @@
static int
FileAttrIsExecutableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name");
return TCL_ERROR;
@@ -1558,11 +1559,11 @@
static int
FileAttrIsExistingCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name");
return TCL_ERROR;
@@ -1589,11 +1590,11 @@
static int
FileAttrIsFileCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_StatBuf buf;
int value = 0;
@@ -1627,11 +1628,11 @@
static int
FileAttrIsOwnedCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
#ifdef __CYGWIN__
#define geteuid() (short)(geteuid)()
#endif
@@ -1689,11 +1690,11 @@
static int
FileAttrIsReadableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name");
return TCL_ERROR;
@@ -1720,11 +1721,11 @@
static int
FileAttrIsWritableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name");
return TCL_ERROR;
@@ -1751,11 +1752,11 @@
static int
PathDirNameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
if (objc != 2) {
@@ -1790,11 +1791,11 @@
static int
PathExtensionCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
if (objc != 2) {
@@ -1829,11 +1830,11 @@
static int
PathRootNameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
if (objc != 2) {
@@ -1868,11 +1869,11 @@
static int
PathTailCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirPtr;
if (objc != 2) {
@@ -1907,11 +1908,11 @@
static int
PathFilesystemCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *fsInfo;
if (objc != 2) {
@@ -1948,11 +1949,11 @@
static int
PathJoinCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?");
return TCL_ERROR;
@@ -1980,11 +1981,11 @@
static int
PathNativeNameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_DString ds;
if (objc != 2) {
@@ -2017,11 +2018,11 @@
static int
PathNormalizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *fileName;
if (objc != 2) {
@@ -2055,11 +2056,11 @@
static int
PathSplitCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *res;
if (objc != 2) {
@@ -2098,11 +2099,11 @@
static int
PathTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *typeName;
if (objc != 2) {
@@ -2146,11 +2147,11 @@
static int
FilesystemSeparatorCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc < 1 || objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?name?");
return TCL_ERROR;
@@ -2201,11 +2202,11 @@
static int
FilesystemVolumesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -2509,21 +2510,21 @@
int
Tcl_ForObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
ForIterData *iterPtr;
@@ -2703,41 +2704,41 @@
int
Tcl_ForeachObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
return EachloopCmd(interp, TCL_EACH_KEEP_NONE, objc, objv);
}
int
Tcl_LmapObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
return EachloopCmd(interp, TCL_EACH_COLLECT, objc, objv);
}
@@ -2745,11 +2746,11 @@
EachloopCmd(
Tcl_Interp *interp, /* Our context for variables and script
* evaluation. */
int collect, /* Select collecting or accumulating mode
* (TCL_EACH_*) */
- int objc, /* The arguments being passed in... */
+ Tcl_Size objc, /* The arguments being passed in... */
Tcl_Obj *const objv[])
{
int numLists = (objc-2) / 2;
struct ForeachState *statePtr;
int i, result;
@@ -3062,11 +3063,11 @@
int
Tcl_FormatObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *resultPtr; /* Where result is stored finally. */
if (objc < 2) {
Index: generic/tclCmdIL.c
==================================================================
--- generic/tclCmdIL.c
+++ generic/tclCmdIL.c
@@ -113,32 +113,32 @@
* Forward declarations for procedures defined in this file:
*/
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,
SortInfo *infoPtr);
static Tcl_Obj * SelectObjFromSublist(Tcl_Obj *firstPtr,
@@ -203,21 +203,21 @@
int
Tcl_IfObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *boolObj;
if (objc <= 1) {
@@ -245,13 +245,13 @@
void *data[],
Tcl_Interp *interp,
int result)
{
Interp *iPtr = (Interp *) interp;
- int objc = PTR2INT(data[0]);
+ Tcl_Size objc = PTR2INT(data[0]);
Tcl_Obj *const *objv = (Tcl_Obj *const *)data[1];
- int i = PTR2INT(data[2]);
+ Tcl_Size i = PTR2INT(data[2]);
Tcl_Obj *boolObj = (Tcl_Obj *)data[3];
int value, thenScriptIndex = 0;
const char *clause;
if (result != TCL_OK) {
@@ -386,11 +386,11 @@
int
Tcl_IncrObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *newValuePtr, *incrPtr;
if ((objc != 2) && (objc != 3)) {
@@ -467,11 +467,11 @@
static int
InfoArgsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
const char *name;
Proc *procPtr;
@@ -530,11 +530,11 @@
static int
InfoBodyCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
const char *name, *bytes;
Proc *procPtr;
@@ -591,11 +591,11 @@
static int
InfoCmdCountCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
if (objc != 1) {
@@ -633,11 +633,11 @@
static int
InfoCommandsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *cmdName, *pattern;
const char *simplePattern;
Tcl_HashEntry *entryPtr;
@@ -910,11 +910,11 @@
static int
InfoCompleteCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "command");
return TCL_ERROR;
@@ -947,11 +947,11 @@
static int
InfoDefaultCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
const char *procName, *argName;
Proc *procPtr;
@@ -1030,11 +1030,11 @@
static int
InfoErrorStackCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *target;
Interp *iPtr;
@@ -1079,11 +1079,11 @@
int
TclInfoExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *varName;
Var *varPtr;
@@ -1124,11 +1124,11 @@
static int
InfoFrameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
int level, code = TCL_OK;
CmdFrame *framePtr, **cmdFramePtrPtr = &iPtr->cmdFramePtr;
@@ -1469,11 +1469,11 @@
static int
InfoFunctionsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *script;
int code;
@@ -1534,11 +1534,11 @@
static int
InfoHostnameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name;
if (objc != 1) {
@@ -1580,11 +1580,11 @@
static int
InfoLevelCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
if (objc == 1) { /* Just "info level" */
@@ -1654,11 +1654,11 @@
static int
InfoLibraryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *libDirName;
if (objc != 1) {
@@ -1701,11 +1701,11 @@
static int
InfoLoadedCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *interpName, *prefix;
if (objc > 3) {
@@ -1749,11 +1749,11 @@
static int
InfoNameOfExecutableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -1785,11 +1785,11 @@
static int
InfoPatchLevelCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *patchlevel;
if (objc != 1) {
@@ -1832,11 +1832,11 @@
static int
InfoProcsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *cmdName, *pattern;
const char *simplePattern;
Namespace *nsPtr;
@@ -1973,11 +1973,11 @@
static int
InfoScriptCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
if ((objc != 1) && (objc != 2)) {
@@ -2021,11 +2021,11 @@
static int
InfoSharedlibCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -2059,11 +2059,11 @@
static int
InfoTclVersionCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *version;
if (objc != 1) {
@@ -2102,11 +2102,11 @@
static int
InfoCmdTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Command command;
if (objc != 2) {
@@ -2123,11 +2123,11 @@
* There's one special case: safe child interpreters can't see aliases as
* aliases as they're part of the security mechanisms.
*/
if (Tcl_IsSafe(interp)
- && (((Command *) command)->objProc == TclAliasObjCmd)) {
+ && (((Command *) command)->objProc2 == TclAliasObjCmd)) {
Tcl_AppendResult(interp, "native", (char *)NULL);
} else {
Tcl_SetObjResult(interp,
Tcl_NewStringObj(TclGetCommandTypeName(command), -1));
}
@@ -2153,11 +2153,11 @@
int
Tcl_JoinObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Size length, listLen;
int isAbstractList = 0;
Tcl_Obj *resObjPtr = NULL, *joinObjPtr, **elemPtrs;
@@ -2255,11 +2255,11 @@
int
Tcl_LassignObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listPtr;
Tcl_Size listObjc; /* The length of the list. */
Tcl_Size origListObjc; /* Original length */
@@ -2367,11 +2367,11 @@
int
Tcl_LindexObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *elemPtr; /* Pointer to the element being extracted. */
if (objc < 2) {
@@ -2425,11 +2425,11 @@
int
Tcl_LinsertObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listPtr;
Tcl_Size len, index;
int copied = 0, result;
@@ -2518,11 +2518,11 @@
int
Tcl_ListObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* The argument objects. */
{
/*
* If there are no list elements, the result is an empty object.
@@ -2554,11 +2554,11 @@
int
Tcl_LlengthObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* Argument objects. */
{
Tcl_Size listLen;
int result;
@@ -2603,11 +2603,11 @@
int
Tcl_LpopObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* Argument objects. */
{
Tcl_Size listLen;
int copied = 0, result;
@@ -2722,11 +2722,11 @@
int
Tcl_LrangeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* Argument objects. */
{
int result;
Tcl_Size listLen, first, last;
@@ -2804,11 +2804,11 @@
int
Tcl_LremoveObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size i, idxc, prevIdx, first, num;
Tcl_Size *idxv, listLen;
Tcl_Obj *listObj;
@@ -2935,11 +2935,11 @@
int
Tcl_LrepeatObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[])
/* The argument objects. */
{
Tcl_WideInt elementCount, i;
Tcl_Size totalElems;
@@ -3050,11 +3050,11 @@
int
Tcl_LreplaceObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listPtr;
Tcl_Size numToDelete, listLen, first, last;
int result;
@@ -3152,11 +3152,11 @@
int
Tcl_LreverseObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
Tcl_Obj **elemv;
Tcl_Size elemc, i, j;
@@ -3255,11 +3255,11 @@
int
Tcl_LsearchObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
const char *bytes, *patternBytes;
int match, result=TCL_OK, bisect;
Tcl_Size i, length = 0, listc, elemLen, start, index;
@@ -4129,11 +4129,11 @@
int
Tcl_LseqObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Obj *elementCount = NULL;
Tcl_Obj *start = NULL, *end = NULL, *step = NULL;
Tcl_WideInt values[5];
@@ -4143,11 +4143,12 @@
int useDoubles = 0;
int remNums = 3;
Tcl_Obj *arithSeriesPtr;
SequenceOperators opmode;
SequenceDecoded decoded;
- int i, arg_key = 0, value_i = 0;
+ Tcl_Size i;
+ int arg_key = 0, value_i = 0;
/* Default constants */
#define zero ((Interp *)interp)->execEnvPtr->constants[0];
#define one ((Interp *)interp)->execEnvPtr->constants[1];
/*
@@ -4416,11 +4417,11 @@
int
Tcl_LsetObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
Tcl_Obj *listPtr; /* Pointer to the list being altered. */
Tcl_Obj *finalValuePtr; /* Value finally assigned to the variable. */
@@ -4509,11 +4510,11 @@
int
Tcl_LsortObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
int indices, nocase = 0, indexc;
int sortMode = SORTMODE_ASCII;
int group, allocatedIndexVector = 0;
@@ -5026,11 +5027,11 @@
int
Tcl_LeditObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
Tcl_Obj *listPtr; /* Pointer to the list being altered. */
Tcl_Obj *finalValuePtr; /* Value finally assigned to the variable. */
int createdNewObj;
Index: generic/tclCmdMZ.c
==================================================================
--- generic/tclCmdMZ.c
+++ generic/tclCmdMZ.c
@@ -28,11 +28,11 @@
static Tcl_NRPostProc TryPostBody;
static Tcl_NRPostProc TryPostFinal;
static Tcl_NRPostProc TryPostHandler;
static int UniCharIsAscii(int character);
static int UniCharIsHexDigit(int character);
-static int StringCmpOpts(Tcl_Interp *interp, int objc,
+static int StringCmpOpts(Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], int *nocase,
Tcl_Size *reqlength);
/*
* Default set of characters to trim in [string trim] and friends. This is a
@@ -86,11 +86,11 @@
int
Tcl_PwdObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *retVal;
if (objc != 1) {
@@ -126,15 +126,15 @@
int
Tcl_RegexpObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tcl_Size offset, stringLength, matchLength, cflags, eflags;
- int i, indices, match, about, all, doinline, numMatchesSaved;
+ Tcl_Size 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;
static const char *const options[] = {
"-all", "-about", "-indices", "-inline",
@@ -373,11 +373,11 @@
/*
* Only adjust the match area if there was a match for that
* area. (Scriptics Bug 4391/SF Bug #219232)
*/
- if (i <= (int)info.nsubs && info.matches[i].start >= 0) {
+ if (i <= info.nsubs && info.matches[i].start >= 0) {
start = offset + info.matches[i].start;
end = offset + info.matches[i].end;
/*
* Adjust index so it refers to the last character in the
@@ -395,11 +395,11 @@
TclNewIndexObj(objs[0], start);
TclNewIndexObj(objs[1], end);
newPtr = Tcl_NewListObj(2, objs);
} else {
- if ((i <= (int)info.nsubs) && (info.matches[i].end > 0)) {
+ if ((i <= info.nsubs) && (info.matches[i].end > 0)) {
newPtr = Tcl_GetRange(objPtr,
offset + info.matches[i].start,
offset + info.matches[i].end - 1);
} else {
TclNewObj(newPtr);
@@ -485,11 +485,11 @@
int
Tcl_RegsubObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result, cflags, all, match, command;
Tcl_Size idx, wlen, wsublen = 0, offset, numMatches, numParts;
Tcl_Size start, end, subStart, subEnd;
@@ -1005,11 +1005,11 @@
int
Tcl_RenameObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *oldName, *newName;
if (objc != 3) {
@@ -1041,11 +1041,11 @@
int
Tcl_ReturnObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int code, level;
Tcl_Obj *returnOpts;
@@ -1088,21 +1088,21 @@
int
Tcl_SourceObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *encodingName = NULL;
Tcl_Obj *fileName;
int result;
@@ -1172,11 +1172,11 @@
int
Tcl_SplitObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch = 0;
int len;
const char *splitChars;
@@ -1305,11 +1305,11 @@
static int
StringFirstCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size start = TCL_INDEX_START;
if (objc < 3 || objc > 4) {
@@ -1349,11 +1349,11 @@
static int
StringLastCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size last = TCL_SIZE_MAX;
if (objc < 3 || objc > 4) {
@@ -1393,11 +1393,11 @@
static int
StringIndexCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size index, end;
if (objc != 3) {
@@ -1460,11 +1460,11 @@
static int
StringInsertCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter */
- int objc, /* Number of arguments */
+ Tcl_Size objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
{
Tcl_Size length; /* String length */
Tcl_Size index; /* Insert index */
Tcl_Obj *outObj; /* Output object */
@@ -1517,17 +1517,17 @@
static int
StringIsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
- Tcl_Size failat = 0, length1, length2, length3;
+ int result = 1, strict = 0;
+ Tcl_Size i, failat = 0, length1, length2, length3;
Tcl_Obj *objPtr, *failVarObj = NULL;
Tcl_WideInt w;
static const char *const isClasses[] = {
"alnum", "alpha", "ascii", "control",
@@ -1949,11 +1949,11 @@
static int
StringMapCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size length1, length2, mapElemc, index;
int nocase = 0, mapWithDict = 0, copySource = 0;
Tcl_Obj **mapElemv, *sourceObj, *resultPtr;
@@ -2225,11 +2225,11 @@
static int
StringMatchCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int nocase = 0;
if (objc < 3 || objc > 4) {
@@ -2276,11 +2276,11 @@
static int
StringRangeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size first, last, end;
if (objc != 4) {
@@ -2326,11 +2326,11 @@
static int
StringReptCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt count;
Tcl_Obj *resultPtr;
@@ -2382,11 +2382,11 @@
static int
StringRplcCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size first, last, end;
if (objc < 4 || objc > 5) {
@@ -2459,11 +2459,11 @@
static int
StringRevCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "string");
return TCL_ERROR;
@@ -2492,11 +2492,11 @@
static int
StringStartCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch;
const Tcl_UniChar *p, *string;
Tcl_Size cur, index, length;
@@ -2563,11 +2563,11 @@
static int
StringEndCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int ch;
const Tcl_UniChar *p, *end, *string;
Tcl_Size cur, index, length;
@@ -2625,22 +2625,22 @@
static int
StringEqualCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/*
* Remember to keep code here in some sync with the byte-compiled versions
* in tclExecute.c (INST_STR_EQ, INST_STR_NEQ and INST_STR_CMP as well as
* the expr string comparison in INST_EQ/INST_NEQ/INST_LT/...).
*/
const char *string2;
- int i, match, nocase = 0;
- Tcl_Size length;
+ int match, nocase = 0;
+ Tcl_Size i, length;
Tcl_WideInt reqlength = -1;
if (objc < 3 || objc > 6) {
str_cmp_args:
Tcl_WrongNumArgs(interp, 1, objv,
@@ -2705,11 +2705,11 @@
static int
StringCmpCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/*
* Remember to keep code here in some sync with the byte-compiled versions
* in tclExecute.c (INST_STR_EQ, INST_STR_NEQ and INST_STR_CMP as well as
@@ -2731,17 +2731,16 @@
}
int
StringCmpOpts(
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument objects. */
int *nocase,
Tcl_Size *reqlength)
{
- int i;
- Tcl_Size length;
+ Tcl_Size i, length;
const char *string;
Tcl_WideInt wreqlength = -1;
*nocase = 0;
if (objc < 3 || objc > 6) {
@@ -2800,11 +2799,11 @@
static int
StringCatCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *objResultPtr;
if (objc < 2) {
@@ -2845,11 +2844,11 @@
static int
StringLenCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "string");
return TCL_ERROR;
@@ -2879,11 +2878,11 @@
static int
StringLowerCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size length1, length2;
const char *string1;
char *string2;
@@ -2964,11 +2963,11 @@
static int
StringUpperCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size length1, length2;
const char *string1;
char *string2;
@@ -3049,11 +3048,11 @@
static int
StringTitleCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size length1, length2;
const char *string1;
char *string2;
@@ -3134,11 +3133,11 @@
static int
StringTrimCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *string2;
Tcl_Size triml, trimr, length1, length2;
@@ -3181,11 +3180,11 @@
static int
StringTrimLCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *string2;
int trim;
Tcl_Size length1, length2;
@@ -3228,11 +3227,11 @@
static int
StringTrimRCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *string2;
int trim;
Tcl_Size length1, length2;
@@ -3371,21 +3370,21 @@
int
Tcl_SubstObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int flags;
if (objc < 2) {
@@ -3419,24 +3418,24 @@
int
Tcl_SwitchObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, mode, foundmode, splitObjs, numMatchesSaved;
- int noCase;
+ int noCase, mode, foundmode, splitObjs, numMatchesSaved;
+ Tcl_Size i;
Tcl_Size patternLength, j;
const char *pattern;
Tcl_Obj *stringObj, *indexVarObj, *matchVarObj;
Tcl_Obj *const *savedObjv = objv;
Tcl_RegExp regExpr = NULL;
@@ -3516,11 +3515,11 @@
* regexp information into.
*/
case OPT_INDEXV:
i++;
- if (i >= objc-2) {
+ if (i + 2 >= objc) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"missing variable name argument to %s option",
"-indexvar"));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH",
"NOVAR", (char *)NULL);
@@ -3529,11 +3528,11 @@
indexVarObj = objv[i];
numMatchesSaved = -1;
break;
case OPT_MATCHV:
i++;
- if (i >= objc-2) {
+ if (i + 2 >= objc) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"missing variable name argument to %s option",
"-matchvar"));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SWITCH",
"NOVAR", (char *)NULL);
@@ -3544,11 +3543,11 @@
break;
}
}
finishedOptions:
- if (objc - i < 2) {
+ if (objc < i + 2) {
Tcl_WrongNumArgs(interp, 1, objv,
"?-option ...? string ?pattern body ...? ?default body?");
return TCL_ERROR;
}
if (indexVarObj != NULL && mode != OPT_REGEXP) {
@@ -3663,11 +3662,11 @@
* See if the pattern matches the string.
*/
pattern = TclGetStringFromObj(objv[i], &patternLength);
- if ((i == objc - 2) && (*pattern == 'd')
+ if ((i + 2 == objc) && (*pattern == 'd')
&& (strcmp(pattern, "default") == 0)) {
Tcl_Obj *emptyObj = NULL;
/*
* If either indexVarObj or matchVarObj are non-NULL, we're in
@@ -3962,11 +3961,11 @@
int
Tcl_ThrowObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *options;
Tcl_Size len;
@@ -4024,11 +4023,11 @@
int
Tcl_TimeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *objPtr;
Tcl_Obj *objs[4];
int i, result;
@@ -4122,18 +4121,19 @@
int
Tcl_TimeRateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
+ Tcl_Size i;
Tcl_Obj *calibrate = NULL, *direct = NULL;
Tcl_WideUInt count = 0; /* Holds repetition count */
Tcl_WideInt maxms = WIDE_MIN;
/* Maximal running time (in milliseconds) */
Tcl_WideUInt maxcnt = WIDE_MAX;
@@ -4156,11 +4156,11 @@
TMRT_EV_DIRECT, TMRT_OVERHEAD, TMRT_CALIBRATE, TMRT_LAST
};
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,
&index) != TCL_OK) {
break;
@@ -4172,11 +4172,11 @@
switch (index) {
case TMRT_EV_DIRECT:
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) {
return TCL_ERROR;
}
@@ -4187,11 +4187,11 @@
case TMRT_LAST:
break;
}
}
- if (i >= objc || i < objc - 3) {
+ if (i >= objc || i + 3 < objc) {
usage:
Tcl_WrongNumArgs(interp, 1, objv,
"?-direct? ?-calibrate? ?-overhead double? "
"command ?time ?max-count??");
return TCL_ERROR;
@@ -4669,26 +4669,26 @@
int
Tcl_TryObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *bodyObj, *handlersObj, *finallyObj = NULL;
- int i, bodyShared, haveHandlers, code;
- Tcl_Size dummy;
+ int bodyShared, haveHandlers, code;
+ Tcl_Size i, dummy;
static const char *const handlerNames[] = {
"finally", "on", "trap", NULL
};
enum Handlers {
TryFinally, TryOn, TryTrap
@@ -4718,18 +4718,18 @@
Tcl_DecrRefCount(handlersObj);
return TCL_ERROR;
}
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", (char *)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));
Tcl_DecrRefCount(handlersObj);
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "FINALLY",
@@ -4738,11 +4738,11 @@
}
finallyObj = objv[++i];
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));
Tcl_DecrRefCount(handlersObj);
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "ON",
@@ -4756,11 +4756,11 @@
}
info[2] = NULL;
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\"",
-1));
Tcl_DecrRefCount(handlersObj);
@@ -5242,21 +5242,21 @@
int
Tcl_WhileObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
ForIterData *iterPtr;
if (objc != 3) {
Index: generic/tclCompCmds.c
==================================================================
--- generic/tclCompCmds.c
+++ generic/tclCompCmds.c
@@ -820,11 +820,11 @@
{
if (parsePtr->numWords != 1) {
return TCL_ERROR;
}
- TclEmitInstInt1(INST_CLOCK_READ, PTR2INT(cmdPtr->objClientData), envPtr);
+ TclEmitInstInt1(INST_CLOCK_READ, PTR2INT(cmdPtr->objClientData2), envPtr);
return TCL_OK;
}
/*
@@ -3016,11 +3016,11 @@
void *clientData) /* The foreach command's compilation auxiliary
* data to free. */
{
ForeachInfo *infoPtr = (ForeachInfo *)clientData;
ForeachVarList *listPtr;
- size_t i, numLists = infoPtr->numLists;
+ Tcl_Size i, numLists = infoPtr->numLists;
for (i = 0; i < numLists; i++) {
listPtr = infoPtr->varLists[i];
Tcl_Free(listPtr);
}
@@ -3494,13 +3494,13 @@
int *localIndexPtr, /* Must not be NULL. */
int *isScalarPtr) /* Must not be NULL. */
{
const char *p;
const char *last, *name, *elName;
- size_t n;
+ Tcl_Size n;
Tcl_Token *elemTokenPtr = NULL;
- size_t nameLen, elNameLen;
+ Tcl_Size nameLen, elNameLen;
int simpleVarName, localIndex;
int elemTokenCount = 0, allocedTokens = 0, removedParen = 0;
/*
* Decide if we can use a frame slot for the var/array name or if we need
Index: generic/tclCompCmdsSZ.c
==================================================================
--- generic/tclCompCmdsSZ.c
+++ generic/tclCompCmdsSZ.c
@@ -1450,12 +1450,12 @@
TCL_UNUSED(Command *),
CompileEnv *envPtr) /* Holds resulting instructions. */
{
DefineLineInformation; /* TIP #280 */
int numArgs = parsePtr->numWords - 1;
- int numOpts = numArgs - 1;
- int objc, flags = TCL_SUBST_ALL;
+ Tcl_Size objc, numOpts = numArgs - 1;
+ int flags = TCL_SUBST_ALL;
Tcl_Obj **objv/*, *toSubst = NULL*/;
Tcl_Token *wordTokenPtr = TokenAfter(parsePtr->tokenPtr);
int code = TCL_ERROR;
if (numArgs == 0) {
Index: generic/tclCompExpr.c
==================================================================
--- generic/tclCompExpr.c
+++ generic/tclCompExpr.c
@@ -2619,11 +2619,11 @@
int
TclSingleOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData;
unsigned char lexeme;
OpNode nodes[2];
@@ -2672,11 +2672,11 @@
int
TclSortingOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
int code = TCL_OK;
if (objc < 3) {
@@ -2685,11 +2685,12 @@
TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData;
Tcl_Obj **litObjv = (Tcl_Obj **)TclStackAlloc(interp,
2 * (objc-2) * sizeof(Tcl_Obj *));
OpNode *nodes = (OpNode *)TclStackAlloc(interp, 2 * (objc-2) * sizeof(OpNode));
unsigned char lexeme;
- int i, lastAnd = 1;
+ Tcl_Size i;
+ int lastAnd = 1;
Tcl_Obj *const *litObjPtrPtr = litObjv;
ParseLexeme(occdPtr->op, strlen(occdPtr->op), &lexeme, NULL);
litObjv[0] = objv[1];
@@ -2752,11 +2753,11 @@
int
TclVariadicOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData;
unsigned char lexeme;
int code;
@@ -2811,11 +2812,12 @@
Tcl_DecrRefCount(litObjv[decrMe]);
return code;
} else {
Tcl_Obj *const *litObjv = objv + 1;
OpNode *nodes = (OpNode *)TclStackAlloc(interp, (objc-1) * sizeof(OpNode));
- int i, lastOp = OT_LITERAL;
+ Tcl_Size i;
+ int lastOp = OT_LITERAL;
nodes[0].lexeme = START;
nodes[0].mark = MARK_RIGHT;
if (lexeme == EXPON) {
for (i=objc-2; i>0; i--) {
@@ -2871,11 +2873,11 @@
int
TclNoIdentOpCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
TclOpCmdClientData *occdPtr = (TclOpCmdClientData *)clientData;
if (objc < 2) {
Index: generic/tclCompile.h
==================================================================
--- generic/tclCompile.h
+++ generic/tclCompile.h
@@ -318,14 +318,12 @@
unsigned char *codeNext; /* Points to next code array byte to use. */
unsigned char *codeEnd; /* Points just after the last allocated code
* array byte. */
int mallocedCodeArray; /* Set 1 if code array was expanded and
* codeStart points into the heap.*/
-#if TCL_MAJOR_VERSION > 8
int mallocedExceptArray; /* 1 if ExceptionRange array was expanded and
* exceptArrayPtr points in heap, else 0. */
-#endif
LiteralEntry *literalArrayPtr;
/* Points to start of LiteralEntry array. */
Tcl_Size literalArrayNext; /* Index of next free object array entry. */
Tcl_Size literalArrayEnd; /* Index just after last obj array entry. */
int mallocedLiteralArray; /* 1 if object array was expanded and objArray
@@ -337,13 +335,10 @@
* exceptArrayNext is the number of ranges and
* (exceptArrayNext-1) is the index of the
* current range's array entry. */
Tcl_Size exceptArrayEnd; /* Index after the last ExceptionRange array
* entry. */
-#if TCL_MAJOR_VERSION < 9
- int mallocedExceptArray;
-#endif
ExceptionAux *exceptAuxArrayPtr;
/* Array of information used to restore the
* state when processing BREAK/CONTINUE
* exceptions. Must be the same size as the
* exceptArrayPtr. */
@@ -352,23 +347,18 @@
* to use; (numCommands-1) is the entry index
* for the last command. */
Tcl_Size cmdMapEnd; /* Index after last CmdLocation entry. */
int mallocedCmdMap; /* 1 if command map array was expanded and
* cmdMapPtr points in the heap, else 0. */
-#if TCL_MAJOR_VERSION > 8
int mallocedAuxDataArray; /* 1 if aux data array was expanded and
* auxDataArrayPtr points in heap else 0. */
-#endif
AuxData *auxDataArrayPtr; /* Points to auxiliary data array start. */
Tcl_Size auxDataArrayNext; /* Next free compile aux data array index.
* auxDataArrayNext is the number of aux data
* items and (auxDataArrayNext-1) is index of
* current aux data array entry. */
Tcl_Size auxDataArrayEnd; /* Index after last aux data array entry. */
-#if TCL_MAJOR_VERSION < 9
- int mallocedAuxDataArray;
-#endif
unsigned char staticCodeSpace[COMPILEENV_INIT_CODE_BYTES];
/* Initial storage for code. */
LiteralEntry staticLiteralSpace[COMPILEENV_INIT_NUM_OBJECTS];
/* Initial storage of LiteralEntry array. */
ExceptionRange staticExceptArraySpace[COMPILEENV_INIT_EXCEPT_RANGES];
@@ -1070,12 +1060,11 @@
*----------------------------------------------------------------
* Procedures exported by tclBasic.c to be used within the engine.
*----------------------------------------------------------------
*/
-#if TCL_MAJOR_VERSION > 8
-MODULE_SCOPE Tcl_ObjCmdProc TclNRInterpCoroutine;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNRInterpCoroutine;
/*
*----------------------------------------------------------------
* Procedures exported by the engine to be used by tclBasic.c
*----------------------------------------------------------------
@@ -1190,14 +1179,14 @@
MODULE_SCOPE void TclPreserveByteCode(ByteCode *codePtr);
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);
#endif
MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr,
@@ -1210,11 +1199,10 @@
const unsigned char *pc, Tcl_Obj **tosPtr);
MODULE_SCOPE Tcl_Obj * TclNewInstNameObj(unsigned char inst);
MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], int isLambda);
-#endif /* TCL_MAJOR_VERSION > 8 */
/*
*----------------------------------------------------------------
* Macros and flag values used by Tcl bytecode compilation and execution
* modules inside the Tcl core but not used outside.
Index: generic/tclConfig.c
==================================================================
--- generic/tclConfig.c
+++ generic/tclConfig.c
@@ -39,11 +39,11 @@
/*
* 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);
/*
@@ -161,11 +161,11 @@
}
}
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");
}
@@ -191,11 +191,11 @@
static int
QueryConfigObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
QCCD *cdPtr = (QCCD *)clientData;
Tcl_Obj *pkgName = cdPtr->pkg;
Tcl_Obj *pDB, *pkgDict, *val, *listPtr;
Index: generic/tclDecls.h
==================================================================
--- generic/tclDecls.h
+++ generic/tclDecls.h
@@ -31,10 +31,15 @@
# define TCL_DEPRECATED(msg) MODULE_SCOPE
#else
# define TCL_DEPRECATED(msg) EXTERN
#endif
+#ifdef TCL_NO_DEPRECATED
+# define Tcl_ObjCmdProc void
+# define Tcl_CmdTraceProc void
+# define Tcl_CmdObjTraceProc void
+#endif /* TCL_NO_DEPRECATED */
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
* script. Any modifications to the function declarations below should be made
* in the generic/tcl.decls script.
@@ -59,22 +64,22 @@
const char *name, const char *version,
int exact, void *clientDataPtr);
/* 2 */
EXTERN TCL_NORETURN void Tcl_Panic(const char *format, ...) TCL_FORMAT_PRINTF(1, 2);
/* 3 */
-EXTERN void * Tcl_Alloc(TCL_HASH_TYPE size);
+EXTERN void * Tcl_Alloc(size_t size);
/* 4 */
EXTERN void Tcl_Free(void *ptr);
/* 5 */
-EXTERN void * Tcl_Realloc(void *ptr, TCL_HASH_TYPE size);
+EXTERN void * Tcl_Realloc(void *ptr, size_t size);
/* 6 */
-EXTERN void * Tcl_DbCkalloc(TCL_HASH_TYPE size, const char *file,
+EXTERN void * Tcl_DbCkalloc(size_t size, const char *file,
int line);
/* 7 */
EXTERN void Tcl_DbCkfree(void *ptr, const char *file, int line);
/* 8 */
-EXTERN void * Tcl_DbCkrealloc(void *ptr, TCL_HASH_TYPE size,
+EXTERN void * Tcl_DbCkrealloc(void *ptr, size_t size,
const char *file, int line);
/* 9 */
EXTERN void Tcl_CreateFileHandler(int fd, int mask,
Tcl_FileProc *proc, void *clientData);
/* 10 */
@@ -126,19 +131,13 @@
Tcl_Size length, const char *file, int line);
/* 29 */
EXTERN Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr);
/* 30 */
EXTERN void TclFreeObj(Tcl_Obj *objPtr);
-/* 31 */
-EXTERN int Tcl_GetBoolean(Tcl_Interp *interp, const char *src,
- int *intPtr);
-/* 32 */
-EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp,
- Tcl_Obj *objPtr, int *intPtr);
-/* 33 */
-EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr,
- Tcl_Size *numBytesPtr);
+/* Slot 31 is reserved */
+/* Slot 32 is reserved */
+/* Slot 33 is reserved */
/* 34 */
EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src,
double *doublePtr);
/* 35 */
EXTERN int Tcl_GetDoubleFromObj(Tcl_Interp *interp,
@@ -245,12 +244,11 @@
EXTERN void Tcl_CallWhenDeleted(Tcl_Interp *interp,
Tcl_InterpDeleteProc *proc, void *clientData);
/* 80 */
EXTERN void Tcl_CancelIdleCall(Tcl_IdleProc *idleProc,
void *clientData);
-/* 81 */
-EXTERN int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan);
+/* Slot 81 is reserved */
/* 82 */
EXTERN int Tcl_CommandComplete(const char *cmd);
/* 83 */
EXTERN char * Tcl_Concat(Tcl_Size argc, const char *const *argv);
/* 84 */
@@ -1034,11 +1032,11 @@
/* 392 */
EXTERN void Tcl_MutexFinalize(Tcl_Mutex *mutex);
/* 393 */
EXTERN int Tcl_CreateThread(Tcl_ThreadId *idPtr,
Tcl_ThreadCreateProc *proc, void *clientData,
- TCL_HASH_TYPE stackSize, int flags);
+ size_t stackSize, int flags);
/* 394 */
EXTERN Tcl_Size Tcl_ReadRaw(Tcl_Channel chan, char *dst,
Tcl_Size bytesToRead);
/* 395 */
EXTERN Tcl_Size Tcl_WriteRaw(Tcl_Channel chan, const char *src,
@@ -1120,18 +1118,18 @@
/* 427 */
EXTERN void Tcl_UntraceCommand(Tcl_Interp *interp,
const char *varName, int flags,
Tcl_CommandTraceProc *proc, void *clientData);
/* 428 */
-EXTERN void * Tcl_AttemptAlloc(TCL_HASH_TYPE size);
+EXTERN void * Tcl_AttemptAlloc(size_t size);
/* 429 */
-EXTERN void * Tcl_AttemptDbCkalloc(TCL_HASH_TYPE size,
- const char *file, int line);
+EXTERN void * Tcl_AttemptDbCkalloc(size_t size, const char *file,
+ int line);
/* 430 */
-EXTERN void * Tcl_AttemptRealloc(void *ptr, TCL_HASH_TYPE size);
+EXTERN void * Tcl_AttemptRealloc(void *ptr, size_t size);
/* 431 */
-EXTERN void * Tcl_AttemptDbCkrealloc(void *ptr, TCL_HASH_TYPE size,
+EXTERN void * Tcl_AttemptDbCkrealloc(void *ptr, size_t size,
const char *file, int line);
/* 432 */
EXTERN int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr,
Tcl_Size length);
/* 433 */
@@ -1709,11 +1707,11 @@
const char *mountPoint, int copy);
/* 636 */
EXTERN void Tcl_FreeInternalRep(Tcl_Obj *objPtr);
/* 637 */
EXTERN char * Tcl_InitStringRep(Tcl_Obj *objPtr, const char *bytes,
- TCL_HASH_TYPE numBytes);
+ size_t numBytes);
/* 638 */
EXTERN Tcl_ObjInternalRep * Tcl_FetchInternalRep(Tcl_Obj *objPtr,
const Tcl_ObjType *typePtr);
/* 639 */
EXTERN void Tcl_StoreInternalRep(Tcl_Obj *objPtr,
@@ -1887,16 +1885,16 @@
const TclStubHooks *hooks;
int (*tcl_PkgProvideEx) (Tcl_Interp *interp, const char *name, const char *version, const void *clientData); /* 0 */
const char * (*tcl_PkgRequireEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, void *clientDataPtr); /* 1 */
TCL_NORETURN1 void (*tcl_Panic) (const char *format, ...) TCL_FORMAT_PRINTF(1, 2); /* 2 */
- void * (*tcl_Alloc) (TCL_HASH_TYPE size); /* 3 */
+ void * (*tcl_Alloc) (size_t size); /* 3 */
void (*tcl_Free) (void *ptr); /* 4 */
- void * (*tcl_Realloc) (void *ptr, TCL_HASH_TYPE size); /* 5 */
- void * (*tcl_DbCkalloc) (TCL_HASH_TYPE size, const char *file, int line); /* 6 */
+ void * (*tcl_Realloc) (void *ptr, size_t size); /* 5 */
+ void * (*tcl_DbCkalloc) (size_t size, const char *file, int line); /* 6 */
void (*tcl_DbCkfree) (void *ptr, const char *file, int line); /* 7 */
- void * (*tcl_DbCkrealloc) (void *ptr, TCL_HASH_TYPE size, const char *file, int line); /* 8 */
+ void * (*tcl_DbCkrealloc) (void *ptr, size_t size, const char *file, int line); /* 8 */
void (*tcl_CreateFileHandler) (int fd, int mask, Tcl_FileProc *proc, void *clientData); /* 9 */
void (*tcl_DeleteFileHandler) (int fd); /* 10 */
void (*tcl_SetTimer) (const Tcl_Time *timePtr); /* 11 */
void (*tcl_Sleep) (int ms); /* 12 */
int (*tcl_WaitForEvent) (const Tcl_Time *timePtr); /* 13 */
@@ -1915,13 +1913,13 @@
void (*reserved26)(void);
Tcl_Obj * (*tcl_DbNewObj) (const char *file, int line); /* 27 */
Tcl_Obj * (*tcl_DbNewStringObj) (const char *bytes, Tcl_Size length, const char *file, int line); /* 28 */
Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj *objPtr); /* 29 */
void (*tclFreeObj) (Tcl_Obj *objPtr); /* 30 */
- int (*tcl_GetBoolean) (Tcl_Interp *interp, const char *src, int *intPtr); /* 31 */
- int (*tcl_GetBooleanFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 32 */
- unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, Tcl_Size *numBytesPtr); /* 33 */
+ void (*reserved31)(void);
+ void (*reserved32)(void);
+ void (*reserved33)(void);
int (*tcl_GetDouble) (Tcl_Interp *interp, const char *src, double *doublePtr); /* 34 */
int (*tcl_GetDoubleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr); /* 35 */
void (*reserved36)(void);
int (*tcl_GetInt) (Tcl_Interp *interp, const char *src, int *intPtr); /* 37 */
int (*tcl_GetIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 38 */
@@ -1965,11 +1963,11 @@
void (*reserved76)(void);
void (*reserved77)(void);
int (*tcl_BadChannelOption) (Tcl_Interp *interp, const char *optionName, const char *optionList); /* 78 */
void (*tcl_CallWhenDeleted) (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, void *clientData); /* 79 */
void (*tcl_CancelIdleCall) (Tcl_IdleProc *idleProc, void *clientData); /* 80 */
- int (*tcl_Close) (Tcl_Interp *interp, Tcl_Channel chan); /* 81 */
+ void (*reserved81)(void);
int (*tcl_CommandComplete) (const char *cmd); /* 82 */
char * (*tcl_Concat) (Tcl_Size argc, const char *const *argv); /* 83 */
Tcl_Size (*tcl_ConvertElement) (const char *src, char *dst, int flags); /* 84 */
Tcl_Size (*tcl_ConvertCountedElement) (const char *src, Tcl_Size length, char *dst, int flags); /* 85 */
int (*tcl_CreateAlias) (Tcl_Interp *childInterp, const char *childCmd, Tcl_Interp *target, const char *targetCmd, Tcl_Size argc, const char *const *argv); /* 86 */
@@ -2277,11 +2275,11 @@
int (*tcl_GetChannelNames) (Tcl_Interp *interp); /* 388 */
int (*tcl_GetChannelNamesEx) (Tcl_Interp *interp, const char *pattern); /* 389 */
int (*tcl_ProcObjCmd) (void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 390 */
void (*tcl_ConditionFinalize) (Tcl_Condition *condPtr); /* 391 */
void (*tcl_MutexFinalize) (Tcl_Mutex *mutex); /* 392 */
- int (*tcl_CreateThread) (Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc, void *clientData, TCL_HASH_TYPE stackSize, int flags); /* 393 */
+ int (*tcl_CreateThread) (Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc, void *clientData, size_t stackSize, int flags); /* 393 */
Tcl_Size (*tcl_ReadRaw) (Tcl_Channel chan, char *dst, Tcl_Size bytesToRead); /* 394 */
Tcl_Size (*tcl_WriteRaw) (Tcl_Channel chan, const char *src, Tcl_Size srcLen); /* 395 */
Tcl_Channel (*tcl_GetTopChannel) (Tcl_Channel chan); /* 396 */
int (*tcl_ChannelBuffered) (Tcl_Channel chan); /* 397 */
const char * (*tcl_ChannelName) (const Tcl_ChannelType *chanTypePtr); /* 398 */
@@ -2312,14 +2310,14 @@
void (*tcl_InitCustomHashTable) (Tcl_HashTable *tablePtr, int keyType, const Tcl_HashKeyType *typePtr); /* 423 */
void (*tcl_InitObjHashTable) (Tcl_HashTable *tablePtr); /* 424 */
void * (*tcl_CommandTraceInfo) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *procPtr, void *prevClientData); /* 425 */
int (*tcl_TraceCommand) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, void *clientData); /* 426 */
void (*tcl_UntraceCommand) (Tcl_Interp *interp, const char *varName, int flags, Tcl_CommandTraceProc *proc, void *clientData); /* 427 */
- void * (*tcl_AttemptAlloc) (TCL_HASH_TYPE size); /* 428 */
- void * (*tcl_AttemptDbCkalloc) (TCL_HASH_TYPE size, const char *file, int line); /* 429 */
- void * (*tcl_AttemptRealloc) (void *ptr, TCL_HASH_TYPE size); /* 430 */
- void * (*tcl_AttemptDbCkrealloc) (void *ptr, TCL_HASH_TYPE size, const char *file, int line); /* 431 */
+ void * (*tcl_AttemptAlloc) (size_t size); /* 428 */
+ void * (*tcl_AttemptDbCkalloc) (size_t size, const char *file, int line); /* 429 */
+ void * (*tcl_AttemptRealloc) (void *ptr, size_t size); /* 430 */
+ void * (*tcl_AttemptDbCkrealloc) (void *ptr, size_t size, const char *file, int line); /* 431 */
int (*tcl_AttemptSetObjLength) (Tcl_Obj *objPtr, Tcl_Size length); /* 432 */
Tcl_ThreadId (*tcl_GetChannelThread) (Tcl_Channel channel); /* 433 */
Tcl_UniChar * (*tclGetUnicodeFromObj) (Tcl_Obj *objPtr, void *lengthPtr); /* 434 */
void (*reserved435)(void);
void (*reserved436)(void);
@@ -2521,11 +2519,11 @@
int (*tclZipfs_Mount) (Tcl_Interp *interp, const char *zipname, const char *mountPoint, const char *passwd); /* 632 */
int (*tclZipfs_Unmount) (Tcl_Interp *interp, const char *mountPoint); /* 633 */
Tcl_Obj * (*tclZipfs_TclLibrary) (void); /* 634 */
int (*tclZipfs_MountBuffer) (Tcl_Interp *interp, const void *data, size_t datalen, const char *mountPoint, int copy); /* 635 */
void (*tcl_FreeInternalRep) (Tcl_Obj *objPtr); /* 636 */
- char * (*tcl_InitStringRep) (Tcl_Obj *objPtr, const char *bytes, TCL_HASH_TYPE numBytes); /* 637 */
+ char * (*tcl_InitStringRep) (Tcl_Obj *objPtr, const char *bytes, size_t numBytes); /* 637 */
Tcl_ObjInternalRep * (*tcl_FetchInternalRep) (Tcl_Obj *objPtr, const Tcl_ObjType *typePtr); /* 638 */
void (*tcl_StoreInternalRep) (Tcl_Obj *objPtr, const Tcl_ObjType *typePtr, const Tcl_ObjInternalRep *irPtr); /* 639 */
int (*tcl_HasStringRep) (Tcl_Obj *objPtr); /* 640 */
void (*tcl_IncrRefCount) (Tcl_Obj *objPtr); /* 641 */
void (*tcl_DecrRefCount) (Tcl_Obj *objPtr); /* 642 */
@@ -2649,16 +2647,13 @@
(tclStubsPtr->tcl_DbNewStringObj) /* 28 */
#define Tcl_DuplicateObj \
(tclStubsPtr->tcl_DuplicateObj) /* 29 */
#define TclFreeObj \
(tclStubsPtr->tclFreeObj) /* 30 */
-#define Tcl_GetBoolean \
- (tclStubsPtr->tcl_GetBoolean) /* 31 */
-#define Tcl_GetBooleanFromObj \
- (tclStubsPtr->tcl_GetBooleanFromObj) /* 32 */
-#define Tcl_GetByteArrayFromObj \
- (tclStubsPtr->tcl_GetByteArrayFromObj) /* 33 */
+/* Slot 31 is reserved */
+/* Slot 32 is reserved */
+/* Slot 33 is reserved */
#define Tcl_GetDouble \
(tclStubsPtr->tcl_GetDouble) /* 34 */
#define Tcl_GetDoubleFromObj \
(tclStubsPtr->tcl_GetDoubleFromObj) /* 35 */
/* Slot 36 is reserved */
@@ -2738,12 +2733,11 @@
(tclStubsPtr->tcl_BadChannelOption) /* 78 */
#define Tcl_CallWhenDeleted \
(tclStubsPtr->tcl_CallWhenDeleted) /* 79 */
#define Tcl_CancelIdleCall \
(tclStubsPtr->tcl_CancelIdleCall) /* 80 */
-#define Tcl_Close \
- (tclStubsPtr->tcl_Close) /* 81 */
+/* Slot 81 is reserved */
#define Tcl_CommandComplete \
(tclStubsPtr->tcl_CommandComplete) /* 82 */
#define Tcl_Concat \
(tclStubsPtr->tcl_Concat) /* 83 */
#define Tcl_ConvertElement \
@@ -3916,10 +3910,16 @@
/* !END!: Do not edit above this line. */
#undef TclUnusedStubEntry
+#ifdef TCL_NO_DEPRECATED
+# undef Tcl_ObjCmdProc
+# undef Tcl_CmdTraceProc
+# undef Tcl_CmdObjTraceProc
+#endif /* TCL_NO_DEPRECATED */
+
#ifdef _WIN32
# undef Tcl_CreateFileHandler
# undef Tcl_DeleteFileHandler
# undef Tcl_GetOpenFile
#endif
@@ -3978,27 +3978,10 @@
} \
} \
} while(0)
#if defined(USE_TCL_STUBS)
-# if defined(_WIN32) && defined(_WIN64) && TCL_MAJOR_VERSION < 9
-# undef Tcl_GetTime
-/* Handle Win64 tk.dll being loaded in Cygwin64 (only needed for Tcl 8). */
-# define Tcl_GetTime(t) \
- do { \
- struct { \
- Tcl_Time now; \
- long long reserved; \
- } _t; \
- _t.reserved = -1; \
- tclStubsPtr->tcl_GetTime((&_t.now)); \
- if (_t.reserved != -1) { \
- _t.now.usec = (long) _t.reserved; \
- } \
- *(t) = _t.now; \
- } while (0)
-# endif
# if defined(__CYGWIN__) && defined(TCL_WIDE_INT_IS_LONG)
/* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore
* we have to make sure that all stub entries on Cygwin64 follow the
* Win64 signature. Cygwin64 stubbed extensions cannot use those stub
* entries any more, they should use the 64-bit alternatives where
@@ -4047,30 +4030,26 @@
#endif /* !TCLBOOLWARNING */
#if defined(USE_TCL_STUBS)
#define Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, indexPtr) \
(tclStubsPtr->tcl_GetIndexFromObjStruct((interp), (objPtr), (tablePtr), (offset), (msg), \
(flags)|(int)(sizeof(*(indexPtr))<<1), (indexPtr)))
-#define Tcl_GetBooleanFromObj(interp, objPtr, boolPtr) \
- ((sizeof(*(boolPtr)) == sizeof(int) && (TCL_MAJOR_VERSION == 8)) ? tclStubsPtr->tcl_GetBooleanFromObj(interp, objPtr, (int *)(boolPtr)) : \
- ((sizeof(*(boolPtr)) <= sizeof(int)) ? Tcl_GetBoolFromObj(interp, objPtr, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) : \
- (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR)))
-#define Tcl_GetBoolean(interp, src, boolPtr) \
- ((sizeof(*(boolPtr)) == sizeof(int) && (TCL_MAJOR_VERSION == 8)) ? tclStubsPtr->tcl_GetBoolean(interp, src, (int *)(boolPtr)) : \
- ((sizeof(*(boolPtr)) <= sizeof(int)) ? Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) : \
- (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR)))
+#define Tcl_GetBooleanFromObj(interp, objPtr, boolPtr) ((sizeof(*(boolPtr)) <= sizeof(int)) \
+ ? Tcl_GetBoolFromObj(interp, objPtr, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) \
+ : (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR))
+#define Tcl_GetBoolean(interp, src, boolPtr) ((sizeof(*(boolPtr)) <= sizeof(int)) \
+ ? Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) \
+ : (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR))
#else
#define Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, indexPtr) \
((Tcl_GetIndexFromObjStruct)((interp), (objPtr), (tablePtr), (offset), (msg), \
(flags)|(int)(sizeof(*(indexPtr))<<1), (indexPtr)))
-#define Tcl_GetBooleanFromObj(interp, objPtr, boolPtr) \
- ((sizeof(*(boolPtr)) == sizeof(int) && (TCL_MAJOR_VERSION == 8)) ? Tcl_GetBooleanFromObj(interp, objPtr, (int *)(boolPtr)) : \
- ((sizeof(*(boolPtr)) <= sizeof(int)) ? Tcl_GetBoolFromObj(interp, objPtr, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) : \
- (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR)))
-#define Tcl_GetBoolean(interp, src, boolPtr) \
- ((sizeof(*(boolPtr)) == sizeof(int) && (TCL_MAJOR_VERSION == 8)) ? Tcl_GetBoolean(interp, src, (int *)(boolPtr)) : \
- ((sizeof(*(boolPtr)) <= sizeof(int)) ? Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) : \
- (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR)))
+#define Tcl_GetBooleanFromObj(interp, objPtr, boolPtr) ((sizeof(*(boolPtr)) <= sizeof(int)) \
+ ? Tcl_GetBoolFromObj(interp, objPtr, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) \
+ : (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR))
+#define Tcl_GetBoolean(interp, src, boolPtr) ((sizeof(*(boolPtr)) <= sizeof(int)) \
+ ? Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)) \
+ : (TCLBOOLWARNING(boolPtr)Tcl_Panic("sizeof(%s) must be <= sizeof(int)", & #boolPtr [1]),TCL_ERROR))
#endif
#ifdef TCL_MEM_DEBUG
# undef Tcl_Alloc
# define Tcl_Alloc(x) \
@@ -4163,20 +4142,23 @@
#define Tcl_EvalObj(interp, objPtr) \
Tcl_EvalObjEx(interp, objPtr, 0)
#define Tcl_GlobalEvalObj(interp, objPtr) \
Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL)
-
-#if TCL_MAJOR_VERSION > 8
-# undef Tcl_Close
-# define Tcl_Close(interp, chan) Tcl_CloseEx(interp, chan, 0)
-#endif
+#define Tcl_Close(interp, chan) Tcl_CloseEx(interp, chan, 0)
#undef TclUtfCharComplete
#undef TclUtfNext
#undef TclUtfPrev
-#ifndef TCL_NO_DEPRECATED
+#ifdef TCL_NO_DEPRECATED
+# undef Tcl_CreateCommand
+# undef Tcl_CreateObjCommand
+# undef Tcl_CreateTrace
+# 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
#endif
@@ -4191,59 +4173,11 @@
#undef TclSplitPath
#undef TclFSSplitPath
#undef TclParseArgsObjv
#undef TclGetAliasObj
-#if TCL_MAJOR_VERSION < 9
- /* TIP #627 for 8.7 */
-# undef Tcl_CreateObjCommand2
-# define Tcl_CreateObjCommand2 Tcl_CreateObjCommand
-# undef Tcl_CreateObjTrace2
-# define Tcl_CreateObjTrace2 Tcl_CreateObjTrace
-# undef Tcl_NRCreateCommand2
-# define Tcl_NRCreateCommand2 Tcl_NRCreateCommand
-# undef Tcl_NRCallObjProc2
-# define Tcl_NRCallObjProc2 Tcl_NRCallObjProc
- /* TIP #660 for 8.7 */
-# undef Tcl_GetSizeIntFromObj
-# define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj
-
-# undef Tcl_GetBytesFromObj
-# define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) \
- tclStubsPtr->tclGetBytesFromObj((interp), (objPtr), (sizePtr))
-# undef Tcl_GetStringFromObj
-# define Tcl_GetStringFromObj(objPtr, sizePtr) \
- tclStubsPtr->tclGetStringFromObj((objPtr), (sizePtr))
-# undef Tcl_GetUnicodeFromObj
-# define Tcl_GetUnicodeFromObj(objPtr, sizePtr) \
- tclStubsPtr->tclGetUnicodeFromObj((objPtr), (sizePtr))
-# undef Tcl_ListObjGetElements
-# define Tcl_ListObjGetElements(interp, listPtr, objcPtr, objvPtr) \
- tclStubsPtr->tclListObjGetElements((interp), (listPtr), (objcPtr), (objvPtr))
-# undef Tcl_ListObjLength
-# define Tcl_ListObjLength(interp, listPtr, lengthPtr) \
- tclStubsPtr->tclListObjLength((interp), (listPtr), (lengthPtr))
-# undef Tcl_DictObjSize
-# define Tcl_DictObjSize(interp, dictPtr, sizePtr) \
- tclStubsPtr->tclDictObjSize((interp), (dictPtr), (sizePtr))
-# undef Tcl_SplitList
-# define Tcl_SplitList(interp, listStr, argcPtr, argvPtr) \
- tclStubsPtr->tclSplitList((interp), (listStr), (argcPtr), (argvPtr))
-# undef Tcl_SplitPath
-# define Tcl_SplitPath(path, argcPtr, argvPtr) \
- tclStubsPtr->tclSplitPath((path), (argcPtr), (argvPtr))
-# undef Tcl_FSSplitPath
-# define Tcl_FSSplitPath(pathPtr, lenPtr) \
- tclStubsPtr->tclFSSplitPath((pathPtr), (lenPtr))
-# undef Tcl_ParseArgsObjv
-# define Tcl_ParseArgsObjv(interp, argTable, objcPtr, objv, remObjv) \
- tclStubsPtr->tclParseArgsObjv((interp), (argTable), (objcPtr), (objv), (remObjv))
-# undef Tcl_GetAliasObj
-# define Tcl_GetAliasObj(interp, childCmd, targetInterpPtr, targetCmdPtr, objcPtr, objv) \
- tclStubsPtr->tclGetAliasObj((interp), (childCmd), (targetInterpPtr), (targetCmdPtr), (objcPtr), (objv))
-#elif defined(TCL_8_API)
-# undef Tcl_GetByteArrayFromObj
+#if defined(TCL_8_API)
# undef Tcl_GetBytesFromObj
# undef Tcl_GetStringFromObj
# undef Tcl_GetUnicodeFromObj
# undef Tcl_ListObjGetElements
# undef Tcl_ListObjLength
@@ -4252,13 +4186,10 @@
# undef Tcl_SplitPath
# undef Tcl_FSSplitPath
# undef Tcl_ParseArgsObjv
# undef Tcl_GetAliasObj
# if !defined(USE_TCL_STUBS)
-# define Tcl_GetByteArrayFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \
- TclGetBytesFromObj(NULL, (objPtr), (sizePtr)) : \
- (Tcl_GetBytesFromObj)(NULL, (objPtr), (Tcl_Size *)(void *)(sizePtr)))
# define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \
TclGetBytesFromObj((interp), (objPtr), (sizePtr)) : \
(Tcl_GetBytesFromObj)((interp), (objPtr), (Tcl_Size *)(void *)(sizePtr)))
# define Tcl_GetStringFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \
(TclGetStringFromObj)((objPtr), (sizePtr)) : \
@@ -4289,13 +4220,10 @@
(Tcl_ParseArgsObjv)((interp), (argTable), (Tcl_Size *)(void *)(objcPtr), (objv), (remObjv)))
# define Tcl_GetAliasObj(interp, childCmd, targetInterpPtr, targetCmdPtr, objcPtr, objv) (sizeof(*(objcPtr)) <= sizeof(int) ? \
TclGetAliasObj((interp), (childCmd), (targetInterpPtr), (targetCmdPtr), (objcPtr), (objv)) : \
(Tcl_GetAliasObj)((interp), (childCmd), (targetInterpPtr), (targetCmdPtr), (Tcl_Size *)(void *)(objcPtr), (objv)))
# elif !defined(BUILD_tcl)
-# define Tcl_GetByteArrayFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \
- tclStubsPtr->tclGetBytesFromObj(NULL, (objPtr), (sizePtr)) : \
- tclStubsPtr->tcl_GetBytesFromObj(NULL, (objPtr), (Tcl_Size *)(void *)(sizePtr)))
# define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \
tclStubsPtr->tclGetBytesFromObj((interp), (objPtr), (sizePtr)) : \
tclStubsPtr->tcl_GetBytesFromObj((interp), (objPtr), (Tcl_Size *)(void *)(sizePtr)))
# define Tcl_GetStringFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \
tclStubsPtr->tclGetStringFromObj((objPtr), (sizePtr)) : \
@@ -4326,12 +4254,10 @@
tclStubsPtr->tcl_ParseArgsObjv((interp), (argTable), (Tcl_Size *)(void *)(objcPtr), (objv), (remObjv)))
# define Tcl_GetAliasObj(interp, childCmd, targetInterpPtr, targetCmdPtr, objcPtr, objv) (sizeof(*(objcPtr)) <= sizeof(int) ? \
tclStubsPtr->tclGetAliasObj((interp), (childCmd), (targetInterpPtr), (targetCmdPtr), (objcPtr), (objv)) : \
tclStubsPtr->tcl_GetAliasObj((interp), (childCmd), (targetInterpPtr), (targetCmdPtr), (Tcl_Size *)(void *)(objcPtr), (objv)))
# endif /* defined(USE_TCL_STUBS) */
-#else /* !defined(TCL_8_API) */
-# undef Tcl_GetByteArrayFromObj
-# define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
- Tcl_GetBytesFromObj(NULL, (objPtr), (sizePtr))
#endif /* defined(TCL_8_API) */
+#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
+ Tcl_GetBytesFromObj(NULL, (objPtr), (sizePtr))
#endif /* _TCLDECLS */
Index: generic/tclDictObj.c
==================================================================
--- generic/tclDictObj.c
+++ generic/tclDictObj.c
@@ -22,29 +22,29 @@
/*
* Prototypes for functions defined later in this file:
*/
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);
static Tcl_SetFromAnyProc SetDictFromAny;
static Tcl_UpdateStringProc UpdateStringOfDict;
@@ -55,12 +55,12 @@
Tcl_Obj *keyPtr, int *newPtr);
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;
/*
* Table of dict subcommand names and implementations.
@@ -1657,15 +1657,15 @@
static int
DictCreateCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictObj;
- int i;
+ Tcl_Size i;
/*
* Must have an even number of arguments; note that number of preceding
* arguments (i.e. "dict create" is also even, which makes this much
* easier.)
@@ -1707,11 +1707,11 @@
static int
DictGetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr = NULL;
int result;
@@ -1800,11 +1800,11 @@
static int
DictGetDefCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *keyPtr, *valuePtr, *defaultPtr;
Tcl_Obj *const *keyPath;
int numKeys;
@@ -1865,15 +1865,15 @@
static int
DictReplaceCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr;
- int i;
+ Tcl_Size i;
if ((objc < 2) || (objc & 1)) {
Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key value ...?");
return TCL_ERROR;
}
@@ -1913,15 +1913,15 @@
static int
DictRemoveCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr;
- int i;
+ Tcl_Size i;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "dictionary ?key ...?");
return TCL_ERROR;
}
@@ -1961,16 +1961,16 @@
static int
DictMergeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *targetObj, *keyObj = NULL, *valueObj = NULL;
- int allocatedDict = 0;
- int i, done;
+ int done, allocatedDict = 0;
+ Tcl_Size i;
Tcl_DictSearch search;
if (objc == 1) {
/*
* No dictionary arguments; return default (empty value).
@@ -2048,11 +2048,11 @@
static int
DictKeysCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *listPtr;
const char *pattern = NULL;
@@ -2127,11 +2127,11 @@
static int
DictValuesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *valuePtr = NULL, *listPtr;
Tcl_DictSearch search;
int done;
@@ -2187,11 +2187,11 @@
static int
DictSizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int result;
Tcl_Size size;
@@ -2280,11 +2280,11 @@
static int
DictExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr;
if (objc < 3) {
@@ -2322,11 +2322,11 @@
static int
DictInfoCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Dict *dict;
char *statsStr;
@@ -2366,11 +2366,11 @@
static int
DictIncrCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int code = TCL_OK;
Tcl_Obj *dictPtr, *valuePtr = NULL;
@@ -2487,15 +2487,16 @@
static int
DictLappendCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr, *resultPtr;
- int i, allocatedDict = 0, allocatedValue = 0;
+ int allocatedDict = 0, allocatedValue = 0;
+ Tcl_Size i;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "dictVarName key ?value ...?");
return TCL_ERROR;
}
@@ -2574,11 +2575,11 @@
static int
DictAppendCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *valuePtr, *resultPtr;
int allocatedDict = 0;
@@ -2676,11 +2677,11 @@
static int
DictForNRCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
Tcl_Obj *scriptObj, *keyVarObj, *valueVarObj;
Tcl_Obj **varv, *keyObj, *valueObj;
@@ -2872,11 +2873,11 @@
static int
DictMapNRCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
Tcl_Obj **varv, *keyObj, *valueObj;
DictMapStorage *storagePtr;
@@ -3085,11 +3086,11 @@
static int
DictSetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *resultPtr;
int result, allocatedDict = 0;
@@ -3145,11 +3146,11 @@
static int
DictUnsetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *dictPtr, *resultPtr;
int result, allocatedDict = 0;
@@ -3204,11 +3205,11 @@
static int
DictFilterCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
static const char *const filters[] = {
"key", "script", "value", NULL
@@ -3278,11 +3279,11 @@
* order.
*/
resultObj = Tcl_NewDictObj();
while (!done) {
- int i;
+ Tcl_Size i;
for (i=3 ; iobjProc != TclEnsembleImplementationCmd) {
+ if (cmdPtr->objProc2 != TclEnsembleImplementationCmd) {
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"command is not an ensemble", TCL_AUTO_LENGTH));
Tcl_SetErrorCode(interp,
"TCL", "ENSEMBLE", "NOT_ENSEMBLE", (char *)NULL);
}
return NULL;
}
- return (EnsembleConfig *) cmdPtr->objClientData;
+ return (EnsembleConfig *)cmdPtr->objClientData2;
}
/*
*----------------------------------------------------------------------
*
@@ -1478,20 +1478,20 @@
token = Tcl_FindCommand(interp, TclGetString(cmdNameObj), NULL, flags);
if (token == NULL) {
return NULL;
}
- if (((Command *) token)->objProc != TclEnsembleImplementationCmd) {
+ if (((Command *) token)->objProc2 != TclEnsembleImplementationCmd) {
/*
* Reuse existing infrastructure for following import link chains
* rather than duplicating it.
*/
token = TclGetOriginalCommand(token);
if (token == NULL ||
- ((Command *) token)->objProc != TclEnsembleImplementationCmd) {
+ ((Command *) token)->objProc2 != TclEnsembleImplementationCmd) {
if (flags & TCL_LEAVE_ERR_MSG) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" is not an ensemble command",
TclGetString(cmdNameObj)));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ENSEMBLE",
@@ -1525,15 +1525,15 @@
Tcl_IsEnsemble(
Tcl_Command token) /* The command to check. */
{
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;
}
@@ -1660,11 +1660,11 @@
TclNewStringObj(toObj, Tcl_DStringValue(&buf),
Tcl_DStringLength(&buf));
Tcl_AppendToObj(toObj, map[i].name, TCL_AUTO_LENGTH);
TclDictPut(NULL, mapDict, map[i].name, 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
* doesn't work properly yet; this function is always
* currently called before the safe-interp flag is set so the
@@ -1671,12 +1671,12 @@
* Tcl_IsSafe check fails.
*/
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,
TCL_AUTO_LENGTH))) {
Tcl_Panic("%s", Tcl_GetStringResult(interp));
@@ -1687,12 +1687,12 @@
/*
* Not hidden, so just create it. Yay!
*/
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;
}
}
}
@@ -1731,22 +1731,22 @@
int
TclEnsembleImplementationCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
- return Tcl_NRCallObjProc(interp, NsEnsembleImplementationCmdNR,
+ return Tcl_NRCallObjProc2(interp, NsEnsembleImplementationCmdNR,
clientData, objc, objv);
}
static int
NsEnsembleImplementationCmdNR(
void *clientData, /* The ensemble this is the impl. of. */
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
EnsembleConfig *ensemblePtr = (EnsembleConfig *) clientData;
/* The ensemble itself. */
Tcl_Obj *prefixObj; /* An object containing the prefix words of
@@ -2339,11 +2339,11 @@
static inline int
EnsembleUnknownCallback(
Tcl_Interp *interp,
EnsembleConfig *ensemblePtr,/* The ensemble structure. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Actual arguments. */
Tcl_Obj **prefixObjPtr) /* Where to write the prefix suggested by the
* unknown callback. Must not be NULL. Only has
* a meaningful value on TCL_OK. */
{
Index: generic/tclEvent.c
==================================================================
--- generic/tclEvent.c
+++ generic/tclEvent.c
@@ -56,12 +56,12 @@
* For each "vwait" event source a structure of the following type
* is used:
*/
typedef struct {
- int *donePtr; /* Pointer to flag to signal or NULL. */
- int sequence; /* Order of occurrence. */
+ Tcl_Size *donePtr; /* Pointer to flag to signal or NULL. */
+ Tcl_Size 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. */
} VwaitItem;
@@ -323,11 +323,11 @@
int
TclDefaultBgErrorHandlerObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *valuePtr;
Tcl_Obj *tempObjv[2];
int result, code, level;
@@ -1493,15 +1493,16 @@
int
Tcl_VwaitObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
+ Tcl_Size 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;
Tcl_Channel chan;
Tcl_WideInt diff = -1;
@@ -1595,11 +1596,11 @@
VwaitVarProc, &vwaitItems[numItems]);
if (result != TCL_OK) {
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++;
break;
case OPT_READABLE:
@@ -1619,11 +1620,11 @@
goto done;
}
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++;
break;
case OPT_WRITABLE:
@@ -1643,11 +1644,11 @@
goto done;
}
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++;
break;
}
@@ -1677,11 +1678,11 @@
VwaitVarProc, &vwaitItems[numItems]);
if (result != TCL_OK) {
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++;
}
if (result != TCL_OK) {
@@ -1701,11 +1702,11 @@
}
}
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,
&vwaitItems[numItems]);
Tcl_GetTime(&before);
@@ -1819,11 +1820,11 @@
}
}
if (result == TCL_OK) {
if (extended) {
- int k;
+ Tcl_Size k;
Tcl_Obj *listObj, *keyObj;
TclNewObj(listObj);
for (k = 0; k < done; k++) {
for (i = 0; i < numItems; i++) {
@@ -1946,11 +1947,11 @@
int
Tcl_UpdateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int flags = 0; /* Initialized to avoid compiler warning. */
static const char *const updateOptions[] = {"idletasks", NULL};
enum updateOptionsEnum {OPT_IDLETASKS} optionIndex;
Index: generic/tclExecute.c
==================================================================
--- generic/tclExecute.c
+++ generic/tclExecute.c
@@ -611,11 +611,11 @@
/*
* Declarations for local procedures to this file:
*/
#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);
static void PrintByteCodeInfo(ByteCode *codePtr);
static const char * StringForResultCode(int result);
@@ -754,11 +754,11 @@
TCL_LINK_INT) != TCL_OK) {
Tcl_Panic("InitByteCodeExecution: can't create link for tcl_traceExec variable");
}
#endif
#ifdef TCL_COMPILE_STATS
- Tcl_CreateObjCommand(interp, "evalstats", EvalStatsCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "evalstats", EvalStatsCmd, NULL, NULL);
#endif /* TCL_COMPILE_STATS */
}
#else
@@ -2822,16 +2822,12 @@
DECACHE_STACK_INFO();
pc += pcAdjustment;
TEBC_YIELD();
- if (objc > INT_MAX) {
- return TclCommandWordLimitError(interp, objc);
- } else {
- return TclNREvalObjv(interp, objc, objv,
+ return TclNREvalObjv(interp, objc, objv,
TCL_EVAL_NOERR | TCL_EVAL_SOURCE_IN_FRAME, NULL);
- }
case INST_INVOKE_REPLACE:
objc = TclGetUInt4AtPtr(pc+1);
opnd = TclGetUInt1AtPtr(pc+5);
objPtr = POP_OBJECT();
@@ -4644,15 +4640,21 @@
{
Method *const mPtr =
contextPtr->callPtr->chain[newDepth].mPtr;
- if (mPtr->typePtr->version < TCL_OO_METHOD_VERSION_2) {
+#ifndef TCL_NO_DEPRECATED
+ if (mPtr->typePtr->version == TCL_OO_METHOD_VERSION_1) {
+ if (objc > INT_MAX) {
+ TRACE_ERROR(interp);
+ goto gotError;
+ }
return 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->type2Ptr->callProc(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, opnd, objv);
}
case INST_TCLOO_IS_OBJECT:
oPtr = (Object *) Tcl_GetObjectFromObj(interp, OBJ_AT_TOS);
@@ -9593,11 +9595,11 @@
static int
EvalStatsCmd(
TCL_UNUSED(void *), /* Unused. */
Tcl_Interp *interp, /* The current interpreter. */
- int objc, /* The number of arguments. */
+ Tcl_Size objc, /* The number of arguments. */
Tcl_Obj *const objv[]) /* The argument strings. */
{
Interp *iPtr = (Interp *) interp;
LiteralTable *globalTablePtr = &iPtr->literalTable;
ByteCodeStats *statsPtr = &iPtr->stats;
Index: generic/tclFCmd.c
==================================================================
--- generic/tclFCmd.c
+++ generic/tclFCmd.c
@@ -20,13 +20,13 @@
static int CopyRenameOneFile(Tcl_Interp *interp,
Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr,
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);
+ Tcl_Size objc, Tcl_Obj *const objv[], int copyFlag);
+static size_t FileForceOption(Tcl_Interp *interp,
+ Tcl_Size objc, Tcl_Obj *const objv[], int *forcePtr);
/*
*---------------------------------------------------------------------------
*
* TclFileRenameCmd
@@ -48,11 +48,11 @@
int
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
return FileCopyRename(interp, objc, objv, 0);
}
@@ -77,11 +77,11 @@
int
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
return FileCopyRename(interp, objc, objv, 1);
}
@@ -103,22 +103,23 @@
*/
static int
FileCopyRename(
Tcl_Interp *interp, /* Used for error reporting. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
+ Tcl_Size i;
Tcl_StatBuf statBuf;
Tcl_Obj *target;
Tcl_DString ds;
i = FileForceOption(interp, objc - 1, objv + 1, &force);
- if (i < 0) {
+ if (i == TCL_INDEX_NONE) {
return TCL_ERROR;
}
i++;
if ((objc - i) < 2) {
Tcl_WrongNumArgs(interp, 1, objv,
@@ -221,16 +222,16 @@
int
TclFileMakeDirsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Used for error reporting. */
- int objc, /* Number of arguments */
+ Tcl_Size objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
Tcl_Obj *errfile = NULL;
- int result, i;
- Tcl_Size j, pobjc;
+ int result;
+ Tcl_Size i, j, pobjc;
Tcl_Obj *split = NULL;
Tcl_Obj *target = NULL;
Tcl_StatBuf statBuf;
Tcl_DString ds;
@@ -354,20 +355,21 @@
int
TclFileDeleteCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Used for error reporting */
- int objc, /* Number of arguments */
+ Tcl_Size objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument strings passed to Tcl_FileCmd. */
{
- int i, force, result;
+ int force, result;
+ Tcl_Size i;
Tcl_Obj *errfile;
Tcl_Obj *errorBuffer = NULL;
Tcl_DString ds;
i = FileForceOption(interp, objc - 1, objv + 1, &force);
- if (i < 0) {
+ if (i == TCL_INDEX_NONE) {
return TCL_ERROR;
}
errfile = NULL;
result = TCL_OK;
@@ -850,20 +852,21 @@
* None.
*
*---------------------------------------------------------------------------
*/
-static int
+static size_t
FileForceOption(
Tcl_Interp *interp, /* Interp, for error return. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
+ Tcl_Size i;
static const char *const options[] = {
"-force", "--", NULL
};
force = 0;
@@ -871,11 +874,11 @@
if (TclGetString(objv[i])[0] != '-') {
break;
}
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;
} else { /* -- */
i++;
@@ -974,11 +977,11 @@
int
TclFileAttrsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The interpreter for error reporting. */
- int objc, /* Number of command line arguments. */
+ Tcl_Size objc, /* Number of command line arguments. */
Tcl_Obj *const objv[]) /* The command line objects. */
{
int result;
const char *const *attributeStrings;
const char **attributeStringsAllocated = NULL;
@@ -1131,11 +1134,12 @@
} else {
/*
* Set option/value pairs.
*/
- int i, index;
+ Tcl_Size i;
+ int index;
if (numObjStrings == 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad option \"%s\", there are no file attributes in this"
" filesystem", TclGetString(objv[0])));
@@ -1197,11 +1201,11 @@
int
TclFileLinkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *contents;
int index;
Tcl_DString ds;
@@ -1361,11 +1365,11 @@
int
TclFileReadLinkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *contents;
Tcl_DString ds;
@@ -1419,11 +1423,11 @@
int
TclFileTemporaryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *nameVarObj = NULL; /* Variable to store the name of the temporary
* file in. */
Tcl_Obj *nameObj = NULL; /* Object that will contain the filename. */
@@ -1578,11 +1582,11 @@
int
TclFileTempDirCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *dirNameObj; /* Object that will contain the directory
* name. */
Tcl_Obj *baseDirObj = NULL, *nameBaseObj = NULL;
@@ -1723,11 +1727,11 @@
int
TclFileHomeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *homeDirObj;
if (objc != 1 && objc != 2) {
@@ -1761,11 +1765,11 @@
int
TclFileTildeExpandCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *expandedPathObj;
if (objc != 2) {
Index: generic/tclFileName.c
==================================================================
--- generic/tclFileName.c
+++ generic/tclFileName.c
@@ -1112,15 +1112,15 @@
int
Tcl_GlobObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, globFlags, join, dir, result;
- Tcl_Size length;
+ int globFlags, join, dir, result;
+ Tcl_Size i, length;
char *string;
const char *separators;
Tcl_Obj *typePtr, *look;
Tcl_Obj *pathOrDir = NULL;
Tcl_DString prefix;
Index: generic/tclHistory.c
==================================================================
--- generic/tclHistory.c
+++ generic/tclHistory.c
@@ -143,11 +143,11 @@
* Do not call [history] if it has been replaced by an empty proc
*/
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);
}
if (call) {
Tcl_Obj *list[3];
Index: generic/tclIO.c
==================================================================
--- generic/tclIO.c
+++ generic/tclIO.c
@@ -9205,11 +9205,11 @@
int
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Channel *chanPtr; /* The channel to create the handler for. */
ChannelState *statePtr; /* State info for channel */
Tcl_Channel chan; /* The opaque type for the channel. */
Index: generic/tclIO.h
==================================================================
--- generic/tclIO.h
+++ generic/tclIO.h
@@ -156,15 +156,10 @@
TclEolTranslation outputTranslation;
/* What translation to use for generating end
* of line sequences in output? */
int inEofChar; /* If nonzero, use this as a signal of EOF on
* input. */
-#if TCL_MAJOR_VERSION < 9
- int outEofChar; /* If nonzero, append this to the channel when
- * it is closed if it is open for writing.
- * For Tcl 8.x only */
-#endif
int unreportedError; /* Non-zero if an error report was deferred
* because it happened in the background. The
* value is the POSIX error code. */
Tcl_Size refCount; /* How many interpreters hold references to
* this IO channel? */
Index: generic/tclIOCmd.c
==================================================================
--- generic/tclIOCmd.c
+++ generic/tclIOCmd.c
@@ -38,12 +38,12 @@
* Static functions for this file:
*/
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);
static Tcl_InterpDeleteProc TcpAcceptCallbacksDeleteProc;
static void TcpServerCloseProc(void *callbackData);
@@ -99,11 +99,11 @@
int
Tcl_PutsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to puts on. */
Tcl_Obj *string; /* String to write. */
Tcl_Obj *chanObjPtr = NULL; /* channel object. */
@@ -212,11 +212,11 @@
int
Tcl_FlushObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *chanObjPtr;
Tcl_Channel chan; /* The channel to flush on. */
int mode;
@@ -276,11 +276,11 @@
int
Tcl_GetsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to read from. */
Tcl_Size lineLen; /* Length of line just read. */
int mode; /* Mode in which channel is opened. */
@@ -362,18 +362,19 @@
int
Tcl_ReadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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? */
Tcl_Size charactersRead; /* How many characters were read? */
int mode; /* Mode in which channel is opened. */
+ Tcl_Size i;
Tcl_Obj *resultPtr, *chanObjPtr;
if ((objc != 2) && (objc != 3)) {
Interp *iPtr;
@@ -499,11 +500,11 @@
int
Tcl_SeekObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to tell on. */
Tcl_WideInt offset; /* Where to seek? */
int mode; /* How to seek? */
@@ -574,11 +575,11 @@
int
Tcl_TellObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to tell on. */
Tcl_WideInt newLoc;
int code;
@@ -635,11 +636,11 @@
int
Tcl_CloseObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan; /* The channel to close. */
static const char *const dirOptions[] = {
"read", "write", NULL
@@ -743,16 +744,16 @@
int
Tcl_FconfigureObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size i; /* Iterate over arg-value pairs. */
if ((objc < 2) || (((objc % 2) == 1) && (objc != 3))) {
Tcl_WrongNumArgs(interp, 1, objv, "channel ?-option value ...?");
return TCL_ERROR;
}
@@ -818,11 +819,11 @@
int
Tcl_EofObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
if (objc != 2) {
@@ -858,11 +859,11 @@
static int
ChanIsBinaryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
if (objc != 2) {
@@ -897,20 +898,20 @@
int
Tcl_ExecObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *resultPtr;
const char **argv; /* An array for the string arguments. Stored
* on the _Tcl_ stack. */
const char *string;
Tcl_Channel chan;
- int argc, background, i, index, keepNewline, result, skip, ignoreStderr;
- Tcl_Size length;
+ int argc, background, i, index, keepNewline, result, ignoreStderr;
+ Tcl_Size length, skip;
static const char *const options[] = {
"-ignorestderr", "-keepnewline", "--", NULL
};
enum execOptionsEnum {
EXEC_IGNORESTDERR, EXEC_KEEPNEWLINE, EXEC_LAST
@@ -1069,11 +1070,11 @@
int
Tcl_FblockedObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
int mode;
@@ -1115,11 +1116,11 @@
int
Tcl_OpenObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int pipeline, prot;
const char *modeString, *what;
Tcl_Channel chan;
@@ -1491,11 +1492,11 @@
int
Tcl_SocketObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const socketOptions[] = {
"-async", "-backlog", "-myaddr", "-myport", "-reuseaddr",
"-reuseport", "-server", NULL
@@ -1502,12 +1503,12 @@
};
enum socketOptionsEnum {
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;
Tcl_Channel chan;
@@ -1742,15 +1743,16 @@
int
Tcl_FcopyObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel inChan, outChan;
- int mode, i, index;
+ int mode, index;
+ Tcl_Size i;
Tcl_WideInt toRead;
Tcl_Obj *cmdPtr;
static const char *const switches[] = { "-size", "-command", NULL };
enum { FcopySize, FcopyCommand };
@@ -1837,11 +1839,11 @@
static int
ChanPendingObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
static const char *const options[] = {"input", "output", NULL};
enum pendingOptionsEnum {PENDING_INPUT, PENDING_OUTPUT} index;
@@ -1899,11 +1901,11 @@
static int
ChanTruncateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel chan;
Tcl_WideInt length;
@@ -1972,11 +1974,11 @@
static int
ChanPipeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Channel rchan, wchan;
const char *channelNames[2];
Tcl_Obj *resultPtr;
@@ -2023,11 +2025,11 @@
int
TclChannelNamesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc < 1 || objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?pattern?");
return TCL_ERROR;
Index: generic/tclIORChan.c
==================================================================
--- generic/tclIORChan.c
+++ generic/tclIORChan.c
@@ -488,11 +488,11 @@
int
TclChanCreateObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
ReflectedChannel *rcPtr; /* Instance data of the new channel */
Tcl_Obj *rcId; /* Handle of the new channel */
int mode; /* R/W mode of new channel. Has to match
@@ -808,11 +808,11 @@
int
TclChanPostEventObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
/*
* Ensure -> HANDLER thread
*
Index: generic/tclIORTrans.c
==================================================================
--- generic/tclIORTrans.c
+++ generic/tclIORTrans.c
@@ -494,11 +494,11 @@
int
TclChanPushObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
ReflectedTransform *rtPtr; /* Instance data of the new (transform)
* channel. */
Tcl_Obj *chanObj; /* Handle of parent channel */
@@ -737,11 +737,11 @@
int
TclChanPopObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
/*
* Syntax: chan pop CHANNEL
* [0] [1] [2]
Index: generic/tclIcu.c
==================================================================
--- generic/tclIcu.c
+++ generic/tclIcu.c
@@ -586,11 +586,11 @@
*/
static int
IcuDetectObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc > 3) {
Tcl_WrongNumArgs(interp, 1 , objv, "?bytes ?-all??");
return TCL_ERROR;
@@ -632,11 +632,11 @@
*/
static int
IcuConverterNamesObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1 , objv, "");
@@ -682,11 +682,11 @@
*/
static int
IcuConverterAliasesObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1 , objv, "convertername");
return TCL_ERROR;
@@ -983,11 +983,11 @@
/*
* Common function for parsing convert options.
*/
static int IcuParseConvertOptions(
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[],
int *strictPtr,
Tcl_Obj **failindexVarPtr)
{
if (objc < 3) {
@@ -1059,11 +1059,11 @@
*/
static int
IcuConvertfromObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int strict;
Tcl_Obj *failindexVar;
@@ -1110,11 +1110,11 @@
*/
static int
IcuConverttoObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int strict;
Tcl_Obj *failindexVar;
@@ -1155,11 +1155,11 @@
*/
static int
IcuNormalizeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *optNames[] = {"-profile", "-mode", NULL};
enum { OPT_PROFILE, OPT_MODE } opt;
@@ -1509,27 +1509,27 @@
if (icu_fns.libs[1] != NULL) {
/* Commands needing both libraries */
/* Ref count number of commands */
icu_fns.nopen += 3;
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::icu::convertto",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::icu::convertto",
IcuConverttoObjCmd, 0, TclIcuCleanup);
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::icu::convertfrom",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::icu::convertfrom",
IcuConvertfromObjCmd, 0, TclIcuCleanup);
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::icu::detect",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::icu::detect",
IcuDetectObjCmd, 0, TclIcuCleanup);
}
/* Commands needing only libs[0] (icuuc) */
/* Ref count number of commands */
icu_fns.nopen += 3; /* UPDATE AS CMDS ADDED/DELETED BELOW */
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::icu::converters",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::icu::converters",
IcuConverterNamesObjCmd, 0, TclIcuCleanup);
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::icu::aliases",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::icu::aliases",
IcuConverterAliasesObjCmd, 0, TclIcuCleanup);
- Tcl_CreateObjCommand(interp, "::tcl::unsupported::icu::normalize",
+ Tcl_CreateObjCommand2(interp, "::tcl::unsupported::icu::normalize",
IcuNormalizeObjCmd, 0, TclIcuCleanup);
}
Tcl_MutexUnlock(&icu_mutex);
}
@@ -1552,11 +1552,11 @@
*/
int
TclLoadIcuObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1 , objv, "");
return TCL_ERROR;
Index: generic/tclIndexObj.c
==================================================================
--- generic/tclIndexObj.c
+++ generic/tclIndexObj.c
@@ -23,13 +23,13 @@
Tcl_Obj *objPtr, Tcl_Obj *tableObjPtr,
const char *msg, int flags, Tcl_Size *indexPtr);
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);
/*
* The structure below defines the index Tcl object type by means of functions
@@ -503,11 +503,11 @@
static int
PrefixMatchObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int flags = 0, result;
Tcl_Size errorLength, i;
Tcl_Obj *errorPtr = NULL;
@@ -627,11 +627,11 @@
static int
PrefixAllObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
Tcl_Size length, elemLength, tableObjc, t;
const char *string, *elemString;
@@ -685,11 +685,11 @@
static int
PrefixLongestObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
Tcl_Size i, length, elemLength, resultLength, tableObjc, t;
const char *string, *elemString, *resultString;
Index: generic/tclInt.decls
==================================================================
--- generic/tclInt.decls
+++ generic/tclInt.decls
@@ -156,21 +156,16 @@
Tcl_Obj *TclNewProcBodyObj(Proc *procPtr)
}
declare 62 {
int TclObjCommandComplete(Tcl_Obj *cmdPtr)
}
-# Removed in 9.0:
-#declare 63 {
-# int TclObjInterpProc(void *clientData, Tcl_Interp *interp,
-# Tcl_Size objc, Tcl_Obj *const objv[])
-#}
declare 64 {
int TclObjInvoke(Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[],
int flags)
}
declare 69 {
- void *TclpAlloc(TCL_HASH_TYPE size)
+ void *TclpAlloc(size_t size)
}
declare 74 {
void TclpFree(void *ptr)
}
declare 75 {
@@ -182,11 +177,11 @@
# Removed in 9.0:
#declare 77 {
# void TclpGetTime(Tcl_Time *time)
#}
declare 81 {
- void *TclpRealloc(void *ptr, TCL_HASH_TYPE size)
+ void *TclpRealloc(void *ptr, size_t size)
}
# Removed in 9.0:
#declare 88 {
# char *TclPrecTraceProc(void *clientData, Tcl_Interp *interp,
# const char *name1, const char *name2, int flags)
@@ -463,11 +458,11 @@
}
declare 214 {
void TclSetObjNameOfExecutable(Tcl_Obj *name, Tcl_Encoding encoding)
}
declare 215 {
- void *TclStackAlloc(Tcl_Interp *interp, TCL_HASH_TYPE numBytes)
+ void *TclStackAlloc(Tcl_Interp *interp, size_t numBytes)
}
declare 216 {
void TclStackFree(Tcl_Interp *interp, void *freePtr)
}
declare 217 {
Index: generic/tclInt.h
==================================================================
--- generic/tclInt.h
+++ generic/tclInt.h
@@ -216,14 +216,12 @@
*/
typedef struct TclVarHashTable {
Tcl_HashTable table; /* "Inherit" from Tcl_HashTable. */
struct Namespace *nsPtr; /* The namespace containing the variables. */
-#if TCL_MAJOR_VERSION > 8
struct Var *arrayPtr; /* The array containing the variables, if they
* are variables in an array at all. */
-#endif /* TCL_MAJOR_VERSION > 8 */
} TclVarHashTable;
/*
* This is for itcl - it likes to search our varTables directly :(
*/
@@ -269,15 +267,11 @@
Tcl_HashTable *childTablePtr;
/* Contains any child namespaces. Indexed by
* strings; values have type (Namespace *). If
* NULL, there are no children. */
#endif
-#if TCL_MAJOR_VERSION > 8
size_t nsId; /* Unique id for the namespace. */
-#else
- unsigned long nsId;
-#endif
Tcl_Interp *interp; /* The interpreter containing this
* namespace. */
int flags; /* OR-ed combination of the namespace status
* flags NS_DYING and NS_DEAD listed below. */
Tcl_Size activationCount; /* Number of "activations" or active call
@@ -972,13 +966,10 @@
* local. */
Tcl_Size nameLength; /* The number of bytes in local variable's name.
* Among others used to speed up var lookups. */
Tcl_Size frameIndex; /* Index in the array of compiler-assigned
* variables in the procedure call frame. */
-#if TCL_MAJOR_VERSION < 9
- int flags;
-#endif
Tcl_Obj *defValuePtr; /* Pointer to the default value of an
* argument, if any. NULL if not an argument
* or, if an argument, no default value. */
Tcl_ResolvedVarInfo *resolveInfo;
/* Customized variable resolution info
@@ -985,16 +976,14 @@
* supplied by the Tcl_ResolveCompiledVarProc
* associated with a namespace. Each variable
* is marked by a unique tag during
* compilation, and that same tag is used to
* find the variable at runtime. */
-#if TCL_MAJOR_VERSION > 8
int flags; /* Flag bits for the local variable. Same as
* the flags for the Var structure above,
* although only VAR_ARGUMENT, VAR_TEMPORARY,
* and VAR_RESOLVED make sense. */
-#endif
char name[TCLFLEXARRAY]; /* Name of the local variable starts here. If
* the name is NULL, this will just be '\0'.
* The actual size of this field will be large
* enough to hold the name. MUST BE THE LAST
* FIELD IN THE STRUCTURE! */
@@ -1048,15 +1037,11 @@
*/
typedef struct Trace {
Tcl_Size level; /* Only trace commands at nesting level less
* than or equal to this. */
-#if TCL_MAJOR_VERSION > 8
Tcl_CmdObjTraceProc2 *proc; /* Procedure to call to trace command. */
-#else
- Tcl_CmdObjTraceProc *proc; /* Procedure to call to trace command. */
-#endif
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
* Tcl_CreateObjTrace for details. */
Tcl_CmdObjTraceDeleteProc *delProc;
@@ -1096,11 +1081,10 @@
*/
#define TCL_TRACE_ENTER_EXEC 1
#define TCL_TRACE_LEAVE_EXEC 2
-#if TCL_MAJOR_VERSION > 8
#define TclObjTypeHasProc(objPtr, proc) (((objPtr)->typePtr \
&& ((offsetof(Tcl_ObjType, proc) < offsetof(Tcl_ObjType, version)) \
|| (offsetof(Tcl_ObjType, proc) < (objPtr)->typePtr->version))) ? \
((objPtr)->typePtr)->proc : NULL)
@@ -1198,11 +1182,10 @@
int *boolResult)
{
Tcl_ObjTypeInOperatorProc *proc = TclObjTypeHasProc(listObj, inOperProc);
return proc(interp, valueObj, listObj, boolResult);
}
-#endif /* TCL_MAJOR_VERSION > 8 */
/*
* The structure below defines an entry in the assocData hash table which is
* associated with an interpreter. The entry contains a pointer to a function
* to call when the interpreter is deleted, and a pointer to a user-defined
@@ -1749,13 +1732,13 @@
* whose 'name' is NULL.
*/
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. */
} EnsembleImplMap;
@@ -1828,12 +1811,12 @@
Tcl_Size cmdEpoch; /* Incremented to invalidate any references
* that point to this command when it is
* 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;
/* Procedure invoked when deleting command to,
* e.g., free all client data. */
@@ -1847,11 +1830,11 @@
* is used to remove all those imported
* commands when deleting this "real"
* 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;
/*
* Flag bits for commands.
*
@@ -1993,24 +1976,11 @@
* of hidden commands on a per-interp
* basis. */
void *interpInfo; /* Information used by tclInterp.c to keep
* track of parent/child interps on a
* per-interp basis. */
-#if TCL_MAJOR_VERSION > 8
- void (*optimizer)(void *envPtr);
- /* Reference to the bytecode optimizer, if one
- * is set. */
-#else
- union {
- void (*optimizer)(void *envPtr);
- Tcl_HashTable unused2; /* No longer used (was mathFuncTable). The
- * unused space in interp was repurposed for
- * pluggable bytecode optimizers. The core
- * contains one optimizer, which can be
- * selectively overridden by extensions. */
- } extra;
-#endif
+ void (*optimizer)(void *envPtr);
/*
* Information related to procedures and variables. See tclProc.c and
* tclVar.c for usage.
*/
@@ -2035,15 +2005,10 @@
CallFrame *rootFramePtr; /* Global frame pointer for this
* interpreter. */
Namespace *lookupNsPtr; /* Namespace to use ONLY on the next
* TCL_EVAL_INVOKE call to Tcl_EvalObjv. */
-#if TCL_MAJOR_VERSION < 9
- char *appendResultDontUse;
- int appendAvlDontUse;
- int appendUsedDontUse;
-#endif
/*
* Information about packages. Used only in tclPkg.c.
*/
@@ -2063,13 +2028,10 @@
* has been called for this interpreter. */
int evalFlags; /* Flags to control next call to Tcl_Eval.
* Normally zero, but may be set before
* calling Tcl_Eval. See below for valid
* values. */
-#if TCL_MAJOR_VERSION < 9
- int unused1; /* No longer used (was termOffset) */
-#endif
LiteralTable literalTable; /* Contains LiteralEntry's describing all Tcl
* objects holding literals of scripts
* compiled by the interpreter. Indexed by the
* string representations of literals. Used to
* avoid creating duplicate objects. */
@@ -2102,13 +2064,10 @@
* evaluation stack. */
Tcl_Obj *emptyObjPtr; /* Points to an object holding an empty
* string. Returned by Tcl_ObjSetVar2 when
* variable traces change a variable in a
* gross way. */
-#if TCL_MAJOR_VERSION < 9
- char resultSpaceDontUse[TCL_DSTRING_STATIC_SIZE+1];
-#endif
Tcl_Obj *objResultPtr; /* If the last command returned an object
* result, this points to it. Should not be
* accessed directly; see comment above. */
Tcl_ThreadId threadId; /* ID of thread that owns the interpreter. */
@@ -2768,24 +2727,15 @@
* and Tcl_GetIntForIndex.
*
* WARNING: these macros eval their args more than once.
*/
-#if TCL_MAJOR_VERSION > 8
#define TclGetBooleanFromObj(interp, objPtr, intPtr) \
((TclHasInternalRep((objPtr), &tclIntType) \
|| TclHasInternalRep((objPtr), &tclBooleanType)) \
? (*(intPtr) = ((objPtr)->internalRep.wideValue!=0), TCL_OK) \
: Tcl_GetBooleanFromObj((interp), (objPtr), (intPtr)))
-#else
-#define TclGetBooleanFromObj(interp, objPtr, intPtr) \
- ((TclHasInternalRep((objPtr), &tclIntType)) \
- ? (*(intPtr) = ((objPtr)->internalRep.wideValue!=0), TCL_OK) \
- : (TclHasInternalRep((objPtr), &tclBooleanType)) \
- ? (*(intPtr) = ((objPtr)->internalRep.longValue!=0), TCL_OK) \
- : Tcl_GetBooleanFromObj((interp), (objPtr), (intPtr)))
-#endif
#ifdef TCL_WIDE_INT_IS_LONG
#define TclGetLongFromObj(interp, objPtr, longPtr) \
((TclHasInternalRep((objPtr), &tclIntType)) \
? ((*(longPtr) = (objPtr)->internalRep.wideValue), TCL_OK) \
@@ -3191,35 +3141,35 @@
* Procedures shared among Tcl modules but not used by the outside world,
* introduced by/for NRE.
*----------------------------------------------------------------
*/
-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);
MODULE_SCOPE void TclPushTailcallPoint(Tcl_Interp *interp);
@@ -3281,11 +3231,10 @@
*----------------------------------------------------------------
* Procedures shared among Tcl modules but not used by the outside world:
*----------------------------------------------------------------
*/
-#if TCL_MAJOR_VERSION > 8
MODULE_SCOPE void TclAdvanceContinuations(Tcl_Size *line, Tcl_Size **next,
int loc);
MODULE_SCOPE void TclAdvanceLines(Tcl_Size *line, const char *start,
const char *end);
MODULE_SCOPE void TclAppendBytesToByteArray(Tcl_Obj *objPtr,
@@ -3318,11 +3267,11 @@
MODULE_SCOPE int TclCheckArrayTraces(Tcl_Interp *interp, Var *varPtr,
Var *arrayPtr, Tcl_Obj *name, int index);
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 int TclChanIsBinary(Tcl_Channel chan);
MODULE_SCOPE Tcl_NRPostProc TclClearRootEnsemble;
MODULE_SCOPE int TclCompareTwoNumbers(Tcl_Obj *valuePtr,
Tcl_Obj *value2Ptr);
MODULE_SCOPE ContLineLoc *TclContinuationsEnter(Tcl_Obj *objPtr, Tcl_Size num,
@@ -3334,11 +3283,11 @@
Tcl_Obj *originObjPtr);
MODULE_SCOPE Tcl_Size TclConvertElement(const char *src, Tcl_Size 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,
Tcl_Namespace *ensembleNamespacePtr, int flags);
MODULE_SCOPE void TclDeleteNamespaceVars(Namespace *nsPtr);
@@ -3359,21 +3308,21 @@
const char *key);
/* TIP #280 - Modified token based evaluation, with line information. */
MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script,
Tcl_Size numBytes, int flags, Tcl_Size line,
Tcl_Size *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,
void *clientData);
MODULE_SCOPE char * TclDStringAppendObj(Tcl_DString *dsPtr,
@@ -3412,11 +3361,11 @@
MODULE_SCOPE void TclFormatNaN(double value, char *buffer);
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);
MODULE_SCOPE int * TclGetAsyncReadyPtr(void);
MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp);
@@ -3442,18 +3391,18 @@
MODULE_SCOPE size_t TclHashStringKey(Tcl_HashTable *tablePtr, void *keyPtr);
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_ObjCmdProc TclInfoConstsCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclInfoConstantCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoGlobalsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoLocalsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoVarsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoConstsCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInfoConstantCmd;
MODULE_SCOPE void TclInitAlloc(void);
MODULE_SCOPE void TclInitDbCkalloc(void);
MODULE_SCOPE void TclInitDoubleConversion(void);
MODULE_SCOPE void TclInitEmbeddedConfigurationInformation(
Tcl_Interp *interp);
@@ -3494,20 +3443,26 @@
Tcl_Obj *valuePtr);
MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name,
const EnsembleImplMap map[]);
MODULE_SCOPE Tcl_Size TclMaxListLength(const char *bytes, Tcl_Size 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 * TclNoErrorStack(Tcl_Interp *interp, Tcl_Obj *options);
MODULE_SCOPE int TclNokia770Doubles(void);
MODULE_SCOPE void TclNsDecrRefCount(Namespace *nsPtr);
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);
+#ifndef TCL_NO_DEPRECATED
+MODULE_SCOPE Tcl_ObjCmdProc TclObjInterpProc;
+#endif
+MODULE_SCOPE Tcl_ObjCmdProc2 TclObjInterpProc2;
+#define TclObjInterpProc TclGetObjInterpProc()
+#define TclObjInterpProc2 TclGetObjInterpProc2()
MODULE_SCOPE int TclObjInvokeNamespace(Tcl_Interp *interp,
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);
@@ -3650,15 +3605,12 @@
MODULE_SCOPE Tcl_Size TclTrimLeft(const char *bytes, Tcl_Size numBytes,
const char *trim, Tcl_Size numTrim);
MODULE_SCOPE Tcl_Size TclTrimRight(const char *bytes, Tcl_Size numBytes,
const char *trim, Tcl_Size numTrim);
MODULE_SCOPE const char*TclGetCommandTypeName(Tcl_Command command);
-MODULE_SCOPE int TclObjInterpProc(void *clientData,
- Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[]);
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);
MODULE_SCOPE int TclUtfCount(int ch);
MODULE_SCOPE Tcl_Obj * TclpNativeToNormalized(void *clientData);
@@ -3718,126 +3670,126 @@
*----------------------------------------------------------------
* Command procedures in the generic core:
*----------------------------------------------------------------
*/
-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_ConstObjCmd;
-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_ConstObjCmd;
+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,
Tcl_Obj *part2Ptr, int index, int pathc,
Tcl_Obj *const pathv[], Tcl_Obj *keysPtr);
MODULE_SCOPE Tcl_Obj * TclDictWithInit(Tcl_Interp *interp, Tcl_Obj *dictPtr,
Tcl_Size pathc, Tcl_Obj *const pathv[]);
-MODULE_SCOPE Tcl_ObjCmdProc Tcl_DisassembleObjCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclLoadIcuObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 Tcl_DisassembleObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclLoadIcuObjCmd;
/* 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;
/*
*----------------------------------------------------------------
* Compilation procedures for commands in the generic core:
*----------------------------------------------------------------
@@ -3950,44 +3902,44 @@
MODULE_SCOPE CompileProc TclCompileBasic1To3ArgCmd;
MODULE_SCOPE CompileProc TclCompileBasicMin0ArgCmd;
MODULE_SCOPE CompileProc TclCompileBasicMin1ArgCmd;
MODULE_SCOPE CompileProc TclCompileBasicMin2ArgCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclInvertOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInvertOpCmd;
MODULE_SCOPE CompileProc TclCompileInvertOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNotOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNotOpCmd;
MODULE_SCOPE CompileProc TclCompileNotOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclAddOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclAddOpCmd;
MODULE_SCOPE CompileProc TclCompileAddOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclMulOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclMulOpCmd;
MODULE_SCOPE CompileProc TclCompileMulOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclAndOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclAndOpCmd;
MODULE_SCOPE CompileProc TclCompileAndOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOrOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOrOpCmd;
MODULE_SCOPE CompileProc TclCompileOrOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclXorOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclXorOpCmd;
MODULE_SCOPE CompileProc TclCompileXorOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclPowOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclPowOpCmd;
MODULE_SCOPE CompileProc TclCompilePowOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclLshiftOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclLshiftOpCmd;
MODULE_SCOPE CompileProc TclCompileLshiftOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclRshiftOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclRshiftOpCmd;
MODULE_SCOPE CompileProc TclCompileRshiftOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclModOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclModOpCmd;
MODULE_SCOPE CompileProc TclCompileModOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNeqOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNeqOpCmd;
MODULE_SCOPE CompileProc TclCompileNeqOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclStrneqOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclStrneqOpCmd;
MODULE_SCOPE CompileProc TclCompileStrneqOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclInOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclInOpCmd;
MODULE_SCOPE CompileProc TclCompileInOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclNiOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclNiOpCmd;
MODULE_SCOPE CompileProc TclCompileNiOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclMinusOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclMinusOpCmd;
MODULE_SCOPE CompileProc TclCompileMinusOpCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclDivOpCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclDivOpCmd;
MODULE_SCOPE CompileProc TclCompileDivOpCmd;
MODULE_SCOPE CompileProc TclCompileLessOpCmd;
MODULE_SCOPE CompileProc TclCompileLeqOpCmd;
MODULE_SCOPE CompileProc TclCompileGreaterOpCmd;
MODULE_SCOPE CompileProc TclCompileGeqOpCmd;
@@ -4092,18 +4044,18 @@
/*
* 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.
*/
@@ -4148,12 +4100,10 @@
* Error message utility functions
*/
MODULE_SCOPE int TclCommandWordLimitError(Tcl_Interp *interp,
Tcl_Size count);
-#endif /* TCL_MAJOR_VERSION > 8 */
-
/* Constants used in index value encoding routines. */
#define TCL_INDEX_END ((Tcl_Size)-2)
#define TCL_INDEX_START ((Tcl_Size)0)
/*
Index: generic/tclIntDecls.h
==================================================================
--- generic/tclIntDecls.h
+++ generic/tclIntDecls.h
@@ -25,10 +25,14 @@
# else
# define TCL_STORAGE_CLASS DLLIMPORT
# 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
* in the generic/tclInt.decls script.
*/
@@ -169,11 +173,11 @@
/* Slot 65 is reserved */
/* Slot 66 is reserved */
/* Slot 67 is reserved */
/* Slot 68 is reserved */
/* 69 */
-EXTERN void * TclpAlloc(TCL_HASH_TYPE size);
+EXTERN void * TclpAlloc(size_t size);
/* Slot 70 is reserved */
/* Slot 71 is reserved */
/* Slot 72 is reserved */
/* Slot 73 is reserved */
/* 74 */
@@ -185,11 +189,11 @@
/* Slot 77 is reserved */
/* Slot 78 is reserved */
/* Slot 79 is reserved */
/* Slot 80 is reserved */
/* 81 */
-EXTERN void * TclpRealloc(void *ptr, TCL_HASH_TYPE size);
+EXTERN void * TclpRealloc(void *ptr, size_t size);
/* Slot 82 is reserved */
/* Slot 83 is reserved */
/* Slot 84 is reserved */
/* Slot 85 is reserved */
/* Slot 86 is reserved */
@@ -438,12 +442,11 @@
EXTERN Tcl_Obj * TclGetObjNameOfExecutable(void);
/* 214 */
EXTERN void TclSetObjNameOfExecutable(Tcl_Obj *name,
Tcl_Encoding encoding);
/* 215 */
-EXTERN void * TclStackAlloc(Tcl_Interp *interp,
- TCL_HASH_TYPE numBytes);
+EXTERN void * TclStackAlloc(Tcl_Interp *interp, size_t numBytes);
/* 216 */
EXTERN void TclStackFree(Tcl_Interp *interp, void *freePtr);
/* 217 */
EXTERN int TclPushStackFrame(Tcl_Interp *interp,
Tcl_CallFrame **framePtrPtr,
@@ -647,11 +650,11 @@
int (*tclObjInvoke) (Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], int flags); /* 64 */
void (*reserved65)(void);
void (*reserved66)(void);
void (*reserved67)(void);
void (*reserved68)(void);
- void * (*tclpAlloc) (TCL_HASH_TYPE size); /* 69 */
+ void * (*tclpAlloc) (size_t size); /* 69 */
void (*reserved70)(void);
void (*reserved71)(void);
void (*reserved72)(void);
void (*reserved73)(void);
void (*tclpFree) (void *ptr); /* 74 */
@@ -659,11 +662,11 @@
unsigned long long (*tclpGetSeconds) (void); /* 76 */
void (*reserved77)(void);
void (*reserved78)(void);
void (*reserved79)(void);
void (*reserved80)(void);
- void * (*tclpRealloc) (void *ptr, TCL_HASH_TYPE size); /* 81 */
+ void * (*tclpRealloc) (void *ptr, size_t size); /* 81 */
void (*reserved82)(void);
void (*reserved83)(void);
void (*reserved84)(void);
void (*reserved85)(void);
void (*reserved86)(void);
@@ -793,11 +796,11 @@
void (*reserved210)(void);
void (*reserved211)(void);
void (*tclpFindExecutable) (const char *argv0); /* 212 */
Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */
void (*tclSetObjNameOfExecutable) (Tcl_Obj *name, Tcl_Encoding encoding); /* 214 */
- void * (*tclStackAlloc) (Tcl_Interp *interp, TCL_HASH_TYPE numBytes); /* 215 */
+ void * (*tclStackAlloc) (Tcl_Interp *interp, size_t numBytes); /* 215 */
void (*tclStackFree) (Tcl_Interp *interp, void *freePtr); /* 216 */
int (*tclPushStackFrame) (Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr, Tcl_Namespace *namespacePtr, int isProcCallFrame); /* 217 */
void (*tclPopStackFrame) (Tcl_Interp *interp); /* 218 */
Tcl_Obj * (*tclpCreateTemporaryDirectory) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj); /* 219 */
void (*reserved220)(void);
@@ -1260,31 +1263,20 @@
(tclIntStubsPtr->tclUnusedStubEntry) /* 261 */
#endif /* defined(USE_TCL_STUBS) */
/* !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 \
(tclIntStubsPtr->tclStaticLibrary)
#endif /* defined(USE_TCL_STUBS) */
-#if (TCL_MAJOR_VERSION < 9) && defined(USE_TCL_STUBS)
-#undef TclpGetClicks
-#define TclpGetClicks() \
- ((unsigned long)tclIntStubsPtr->tclpGetClicks())
-#undef TclpGetSeconds
-#define TclpGetSeconds() \
- ((unsigned long)tclIntStubsPtr->tclpGetSeconds())
-#undef TclGetObjInterpProc2
-#define TclGetObjInterpProc2 TclGetObjInterpProc
-#endif
-
-#undef TclUnusedStubEntry
-#define TclObjInterpProc TclGetObjInterpProc()
-#define TclObjInterpProc2 TclGetObjInterpProc2()
-
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
#endif /* _TCLINTDECLS */
Index: generic/tclInterp.c
==================================================================
--- generic/tclInterp.c
+++ generic/tclInterp.c
@@ -228,11 +228,11 @@
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, Tcl_Size objc,
Tcl_Obj *const objv[]);
static Tcl_InterpDeleteProc InterpInfoDeleteProc;
@@ -281,12 +281,12 @@
Tcl_Interp *interp);
static void TimeLimitCallback(void *clientData);
/* NRE enabling */
static Tcl_NRPostProc NRPostInvokeHidden;
-static Tcl_ObjCmdProc NRInterpCmd;
-static Tcl_ObjCmdProc NRChildCmd;
+static Tcl_ObjCmdProc2 NRInterpCmd;
+static Tcl_ObjCmdProc2 NRChildCmd;
/*
*----------------------------------------------------------------------
*
* Tcl_SetPreInitScript --
@@ -511,11 +511,11 @@
childPtr->childEntryPtr = NULL;
childPtr->childInterp = interp;
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);
return TCL_OK;
}
@@ -617,21 +617,21 @@
int
Tcl_InterpObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *childInterp;
static const char *const options[] = {
"alias", "aliases", "bgerror", "cancel",
@@ -1383,22 +1383,22 @@
/*
* If we are not creating or renaming an alias, then it is always OK to
* create or rename the command.
*/
- if (cmdPtr->objProc != TclAliasObjCmd
- && cmdPtr->objProc != TclLocalAliasObjCmd) {
+ if (cmdPtr->objProc2 != TclAliasObjCmd
+ && cmdPtr->objProc2 != TclLocalAliasObjCmd) {
return TCL_OK;
}
/*
* OK, we are dealing with an alias, so traverse the chain of aliases. If
* we encounter the alias we are defining (or renaming to) any in the
* chain then we have a loop.
*/
- aliasPtr = (Alias *) cmdPtr->objClientData;
+ aliasPtr = (Alias *)cmdPtr->objClientData2;
nextAliasPtr = aliasPtr;
while (1) {
Tcl_Obj *cmdNamePtr;
/*
@@ -1439,15 +1439,15 @@
* Otherwise, follow the chain one step further. See if the target
* command is an alias - if so, follow the loop to its target command.
* 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;
}
}
/*
*----------------------------------------------------------------------
@@ -1504,15 +1504,15 @@
Tcl_Preserve(childInterp);
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);
}
if (TclPreventAliasLoop(interp, childInterp,
@@ -1775,11 +1775,11 @@
static int
AliasNRCmd(
void *clientData, /* Alias record. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument vector. */
{
Alias *aliasPtr = (Alias *) clientData;
Tcl_Size prefc, cmdc, i;
Tcl_Obj **prefv, **cmdv;
@@ -1828,11 +1828,11 @@
int
TclAliasObjCmd(
void *clientData, /* Alias record. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument vector. */
{
#define ALIAS_CMDV_PREALLOC 10
Alias *aliasPtr = (Alias *) clientData;
Tcl_Interp *targetInterp = aliasPtr->targetInterp;
@@ -1919,11 +1919,11 @@
int
TclLocalAliasObjCmd(
void *clientData, /* Alias record. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument vector. */
{
#define ALIAS_CMDV_PREALLOC 10
Alias *aliasPtr = (Alias *) clientData;
int result;
@@ -2420,11 +2420,11 @@
childInterp = Tcl_CreateInterp();
childPtr = &INTERP_INFO(childInterp)->child;
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);
Tcl_SetVar2(childInterp, "tcl_interactive", NULL, "0", TCL_GLOBAL_ONLY);
@@ -2505,21 +2505,21 @@
int
TclChildObjCmd(
void *clientData, /* Child interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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(
void *clientData, /* Child interpreter. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *childInterp = (Tcl_Interp *) clientData;
static const char *const options[] = {
"alias", "aliases", "bgerror", "debug",
Index: generic/tclLoad.c
==================================================================
--- generic/tclLoad.c
+++ generic/tclLoad.c
@@ -122,11 +122,11 @@
int
Tcl_LoadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Interp *target;
LoadedLibrary *libraryPtr, *defaultPtr;
Tcl_DString pfx, tmp, initName, safeInitName;
@@ -549,18 +549,19 @@
int
Tcl_UnloadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
+ Tcl_Size i;
+ int code, complain = 1, keepLibrary = 0;
const char *fullFileName = "";
const char *prefix;
static const char *const options[] = {
"-nocomplain", "-keeplibrary", "--", NULL
};
Index: generic/tclNamesp.c
==================================================================
--- generic/tclNamesp.c
+++ generic/tclNamesp.c
@@ -90,33 +90,33 @@
const char *name2, int flags);
static void FreeNsNameInternalRep(Tcl_Obj *objPtr);
static int GetNamespaceFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr);
static int InvokeImportedNRCmd(void *clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, Tcl_Size 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;
+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);
static Tcl_NRPostProc NsEval_Callback;
@@ -1057,11 +1057,11 @@
*/
for (entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search);
entryPtr != NULL;) {
cmdPtr = (Command *) Tcl_GetHashValue(entryPtr);
- if (cmdPtr->nreProc == TclNRInterpCoroutine) {
+ if (cmdPtr->nreProc2 == TclNRInterpCoroutine) {
Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr);
entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search);
} else {
entryPtr = Tcl_NextHashEntry(&search);
}
@@ -1851,11 +1851,11 @@
if (found != NULL && cmdPtr->deleteProc == DeleteImportedCmd) {
Command *overwrite = (Command *) Tcl_GetHashValue(found);
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(
"import pattern \"%s\" would create a loop"
" containing command \"%s\"",
@@ -1866,11 +1866,11 @@
}
}
}
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;
/* corresponding decrement is in DeleteImportedCmd */
cmdPtr->refCount++;
@@ -1889,12 +1889,11 @@
cmdPtr->importRefPtr = refPtr;
} else {
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)) {
/*
* Repeated import of same command is acceptable.
*/
@@ -2027,12 +2026,11 @@
* Original not in namespace we're matching. Check the first link
* in the import chain.
*/
Command *cmdPtr = (Command *) token;
- ImportedCmdData *dataPtr = (ImportedCmdData *)
- cmdPtr->objClientData;
+ ImportedCmdData *dataPtr = (ImportedCmdData *)cmdPtr->objClientData2;
Tcl_Command firstToken = (Tcl_Command) dataPtr->realCmdPtr;
if (firstToken == origin) {
continue;
}
@@ -2082,11 +2080,11 @@
if (cmdPtr->deleteProc != DeleteImportedCmd) {
return NULL;
}
while (cmdPtr->deleteProc == DeleteImportedCmd) {
- ImportedCmdData *dataPtr = (ImportedCmdData *) cmdPtr->objClientData;
+ ImportedCmdData *dataPtr = (ImportedCmdData *) cmdPtr->objClientData2;
cmdPtr = dataPtr->realCmdPtr;
}
return (Tcl_Command) cmdPtr;
}
@@ -2112,11 +2110,11 @@
static int
InvokeImportedNRCmd(
void *clientData, /* Points to the imported command's
* ImportedCmdData structure. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
ImportedCmdData *dataPtr = (ImportedCmdData *) clientData;
Command *realCmdPtr = dataPtr->realCmdPtr;
@@ -2127,14 +2125,14 @@
int
TclInvokeImportedCmd(
void *clientData, /* Points to the imported command's
* ImportedCmdData structure. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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);
}
/*
*----------------------------------------------------------------------
@@ -3130,11 +3128,11 @@
static int
NamespaceChildrenCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
Namespace *nsPtr, *childNsPtr;
Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace(interp);
@@ -3245,11 +3243,11 @@
static int
NamespaceCodeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listPtr, *objPtr;
const char *arg;
Tcl_Size length;
@@ -3320,11 +3318,11 @@
static int
NamespaceCurrentCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
@@ -3379,16 +3377,16 @@
static int
NamespaceDeleteCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
const char *name;
- int i;
+ Tcl_Size i;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?name name...?");
return TCL_ERROR;
}
@@ -3456,22 +3454,22 @@
static int
NamespaceEvalCmd(
void *clientData, /* Arbitrary value passed to cmd. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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);
}
static int
NRNamespaceEvalCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
CmdFrame *invoker;
int word;
@@ -3599,11 +3597,11 @@
static int
NamespaceExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
if (objc != 2) {
@@ -3654,14 +3652,14 @@
static int
NamespaceExportCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int firstArg, i;
+ Tcl_Size firstArg, i;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?-clear? ?pattern pattern...?");
return TCL_ERROR;
}
@@ -3736,15 +3734,16 @@
static int
NamespaceForgetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *pattern;
- int i, result;
+ Tcl_Size i;
+ int result;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?pattern pattern...?");
return TCL_ERROR;
}
@@ -3801,17 +3800,17 @@
static int
NamespaceImportCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int allowOverwrite = 0;
const char *string, *pattern;
- int i, result;
- int firstArg;
+ Tcl_Size i, firstArg;
+ int result;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?-force? ?pattern pattern...?");
return TCL_ERROR;
}
@@ -3905,22 +3904,22 @@
static int
NamespaceInscopeCmd(
void *clientData, /* Arbitrary value passed to cmd. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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);
}
static int
NRNamespaceInscopeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *namespacePtr;
CallFrame *framePtr, **framePtrPtr;
Tcl_Obj *cmdObjPtr;
@@ -4003,11 +4002,11 @@
static int
NamespaceOriginCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Command cmd, origCmd;
Tcl_Obj *resultPtr;
@@ -4064,11 +4063,11 @@
static int
NamespaceParentCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *nsPtr;
if (objc == 1) {
@@ -4121,11 +4120,11 @@
static int
NamespacePathCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Namespace *nsPtr = (Namespace *) TclGetCurrentNamespace(interp);
Tcl_Size nsObjc, i;
int result = TCL_ERROR;
@@ -4348,11 +4347,11 @@
static int
NamespaceQualifiersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name, *p;
size_t length;
@@ -4416,11 +4415,11 @@
static int
NamespaceUnknownCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Namespace *currNsPtr;
Tcl_Obj *resultPtr;
int rc;
@@ -4603,11 +4602,11 @@
static int
NamespaceTailCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *name, *p;
if (objc != 2) {
@@ -4661,11 +4660,11 @@
static int
NamespaceUpvarCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
Tcl_Namespace *nsPtr, *savedNsPtr;
Var *otherPtr, *arrayPtr;
@@ -4735,11 +4734,11 @@
static int
NamespaceWhichCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const opts[] = {
"-command", "-variable", NULL
};
Index: generic/tclOO.c
==================================================================
--- generic/tclOO.c
+++ generic/tclOO.c
@@ -20,11 +20,11 @@
* Commands in oo::define and oo::objdefine.
*/
static const struct {
const char *name;
- Tcl_ObjCmdProc *objProc;
+ Tcl_ObjCmdProc2 *objProc;
int flag;
} defineCmds[] = {
{"constructor", TclOODefineConstructorObjCmd, 0},
{"definitionnamespace", TclOODefineDefnNsObjCmd, 0},
{"deletemethod", TclOODefineDeleteMethodObjCmd, 0},
@@ -82,17 +82,17 @@
static inline void RemoveClass(Class **list, size_t num, size_t idx);
static inline void RemoveObject(Object **list, size_t num, size_t idx);
static inline void SquelchCachedName(Object *oPtr);
static int PublicNRObjectCmd(void *clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const *objv);
static int PrivateNRObjectCmd(void *clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const *objv);
static int MyClassNRObjCmd(void *clientData,
- Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const *objv);
static void MyClassDeleted(void *clientData);
/*
* Methods in the oo::object and oo::class classes. First, we define a helper
@@ -102,11 +102,11 @@
* Note that the core methods don't need clone or free proc callbacks.
*/
#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),
DCM("eval", 0, TclOO_Object_Eval),
DCM("unknown", 0, TclOO_Object_Unknown),
@@ -125,12 +125,12 @@
/*
* 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
};
/*
@@ -300,22 +300,22 @@
static inline void
CreateCmdInNS(
Tcl_Interp *interp,
Tcl_Namespace *namespacePtr,
const char *name,
- Tcl_ObjCmdProc *cmdProc,
- Tcl_ObjCmdProc *nreProc,
+ Tcl_ObjCmdProc2 *cmdProc,
+ Tcl_ObjCmdProc2 *nreProc,
CompileProc *compileProc)
{
Command *cmdPtr;
if (cmdProc == NULL && nreProc == NULL) {
Tcl_Panic("must supply at least one implementation function");
}
cmdPtr = (Command *) TclCreateObjCommandInNs(interp, name,
namespacePtr, cmdProc, NULL, NULL);
- cmdPtr->nreProc = nreProc;
+ cmdPtr->nreProc2 = nreProc;
cmdPtr->compileProc = compileProc;
}
/*
* ----------------------------------------------------------------------
@@ -460,14 +460,14 @@
/*
* Don't have handles to these namespaces, so use Tcl_CreateObjCommand.
*/
- Tcl_CreateObjCommand(interp,
+ Tcl_CreateObjCommand2(interp,
"::oo::configuresupport::configurableobject::property",
TclOODefinePropertyCmd, (void *) 1, NULL);
- Tcl_CreateObjCommand(interp,
+ Tcl_CreateObjCommand2(interp,
"::oo::configuresupport::configurableclass::property",
TclOODefinePropertyCmd, (void *) 0, NULL);
/*
* Evaluate the remaining definitions, which are a compiled-in Tcl script.
@@ -780,11 +780,11 @@
* Add the NRE command and trace directly. While this breaks a number of
* abstractions, it is faster and we're inside Tcl here so we're allowed.
*/
cmdPtr = (Command *) oPtr->command;
- cmdPtr->nreProc = PublicNRObjectCmd;
+ cmdPtr->nreProc2 = PublicNRObjectCmd;
cmdPtr->tracePtr = tracePtr = (CommandTrace *)
Tcl_Alloc(sizeof(CommandTrace));
tracePtr->traceProc = ObjectRenamedTrace;
tracePtr->clientData = oPtr;
tracePtr->flags = TCL_TRACE_RENAME|TCL_TRACE_DELETE;
@@ -1217,11 +1217,11 @@
Tcl_InterpState state;
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);
}
Tcl_RestoreInterpState(interp, state);
@@ -1769,11 +1769,11 @@
/*
* Adjust the ensemble tracking record if necessary. [Bug 3514761]
*/
isRoot = TclInitRewriteEnsemble(interp, skip, skip, objv);
- result = Tcl_NRCallObjProc(interp, TclOOInvokeContext, contextPtr,
+ result = Tcl_NRCallObjProc2(interp, TclOOInvokeContext, contextPtr,
objc, objv);
if (isRoot) {
TclResetRewriteEnsemble(interp, 1);
}
@@ -2281,11 +2281,11 @@
args[1] = oPtr->fPtr->clonedName;
args[2] = TclOOObjectName(interp, oPtr);
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]);
TclDecrRefCount(args[2]);
TclOODeleteContext(contextPtr);
@@ -2319,25 +2319,25 @@
Tcl_Interp *interp,
Object *oPtr,
Method *mPtr,
Tcl_Obj *namePtr)
{
- if (mPtr->typePtr == NULL) {
+ if (mPtr->type2Ptr == NULL) {
TclNewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
mPtr->flags & PUBLIC_METHOD, NULL, NULL);
- } else if (mPtr->typePtr->cloneProc) {
+ } else if (mPtr->type2Ptr->cloneProc) {
void *newClientData;
- if (mPtr->typePtr->cloneProc(interp, mPtr->clientData,
+ if (mPtr->type2Ptr->cloneProc(interp, mPtr->clientData,
&newClientData) != TCL_OK) {
return TCL_ERROR;
}
TclNewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
- mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, newClientData);
+ mPtr->flags & PUBLIC_METHOD, mPtr->type2Ptr, newClientData);
} else {
TclNewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
- mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, mPtr->clientData);
+ mPtr->flags & PUBLIC_METHOD, mPtr->type2Ptr, mPtr->clientData);
}
return TCL_OK;
}
static int
@@ -2348,26 +2348,26 @@
Tcl_Obj *namePtr,
Method **m2PtrPtr)
{
Method *m2Ptr;
- if (mPtr->typePtr == NULL) {
+ if (mPtr->type2Ptr == NULL) {
m2Ptr = (Method *) TclNewMethod((Tcl_Class) clsPtr,
namePtr, mPtr->flags & PUBLIC_METHOD, NULL, NULL);
- } else if (mPtr->typePtr->cloneProc) {
+ } else if (mPtr->type2Ptr->cloneProc) {
void *newClientData;
- if (mPtr->typePtr->cloneProc(interp, mPtr->clientData,
+ if (mPtr->type2Ptr->cloneProc(interp, mPtr->clientData,
&newClientData) != TCL_OK) {
return TCL_ERROR;
}
m2Ptr = (Method *) TclNewMethod((Tcl_Class) clsPtr,
- namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->typePtr,
+ namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->type2Ptr,
newClientData);
} else {
m2Ptr = (Method *) TclNewMethod((Tcl_Class) clsPtr,
- namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->typePtr,
+ namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->type2Ptr,
mPtr->clientData);
}
if (m2PtrPtr != NULL) {
*m2PtrPtr = m2Ptr;
}
@@ -2576,21 +2576,21 @@
int
TclOOPublicObjectCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
- return Tcl_NRCallObjProc(interp, PublicNRObjectCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, PublicNRObjectCmd, clientData, objc, objv);
}
static int
PublicNRObjectCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
return TclOOObjectCmdCore((Object *) clientData, interp, objc, objv,
PUBLIC_METHOD, NULL);
}
@@ -2597,21 +2597,21 @@
int
TclOOPrivateObjectCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
- return Tcl_NRCallObjProc(interp, PrivateNRObjectCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, PrivateNRObjectCmd, clientData, objc, objv);
}
static int
PrivateNRObjectCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
return TclOOObjectCmdCore((Object *) clientData, interp, objc, objv, 0, NULL);
}
@@ -2658,21 +2658,21 @@
int
TclOOMyClassObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
- return Tcl_NRCallObjProc(interp, MyClassNRObjCmd, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, MyClassNRObjCmd, clientData, objc, objv);
}
static int
MyClassNRObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) clientData;
if (objc < 2) {
@@ -2922,11 +2922,11 @@
/*
* 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);
/*
* Restore the call chain context index as we've finished the inner invoke
* and want to operate in the outer context again.
@@ -3037,17 +3037,17 @@
Command *cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objPtr);
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(
"%s does not refer to an object", TclGetString(objPtr)));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "OBJECT", TclGetString(objPtr),
Index: generic/tclOO.decls
==================================================================
--- generic/tclOO.decls
+++ generic/tclOO.decls
@@ -162,17 +162,17 @@
Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp)
}
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 {
Method *TclOONewProcInstanceMethod(Tcl_Interp *interp, Object *oPtr,
int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj,
Index: generic/tclOO.h
==================================================================
--- generic/tclOO.h
+++ generic/tclOO.h
@@ -58,18 +58,16 @@
* Public datatypes for callbacks and structures used in the TIP#257 (OO)
* implementation. These are used to implement custom types of method calls
* 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);
-#if TCL_MAJOR_VERSION > 8
+#endif /* TCL_NO_DEPRECATED */
typedef int (Tcl_MethodCallProc2)(void *clientData, Tcl_Interp *interp,
Tcl_ObjectContext objectContext, Tcl_Size objc, Tcl_Obj *const *objv);
-#else
-#define Tcl_MethodCallProc2 Tcl_MethodCallProc
-#endif
typedef void (Tcl_MethodDeleteProc)(void *clientData);
typedef int (Tcl_CloneProc)(Tcl_Interp *interp, void *oldClientData,
void **newClientData);
typedef void (Tcl_ObjectMetadataDeleteProc)(void *clientData);
typedef int (Tcl_ObjectMapMethodNameProc)(Tcl_Interp *interp,
@@ -79,10 +77,11 @@
* The type of a method implementation. This describes how to call the method
* implementation, how to delete it (when the object or class is deleted) and
* how to create a clone of it (when the object or class is copied).
*/
+#ifndef TCL_NO_DEPRECATED
typedef struct Tcl_MethodType {
int version; /* Structure version field. Always to be equal
* to TCL_OO_METHOD_VERSION_(1|CURRENT) in
* declarations. */
const char *name; /* Name of this type of method, mostly for
@@ -95,12 +94,12 @@
* does not need deleting. */
Tcl_CloneProc *cloneProc; /* How to copy this method's type-specific
* data, or NULL if the type-specific data can
* be copied directly. */
} Tcl_MethodType;
+#endif /* TCL_NO_DEPRECATED */
-#if TCL_MAJOR_VERSION > 8
typedef struct Tcl_MethodType2 {
int version; /* Structure version field. Always to be equal
* to TCL_OO_METHOD_VERSION_2 in
* declarations. */
const char *name; /* Name of this type of method, mostly for
@@ -113,13 +112,10 @@
* does not need deleting. */
Tcl_CloneProc *cloneProc; /* How to copy this method's type-specific
* data, or NULL if the type-specific data can
* be copied directly. */
} Tcl_MethodType2;
-#else
-#define Tcl_MethodType2 Tcl_MethodType
-#endif
/*
* The correct value for the version field of the Tcl_MethodType structure.
* This allows new versions of the structure to be introduced without breaking
* binary compatibility.
Index: generic/tclOOBasic.c
==================================================================
--- generic/tclOOBasic.c
+++ generic/tclOOBasic.c
@@ -78,11 +78,11 @@
int
TclOO_Class_Constructor(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
Tcl_Obj **invoke, *nameObj;
@@ -187,11 +187,11 @@
TclOO_Class_Create(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
const char *objName;
Tcl_Size len;
@@ -252,11 +252,11 @@
TclOO_Class_CreateNs(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
const char *objName, *nsName;
Tcl_Size len;
@@ -325,11 +325,11 @@
TclOO_Class_New(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
/*
@@ -369,11 +369,11 @@
TclOO_Object_Destroy(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
CallContext *contextPtr;
@@ -430,11 +430,11 @@
TclOO_Object_Eval(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
CallContext *contextPtr = (CallContext *) context;
Tcl_Object object = Tcl_ObjectContextObject(context);
size_t skip = Tcl_ObjectContextSkippedArgs(context);
@@ -532,11 +532,11 @@
TclOO_Object_Unknown(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
CallContext *contextPtr = (CallContext *) context;
Object *callerObj = NULL;
Class *callerCls = NULL;
@@ -639,11 +639,11 @@
TclOO_Object_LinkVar(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Interp *iPtr = (Interp *) interp;
Tcl_Object object = Tcl_ObjectContextObject(context);
Namespace *savedNsPtr;
@@ -856,11 +856,11 @@
TclOO_Object_VarName(
TCL_UNUSED(void *),
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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Tcl_Var varPtr, aryVar;
Tcl_Obj *varNamePtr;
@@ -915,11 +915,11 @@
int
TclOONextObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
CallFrame *framePtr = iPtr->varFramePtr;
Tcl_ObjectContext context;
@@ -951,11 +951,11 @@
int
TclOONextToObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
CallFrame *framePtr = iPtr->varFramePtr;
Class *classPtr;
@@ -1084,11 +1084,11 @@
int
TclOOSelfObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
static const char *const subcmds[] = {
"call", "caller", "class", "filter", "method", "namespace", "next",
"object", "target", NULL
@@ -1321,11 +1321,11 @@
int
TclOOCopyObjectCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Object oPtr, o2Ptr;
if (objc < 2 || objc > 4) {
Index: generic/tclOOCall.c
==================================================================
--- generic/tclOOCall.c
+++ generic/tclOOCall.c
@@ -320,11 +320,11 @@
void *clientData, /* The method call context. */
Tcl_Interp *interp, /* Interpreter for error reporting, and many
* other sorts of context handling (e.g.,
* commands, variables) depending on method
* implementation. */
- int objc, /* The number of arguments. */
+ Tcl_Size objc, /* The number of arguments. */
Tcl_Obj *const objv[]) /* The arguments as actually seen. */
{
CallContext *const contextPtr = (CallContext *) clientData;
Method *const mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr;
const int isFilter =
@@ -378,14 +378,16 @@
/*
* Run the method implementation.
*/
+#ifndef TCL_NO_DEPRECATED
if (mPtr->typePtr->version < TCL_OO_METHOD_VERSION_2) {
return (mPtr->typePtr->callProc)(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, objc, objv);
}
+#endif /* TCL_NO_DEPRECATED */
return (mPtr->type2Ptr->callProc)(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, objc, objv);
}
static int
@@ -798,14 +800,14 @@
if (isNew) {
int isWanted = (!WANT_PUBLIC(flags) || IS_PUBLIC(mPtr))
? IN_LIST : 0;
- isWanted |= (mPtr->typePtr == NULL ? NO_IMPLEMENTATION : 0);
+ isWanted |= (mPtr->type2Ptr == NULL ? NO_IMPLEMENTATION : 0);
Tcl_SetHashValue(hPtr, INT2PTR(isWanted));
} else if ((PTR2INT(Tcl_GetHashValue(hPtr)) & NO_IMPLEMENTATION)
- && mPtr->typePtr != NULL) {
+ && mPtr->type2Ptr != NULL) {
int isWanted = PTR2INT(Tcl_GetHashValue(hPtr));
isWanted &= ~NO_IMPLEMENTATION;
Tcl_SetHashValue(hPtr, INT2PTR(isWanted));
}
@@ -984,11 +986,11 @@
* the call chain.
*
* This is also where we enforce mixin-consistency.
*/
- if (mPtr == NULL || mPtr->typePtr == NULL || !MIXIN_CONSISTENT(flags)) {
+ if (mPtr == NULL || mPtr->type2Ptr == NULL || !MIXIN_CONSISTENT(flags)) {
return;
}
/*
* Enforce real private method handling here. We will skip adding this
@@ -1893,11 +1895,11 @@
miPtr->mPtr->namePtr;
descObjs[2] = miPtr->mPtr->declaringClassPtr
? Tcl_GetObjectName(interp,
(Tcl_Object) miPtr->mPtr->declaringClassPtr->thisPtr)
: objectLiteral;
- descObjs[3] = Tcl_NewStringObj(miPtr->mPtr->typePtr->name,
+ descObjs[3] = Tcl_NewStringObj(miPtr->mPtr->type2Ptr->name,
TCL_AUTO_LENGTH);
objv[i] = Tcl_NewListObj(4, descObjs);
}
Index: generic/tclOODecls.h
==================================================================
--- generic/tclOODecls.h
+++ generic/tclOODecls.h
@@ -15,10 +15,14 @@
#ifdef USE_TCL_STUBS
# undef USE_TCLOO_STUBS
# define USE_TCLOO_STUBS
#endif
+
+#ifdef TCL_NO_DEPRECATED
+# define Tcl_MethodType void
+#endif
/* !BEGIN!: Do not edit below this line. */
#ifdef __cplusplus
extern "C" {
@@ -268,16 +272,13 @@
#endif /* defined(USE_TCLOO_STUBS) */
/* !END!: Do not edit above this line. */
-#if TCL_MAJOR_VERSION < 9
- /* TIP #630 for 8.7 */
-# undef Tcl_MethodIsType2
-# define Tcl_MethodIsType2 Tcl_MethodIsType
-# undef Tcl_NewInstanceMethod2
-# define Tcl_NewInstanceMethod2 Tcl_NewInstanceMethod
-# undef Tcl_NewMethod2
-# define Tcl_NewMethod2 Tcl_NewMethod
+#ifdef TCL_NO_DEPRECATED
+# undef Tcl_MethodType
+# undef Tcl_MethodIsType
+# undef Tcl_NewInstanceMethod
+# undef Tcl_NewMethod
#endif
#endif /* _TCLOODECLS */
Index: generic/tclOODefineCmds.c
==================================================================
--- generic/tclOODefineCmds.c
+++ generic/tclOODefineCmds.c
@@ -32,22 +32,22 @@
/*
* Some things that make it easier to declare a slot.
*/
typedef 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;
} DeclaredSlot;
#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}}
/*
* A [string match] pattern used to determine if a method should be exported.
*/
@@ -64,91 +64,91 @@
Tcl_Namespace *const namespacePtr);
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);
+ Tcl_Size 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[]);
+ Tcl_Size 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 ClassFilter_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ClassFilter_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ClassMixin_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ClassMixin_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ClassSuper_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ClassSuper_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ClassVars_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ClassVars_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ObjFilter_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ObjFilter_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ObjMixin_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ObjMixin_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ObjVars_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ObjVars_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ClassReadableProps_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ClassReadableProps_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ClassWritableProps_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ClassWritableProps_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ObjectReadableProps_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ObjectReadableProps_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ObjectWritableProps_Get(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_ObjectWritableProps_Set(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int ResolveClass(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
/*
* Now define the slots used in declarations.
*/
@@ -781,11 +781,11 @@
int
TclOOUnknownDefinition(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Namespace *nsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp);
FOREACH_HASH_DECLS;
Tcl_Size soughtLen;
@@ -917,11 +917,11 @@
static inline int
InitDefineContext(
Tcl_Interp *interp,
Tcl_Namespace *namespacePtr,
Object *oPtr,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
CallFrame *framePtr, **framePtrPtr = &framePtr;
if (namespacePtr == NULL) {
@@ -1124,11 +1124,11 @@
static inline int
MagicDefinitionInvoke(
Tcl_Interp *interp,
Tcl_Namespace *nsPtr,
int cmdIndex,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *objPtr, *obj2Ptr, **objs;
Tcl_Command cmd;
int isRoot, result, offset = cmdIndex + 1;
@@ -1192,11 +1192,11 @@
int
TclOODefineObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Namespace *nsPtr;
Object *oPtr;
int result;
@@ -1268,11 +1268,11 @@
int
TclOOObjDefObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Namespace *nsPtr;
Object *oPtr;
int result;
@@ -1337,11 +1337,11 @@
int
TclOODefineSelfObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Namespace *nsPtr;
Object *oPtr;
int result, isPrivate;
@@ -1408,11 +1408,11 @@
int
TclOODefineObjSelfObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr;
if (objc != 1) {
@@ -1442,11 +1442,11 @@
int
TclOODefinePrivateObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int isInstancePrivate = (clientData != NULL);
/* Just so that we can generate the correct
* error message depending on the context of
@@ -1515,11 +1515,11 @@
int
TclOODefineClassObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr;
Class *clsPtr;
Foundation *fPtr = TclOOGetFoundation(interp);
@@ -1627,11 +1627,11 @@
int
TclOODefineConstructorObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Method method;
Tcl_Size bodyLength;
@@ -1686,11 +1686,11 @@
int
TclOODefineDefnNsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
static const char *kindList[] = {
"-class",
"-instance",
@@ -1763,11 +1763,11 @@
int
TclOODefineDeleteMethodObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int isInstanceDeleteMethod = (clientData != NULL);
Object *oPtr;
int i;
@@ -1820,11 +1820,11 @@
int
TclOODefineDestructorObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Method method;
Tcl_Size bodyLength;
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
@@ -1881,11 +1881,11 @@
int
TclOODefineExportObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int isInstanceExport = (clientData != NULL);
Object *oPtr;
Method *mPtr;
@@ -1978,11 +1978,11 @@
int
TclOODefineForwardObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int isInstanceForward = (clientData != NULL);
Object *oPtr;
Method *mPtr;
@@ -2042,11 +2042,11 @@
int
TclOODefineMethodObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
/*
* Table of export modes for methods and their corresponding enum.
*/
@@ -2138,11 +2138,11 @@
int
TclOODefineRenameMethodObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int isInstanceRenameMethod = (clientData != NULL);
Object *oPtr;
@@ -2195,11 +2195,11 @@
int
TclOODefineUnexportObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int isInstanceUnexport = (clientData != NULL);
Object *oPtr;
Method *mPtr;
@@ -2403,11 +2403,11 @@
static int
ClassFilter_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Obj *resultObj, *filterObj;
Tcl_Size i;
@@ -2431,11 +2431,11 @@
static int
ClassFilter_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Size filterc;
Tcl_Obj **filterv;
@@ -2472,11 +2472,11 @@
static int
ClassMixin_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Obj *resultObj;
Class *mixinPtr;
@@ -2503,11 +2503,11 @@
static int
ClassMixin_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Size mixinc, i;
Tcl_Obj **mixinv;
@@ -2582,11 +2582,11 @@
static int
ClassSuper_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Obj *resultObj;
Class *superPtr;
@@ -2612,11 +2612,11 @@
static int
ClassSuper_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Size superc, j;
Tcl_Size i;
@@ -2742,11 +2742,11 @@
static int
ClassVars_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Obj *resultObj;
Tcl_Size i;
@@ -2780,11 +2780,11 @@
static int
ClassVars_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Size i;
Tcl_Size varc;
@@ -2845,11 +2845,11 @@
static int
ObjFilter_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Obj *resultObj, *filterObj;
Tcl_Size i;
@@ -2873,11 +2873,11 @@
static int
ObjFilter_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Size filterc;
Tcl_Obj **filterv;
@@ -2912,11 +2912,11 @@
static int
ObjMixin_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Obj *resultObj;
Class *mixinPtr;
@@ -2944,11 +2944,11 @@
static int
ObjMixin_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Size mixinc, i;
Tcl_Obj **mixinv;
@@ -3015,11 +3015,11 @@
static int
ObjVars_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Obj *resultObj;
Tcl_Size i;
@@ -3053,11 +3053,11 @@
static int
ObjVars_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Size varc, i;
Tcl_Obj **varv;
@@ -3117,11 +3117,11 @@
static int
ResolveClass(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
int idx = Tcl_ObjectContextSkippedArgs(context);
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Class *clsPtr;
@@ -3170,11 +3170,11 @@
static int
Configurable_ClassReadableProps_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
if (clsPtr == NULL) {
@@ -3192,11 +3192,11 @@
static int
Configurable_ClassReadableProps_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Size varc;
Tcl_Obj **varv;
@@ -3222,11 +3222,11 @@
static int
Configurable_ObjectReadableProps_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
if (oPtr == NULL) {
@@ -3244,11 +3244,11 @@
static int
Configurable_ObjectReadableProps_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Size varc;
Tcl_Obj **varv;
@@ -3286,11 +3286,11 @@
static int
Configurable_ClassWritableProps_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
if (clsPtr == NULL) {
@@ -3308,11 +3308,11 @@
static int
Configurable_ClassWritableProps_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Class *clsPtr = TclOOGetClassDefineCmdContext(interp);
Tcl_Size varc;
Tcl_Obj **varv;
@@ -3338,11 +3338,11 @@
static int
Configurable_ObjectWritableProps_Get(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
if (oPtr == NULL) {
@@ -3360,11 +3360,11 @@
static int
Configurable_ObjectWritableProps_Set(
TCL_UNUSED(void *),
Tcl_Interp *interp,
Tcl_ObjectContext context,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Object *oPtr = (Object *) TclOOGetDefineCmdContext(interp);
Tcl_Size varc;
Tcl_Obj **varv;
Index: generic/tclOOInfo.c
==================================================================
--- generic/tclOOInfo.c
+++ generic/tclOOInfo.c
@@ -14,37 +14,37 @@
#include "config.h"
#endif
#include "tclInt.h"
#include "tclOOInt.h"
-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.
*/
@@ -187,11 +187,11 @@
static int
InfoObjectClassCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
if (objc != 2 && objc != 3) {
@@ -244,11 +244,11 @@
static int
InfoObjectDefnCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
Tcl_HashEntry *hPtr;
Proc *procPtr;
@@ -331,11 +331,11 @@
static int
InfoObjectFiltersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Size i;
Tcl_Obj *filterObj, *resultObj;
Object *oPtr;
@@ -370,11 +370,11 @@
static int
InfoObjectForwardCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
Tcl_HashEntry *hPtr;
Tcl_Obj *prefixObj;
@@ -440,11 +440,11 @@
static int
InfoObjectIsACmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const categories[] = {
"class", "metaclass", "mixin", "object", "typeof", NULL
};
@@ -560,11 +560,11 @@
static int
InfoObjectMethodsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const options[] = {
"-all", "-localprivate", "-private", "-scope", NULL
};
@@ -672,17 +672,17 @@
* Handle legacy-mode matching. [Bug 36e5517a6850]
*/
int scopeFilter = flag | TRUE_PRIVATE_METHOD;
FOREACH_HASH(namePtr, mPtr, oPtr->methodsPtr) {
- if (mPtr->typePtr && (mPtr->flags & scopeFilter) == flag) {
+ if (mPtr->type2Ptr && (mPtr->flags & scopeFilter) == flag) {
Tcl_ListObjAppendElement(NULL, resultObj, namePtr);
}
}
} else {
FOREACH_HASH(namePtr, mPtr, oPtr->methodsPtr) {
- if (mPtr->typePtr && (mPtr->flags & SCOPE_FLAGS) == flag) {
+ if (mPtr->type2Ptr && (mPtr->flags & SCOPE_FLAGS) == flag) {
Tcl_ListObjAppendElement(NULL, resultObj, namePtr);
}
}
}
}
@@ -702,11 +702,11 @@
static int
InfoObjectMethodTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
Tcl_HashEntry *hPtr;
Method *mPtr;
@@ -727,21 +727,21 @@
hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, objv[2]);
if (hPtr == NULL) {
goto unknownMethod;
}
mPtr = (Method *) Tcl_GetHashValue(hPtr);
- if (mPtr->typePtr == NULL) {
+ if (mPtr->type2Ptr == NULL) {
/*
* Special entry for visibility control: pretend the method doesnt
* exist.
*/
goto unknownMethod;
}
Tcl_SetObjResult(interp,
- Tcl_NewStringObj(mPtr->typePtr->name, TCL_AUTO_LENGTH));
+ Tcl_NewStringObj(mPtr->type2Ptr->name, TCL_AUTO_LENGTH));
return TCL_OK;
unknownMethod:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"unknown method \"%s\"", TclGetString(objv[2])));
@@ -762,11 +762,11 @@
static int
InfoObjectMixinsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Class *mixinPtr;
Object *oPtr;
Tcl_Obj *resultObj;
@@ -805,11 +805,11 @@
static int
InfoObjectIdCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
if (objc != 2) {
@@ -837,11 +837,11 @@
static int
InfoObjectNsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
if (objc != 2) {
@@ -869,11 +869,11 @@
static int
InfoObjectVariablesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
Tcl_Obj *resultObj;
Tcl_Size i;
@@ -928,11 +928,11 @@
static int
InfoObjectVarsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
const char *pattern = NULL;
FOREACH_HASH_DECLS;
@@ -989,11 +989,11 @@
static int
InfoClassConstrCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Proc *procPtr;
CompiledLocal *localPtr;
Tcl_Obj *resultObjs[2];
@@ -1050,11 +1050,11 @@
static int
InfoClassDefnCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_HashEntry *hPtr;
Proc *procPtr;
CompiledLocal *localPtr;
@@ -1118,11 +1118,11 @@
static int
InfoClassDefnNsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *kindList[] = {
"-class",
"-instance",
@@ -1168,11 +1168,11 @@
static int
InfoClassDestrCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Proc *procPtr;
Class *clsPtr;
@@ -1213,11 +1213,11 @@
static int
InfoClassFiltersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Size i;
Tcl_Obj *filterObj, *resultObj;
Class *clsPtr;
@@ -1251,11 +1251,11 @@
static int
InfoClassForwardCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_HashEntry *hPtr;
Tcl_Obj *prefixObj;
Class *clsPtr;
@@ -1302,11 +1302,11 @@
static int
InfoClassInstancesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
Class *clsPtr;
Tcl_Size i;
@@ -1350,11 +1350,11 @@
static int
InfoClassMethodsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const options[] = {
"-all", "-localprivate", "-private", "-scope", NULL
};
@@ -1450,17 +1450,17 @@
* Handle legacy-mode matching. [Bug 36e5517a6850]
*/
int scopeFilter = flag | TRUE_PRIVATE_METHOD;
FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) {
- if (mPtr->typePtr && (mPtr->flags & scopeFilter) == flag) {
+ if (mPtr->type2Ptr && (mPtr->flags & scopeFilter) == flag) {
Tcl_ListObjAppendElement(NULL, resultObj, namePtr);
}
}
} else {
FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) {
- if (mPtr->typePtr && (mPtr->flags & SCOPE_FLAGS) == flag) {
+ if (mPtr->type2Ptr && (mPtr->flags & SCOPE_FLAGS) == flag) {
Tcl_ListObjAppendElement(NULL, resultObj, namePtr);
}
}
}
}
@@ -1480,11 +1480,11 @@
static int
InfoClassMethodTypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_HashEntry *hPtr;
Method *mPtr;
Class *clsPtr;
@@ -1501,20 +1501,20 @@
hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, objv[2]);
if (hPtr == NULL) {
goto unknownMethod;
}
mPtr = (Method *) Tcl_GetHashValue(hPtr);
- if (mPtr->typePtr == NULL) {
+ if (mPtr->type2Ptr == NULL) {
/*
* Special entry for visibility control: pretend the method doesnt
* exist.
*/
goto unknownMethod;
}
Tcl_SetObjResult(interp,
- Tcl_NewStringObj(mPtr->typePtr->name, TCL_AUTO_LENGTH));
+ Tcl_NewStringObj(mPtr->type2Ptr->name, TCL_AUTO_LENGTH));
return TCL_OK;
unknownMethod:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"unknown method \"%s\"", TclGetString(objv[2])));
@@ -1535,11 +1535,11 @@
static int
InfoClassMixinsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Class *clsPtr, *mixinPtr;
Tcl_Obj *resultObj;
Tcl_Size i;
@@ -1577,11 +1577,11 @@
static int
InfoClassSubsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Class *clsPtr, *subclassPtr;
Tcl_Obj *resultObj;
Tcl_Size i;
@@ -1632,11 +1632,11 @@
static int
InfoClassSupersCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Class *clsPtr, *superPtr;
Tcl_Obj *resultObj;
Tcl_Size i;
@@ -1671,11 +1671,11 @@
static int
InfoClassVariablesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Class *clsPtr;
Tcl_Obj *resultObj;
Tcl_Size i;
@@ -1730,11 +1730,11 @@
static int
InfoObjectCallCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
CallContext *contextPtr;
@@ -1777,11 +1777,11 @@
static int
InfoClassCallCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Class *clsPtr;
CallChain *callPtr;
Index: generic/tclOOInt.h
==================================================================
--- generic/tclOOInt.h
+++ generic/tclOOInt.h
@@ -48,11 +48,13 @@
* information about all sorts of methods, including forwards, constructors
* and destructors.
*/
struct Method {
union {
+#ifndef TCL_NO_DEPRECATED
const Tcl_MethodType *typePtr;
+#endif /* TCL_NO_DEPRECATED */
const Tcl_MethodType2 *type2Ptr;
}; /* The type of method. If NULL, this is a
* special flag record which is just used for
* the setting of the flags field. Note that
* this is a union of two pointer types that
@@ -484,58 +486,58 @@
* Structure containing definition information about basic class methods.
*/
struct DeclaredClassMethod {
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. */
};
/*
*----------------------------------------------------------------
* Commands relating to OO support.
*----------------------------------------------------------------
*/
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 TclOODefinePropertyCmd;
-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_ObjCmdProc TclOOInfoObjectPropCmd;
-MODULE_SCOPE Tcl_ObjCmdProc TclOOInfoClassPropCmd;
+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 TclOODefinePropertyCmd;
+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;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOInfoObjectPropCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclOOInfoClassPropCmd;
/*
* 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_MethodCallProc TclOO_Configurable_Configure;
+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;
+MODULE_SCOPE Tcl_MethodCallProc2 TclOO_Configurable_Configure;
/*
* Private definitions, some of which perhaps ought to be exposed properly or
* maybe just put in the internal stubs table.
*/
@@ -544,19 +546,19 @@
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,
+ const Tcl_MethodType2 *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_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,
const char *nsNameStr, Tcl_Size objc,
Tcl_Obj *const *objv, Tcl_Size skip,
@@ -595,11 +597,11 @@
Object *contextObj, Class *contextCls, int flags,
const char ***stringsPtr);
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, Tcl_Size objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE Tcl_Var TclOOLookupObjectVar(Tcl_Interp *interp,
Tcl_Object object, Tcl_Obj *varName,
Tcl_Var *aryPtr);
MODULE_SCOPE int TclNRObjectContextInvokeNext(Tcl_Interp *interp,
Index: generic/tclOOIntDecls.h
==================================================================
--- generic/tclOOIntDecls.h
+++ generic/tclOOIntDecls.h
@@ -19,18 +19,18 @@
TCLAPI Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp);
/* 1 */
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,
Object *oPtr, int flags, Tcl_Obj *nameObj,
Tcl_Obj *argsObj, Tcl_Obj *bodyObj,
@@ -95,12 +95,12 @@
typedef struct TclOOIntStubs {
int magic;
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, Tcl_Size objc, Tcl_Obj *const *objv, int publicOnly, Class *startCls); /* 5 */
int (*tclOOIsReachable) (Class *targetPtr, Class *startPtr); /* 6 */
Method * (*tclOONewForwardMethod) (Tcl_Interp *interp, Class *clsPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 7 */
Index: generic/tclOOMethod.c
==================================================================
--- generic/tclOOMethod.c
+++ generic/tclOOMethod.c
@@ -45,22 +45,22 @@
/*
* Function declarations for things defined in this file.
*/
-static Tcl_Obj ** InitEnsembleRewrite(Tcl_Interp *interp, int objc,
- Tcl_Obj *const *objv, int toRewrite,
- int rewriteLength, Tcl_Obj *const *rewriteObjs,
- int *lengthPtr);
+static Tcl_Obj ** InitEnsembleRewrite(Tcl_Interp *interp, Tcl_Size objc,
+ Tcl_Obj *const *objv, Tcl_Size toRewrite,
+ Tcl_Size rewriteLength, Tcl_Obj *const *rewriteObjs,
+ Tcl_Size *lengthPtr);
static int InvokeProcedureMethod(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size 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,
+ Tcl_Size objc, Tcl_Obj *const *objv,
PMFrameData *fdPtr);
static void DeleteProcedureMethodRecord(ProcedureMethod *pmPtr);
static void DeleteProcedureMethod(void *clientData);
static int CloneProcedureMethod(Tcl_Interp *interp,
void *clientData, void **newClientData);
@@ -69,11 +69,11 @@
static ProcErrorProc DestructorErrorHandler;
static Tcl_Obj * RenderMethodName(void *clientData);
static Tcl_Obj * RenderDeclarerName(void *clientData);
static int InvokeForwardMethod(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static void DeleteForwardMethod(void *clientData);
static int CloneForwardMethod(Tcl_Interp *interp,
void *clientData, void **newClientData);
static Tcl_ResolveVarProc ProcedureMethodVarResolver;
static Tcl_ResolveCompiledVarProc ProcedureMethodCompiledVarResolver;
@@ -80,16 +80,16 @@
/*
* 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
};
/*
* Helper macros (derived from things private to tclVar.c)
@@ -131,11 +131,11 @@
* it. */
Tcl_Obj *nameObj, /* The name of the method. May be NULL; if so,
* 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. */
void *clientData) /* Some data associated with the particular
* method to be created. */
@@ -163,17 +163,17 @@
mPtr->refCount = 1;
Tcl_IncrRefCount(nameObj);
Tcl_SetHashValue(hPtr, mPtr);
} else {
mPtr = (Method *) Tcl_GetHashValue(hPtr);
- if (mPtr->typePtr != NULL && mPtr->typePtr->deleteProc != NULL) {
- mPtr->typePtr->deleteProc(mPtr->clientData);
+ if (mPtr->type2Ptr != NULL && mPtr->type2Ptr->deleteProc != NULL) {
+ mPtr->type2Ptr->deleteProc(mPtr->clientData);
}
}
populate:
- mPtr->typePtr = typePtr;
+ mPtr->type2Ptr = typePtr;
mPtr->clientData = clientData;
mPtr->flags = 0;
mPtr->declaringObjectPtr = oPtr;
mPtr->declaringClassPtr = NULL;
if (flags) {
@@ -184,10 +184,12 @@
}
}
oPtr->epoch++;
return (Tcl_Method) mPtr;
}
+
+#ifndef TCL_NO_DEPRECATED
Tcl_Method
Tcl_NewInstanceMethod(
TCL_UNUSED(Tcl_Interp *),
Tcl_Object object, /* The object that has the method attached to
* it. */
@@ -204,13 +206,15 @@
{
if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be %s",
"Tcl_NewInstanceMethod", "TCL_OO_METHOD_VERSION_1");
}
- return TclNewInstanceMethod(NULL, object, nameObj, flags, typePtr,
- clientData);
+ return TclNewInstanceMethod(NULL, object, nameObj, flags,
+ (const Tcl_MethodType2 *)typePtr, clientData);
}
+#endif /* TCL_NO_DEPRECATED */
+
Tcl_Method
Tcl_NewInstanceMethod2(
TCL_UNUSED(Tcl_Interp *),
Tcl_Object object, /* The object that has the method attached to
* it. */
@@ -228,11 +232,11 @@
if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be %s",
"Tcl_NewInstanceMethod2", "TCL_OO_METHOD_VERSION_2");
}
return TclNewInstanceMethod(NULL, object, nameObj, flags,
- (const Tcl_MethodType *) typePtr, clientData);
+ typePtr, clientData);
}
/*
* ----------------------------------------------------------------------
*
@@ -248,11 +252,11 @@
Tcl_Class cls, /* The class to attach the method to. */
Tcl_Obj *nameObj, /* The name of the object. May be NULL (e.g.,
* 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. */
void *clientData) /* Some data associated with the particular
* method to be created. */
@@ -275,18 +279,18 @@
mPtr->namePtr = nameObj;
Tcl_IncrRefCount(nameObj);
Tcl_SetHashValue(hPtr, mPtr);
} else {
mPtr = (Method *) Tcl_GetHashValue(hPtr);
- if (mPtr->typePtr != NULL && mPtr->typePtr->deleteProc != NULL) {
- mPtr->typePtr->deleteProc(mPtr->clientData);
+ if (mPtr->type2Ptr != NULL && mPtr->type2Ptr->deleteProc != NULL) {
+ mPtr->type2Ptr->deleteProc(mPtr->clientData);
}
}
populate:
clsPtr->thisPtr->fPtr->epoch++;
- mPtr->typePtr = typePtr;
+ mPtr->type2Ptr = typePtr;
mPtr->clientData = clientData;
mPtr->flags = 0;
mPtr->declaringObjectPtr = NULL;
mPtr->declaringClassPtr = clsPtr;
if (flags) {
@@ -298,10 +302,11 @@
}
return (Tcl_Method) mPtr;
}
+#ifndef TCL_NO_DEPRECATED
Tcl_Method
Tcl_NewMethod(
TCL_UNUSED(Tcl_Interp *),
Tcl_Class cls, /* The class to attach the method to. */
Tcl_Obj *nameObj, /* The name of the object. May be NULL (e.g.,
@@ -317,12 +322,14 @@
{
if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be %s",
"Tcl_NewMethod", "TCL_OO_METHOD_VERSION_1");
}
- return TclNewMethod(cls, nameObj, flags, typePtr, clientData);
+ return TclNewMethod(cls, nameObj, flags,
+ (const Tcl_MethodType2 *)typePtr, clientData);
}
+#endif /* TCL_NO_DEPRECATED */
Tcl_Method
Tcl_NewMethod2(
TCL_UNUSED(Tcl_Interp *),
Tcl_Class cls, /* The class to attach the method to. */
@@ -339,12 +346,11 @@
{
if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be %s",
"Tcl_NewMethod2", "TCL_OO_METHOD_VERSION_2");
}
- return TclNewMethod(cls, nameObj, flags,
- (const Tcl_MethodType *) typePtr, clientData);
+ return TclNewMethod(cls, nameObj, flags, typePtr, clientData);
}
/*
* ----------------------------------------------------------------------
*
@@ -358,12 +364,12 @@
void
TclOODelMethodRef(
Method *mPtr)
{
if ((mPtr != NULL) && (mPtr->refCount-- <= 1)) {
- if (mPtr->typePtr != NULL && mPtr->typePtr->deleteProc != NULL) {
- mPtr->typePtr->deleteProc(mPtr->clientData);
+ if (mPtr->type2Ptr != NULL && mPtr->type2Ptr->deleteProc != NULL) {
+ mPtr->type2Ptr->deleteProc(mPtr->clientData);
}
if (mPtr->namePtr != NULL) {
Tcl_DecrRefCount(mPtr->namePtr);
}
@@ -610,11 +616,11 @@
* NULL. */
Tcl_Obj *argsObj, /* The formal argument list for the method,
* 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
* the procedure record reference. Presumably
* inside the structure indicated by the
@@ -662,11 +668,11 @@
* _must not_ be NULL. */
Tcl_Obj *argsObj, /* The formal argument list for the method,
* 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
* the procedure record reference. Presumably
* inside the structure indicated by the
@@ -701,11 +707,11 @@
static int
InvokeProcedureMethod(
void *clientData, /* Pointer to some per-method context. */
Tcl_Interp *interp,
Tcl_ObjectContext context, /* The method calling context. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments as actually seen. */
{
ProcedureMethod *pmPtr = (ProcedureMethod *) clientData;
int result;
PMFrameData *fdPtr; /* Important data that has to have a lifetime
@@ -840,11 +846,11 @@
PushMethodCallFrame(
Tcl_Interp *interp, /* Current interpreter. */
CallContext *contextPtr, /* Current method call context. */
ProcedureMethod *pmPtr, /* Information about this procedure-like
* method. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv, /* Array of arguments. */
PMFrameData *fdPtr) /* Place to store information about the call
* frame. */
{
Namespace *nsPtr = (Namespace *) contextPtr->oPtr->namespacePtr;
@@ -1495,18 +1501,18 @@
static int
InvokeForwardMethod(
void *clientData, /* Pointer to some per-method context. */
Tcl_Interp *interp,
Tcl_ObjectContext context, /* The method calling context. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments as actually seen. */
{
CallContext *contextPtr = (CallContext *) context;
ForwardMethod *fmPtr = (ForwardMethod *) clientData;
Tcl_Obj **argObjs, **prefixObjs;
Tcl_Size numPrefixes, skip = contextPtr->skip;
- int len;
+ Tcl_Size len;
/*
* Build the real list of arguments to use. Note that we know that the
* prefixObj field of the ForwardMethod structure holds a reference to a
* non-empty list, so there's a whole class of failures ("not a list") we
@@ -1587,11 +1593,11 @@
Proc *
TclOOGetProcFromMethod(
Method *mPtr)
{
- if (mPtr->typePtr == &procMethodType) {
+ if (mPtr->type2Ptr == &procMethodType) {
ProcedureMethod *pmPtr = (ProcedureMethod *) mPtr->clientData;
return pmPtr->procPtr;
}
return NULL;
@@ -1599,11 +1605,11 @@
Tcl_Obj *
TclOOGetMethodBody(
Method *mPtr)
{
- if (mPtr->typePtr == &procMethodType) {
+ if (mPtr->type2Ptr == &procMethodType) {
ProcedureMethod *pmPtr = (ProcedureMethod *) mPtr->clientData;
(void) TclGetString(pmPtr->procPtr->bodyPtr);
return pmPtr->procPtr->bodyPtr;
}
@@ -1612,11 +1618,11 @@
Tcl_Obj *
TclOOGetFwdFromMethod(
Method *mPtr)
{
- if (mPtr->typePtr == &fwdMethodType) {
+ if (mPtr->type2Ptr == &fwdMethodType) {
ForwardMethod *fwPtr = (ForwardMethod *) mPtr->clientData;
return fwPtr->prefixObj;
}
return NULL;
@@ -1646,16 +1652,16 @@
*/
static Tcl_Obj **
InitEnsembleRewrite(
Tcl_Interp *interp, /* Place to log the rewrite info. */
- int objc, /* Number of real arguments. */
+ Tcl_Size 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. */
+ Tcl_Size toRewrite, /* Number of real arguments to replace. */
+ Tcl_Size rewriteLength, /* Number of arguments to insert instead. */
Tcl_Obj *const *rewriteObjs,/* Arguments to insert instead. */
- int *lengthPtr) /* Where to write the resulting length of the
+ Tcl_Size *lengthPtr) /* Where to write the resulting length of the
* array of rewritten arguments. */
{
size_t len = rewriteLength + objc - toRewrite;
Tcl_Obj **argObjs = (Tcl_Obj **)
TclStackAlloc(interp, sizeof(Tcl_Obj *) * len);
@@ -1710,24 +1716,25 @@
}
int
TclMethodIsType(
Tcl_Method method,
- const Tcl_MethodType *typePtr,
+ const Tcl_MethodType2 *typePtr,
void **clientDataPtr)
{
Method *mPtr = (Method *) method;
- if (mPtr->typePtr == typePtr) {
+ if (mPtr->type2Ptr == typePtr) {
if (clientDataPtr != NULL) {
*clientDataPtr = mPtr->clientData;
}
return 1;
}
return 0;
}
+#ifndef TCL_NO_DEPRECATED
int
Tcl_MethodIsType(
Tcl_Method method,
const Tcl_MethodType *typePtr,
void **clientDataPtr)
@@ -1736,18 +1743,19 @@
if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be %s",
"Tcl_MethodIsType", "TCL_OO_METHOD_VERSION_1");
}
- if (mPtr->typePtr == typePtr) {
+ if (mPtr->typePtr == (const Tcl_MethodType *) typePtr) {
if (clientDataPtr != NULL) {
*clientDataPtr = mPtr->clientData;
}
return 1;
}
return 0;
}
+#endif
int
Tcl_MethodIsType2(
Tcl_Method method,
const Tcl_MethodType2 *typePtr,
@@ -1757,11 +1765,11 @@
if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
Tcl_Panic("%s: Wrong version in typePtr->version, should be %s",
"Tcl_MethodIsType2", "TCL_OO_METHOD_VERSION_2");
}
- if (mPtr->typePtr == (const Tcl_MethodType *) typePtr) {
+ if (mPtr->type2Ptr == typePtr) {
if (clientDataPtr != NULL) {
*clientDataPtr = mPtr->clientData;
}
return 1;
}
Index: generic/tclOOProp.c
==================================================================
--- generic/tclOOProp.c
+++ generic/tclOOProp.c
@@ -39,14 +39,14 @@
* Forward declarations.
*/
static int Configurable_Getter(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static int Configurable_Setter(void *clientData,
Tcl_Interp *interp, Tcl_ObjectContext context,
- int objc, Tcl_Obj *const *objv);
+ Tcl_Size objc, Tcl_Obj *const *objv);
static void DetailsDeleter(void *clientData);
static int DetailsCloner(Tcl_Interp *, void *oldClientData,
void **newClientData);
static void ImplementObjectProperty(Tcl_Object targetObject,
Tcl_Obj *propNamePtr, int installGetter,
@@ -57,20 +57,20 @@
/*
* Method descriptors
*/
-static const Tcl_MethodType GetterType = {
- TCL_OO_METHOD_VERSION_1,
+static const Tcl_MethodType2 GetterType = {
+ TCL_OO_METHOD_VERSION_2,
"PropertyGetter",
Configurable_Getter,
DetailsDeleter,
DetailsCloner
};
-static const Tcl_MethodType SetterType = {
- TCL_OO_METHOD_VERSION_1,
+static const Tcl_MethodType2 SetterType = {
+ TCL_OO_METHOD_VERSION_2,
"PropertySetter",
Configurable_Setter,
DetailsDeleter,
DetailsCloner
};
@@ -251,11 +251,11 @@
TclOO_Configurable_Configure(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Interpreter used for the result, error
* reporting, etc. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
Tcl_Size skip = Tcl_ObjectContextSkippedArgs(context);
Tcl_Obj *namePtr;
@@ -371,11 +371,11 @@
* reference that is the name of the variable
* in the cpntext object. */
Tcl_Interp *interp, /* Interpreter used for the result, error
* reporting, etc. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Tcl_Obj *propNamePtr = (Tcl_Obj *) clientData;
Tcl_Var varPtr, aryVar;
Tcl_Obj *valuePtr;
@@ -407,11 +407,11 @@
* reference that is the name of the variable
* in the cpntext object. */
Tcl_Interp *interp, /* Interpreter used for the result, error
* reporting, etc. */
Tcl_ObjectContext context, /* The object/call context. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The actual arguments. */
{
Tcl_Obj *propNamePtr = (Tcl_Obj *) clientData;
Tcl_Var varPtr, aryVar;
@@ -540,11 +540,12 @@
Class *clsPtr, /* The object to inspect. Must exist. */
int writable, /* Whether we're after the readable or writable
* property set. */
Tcl_HashTable *accumulator) /* Where to gather the names. */
{
- int i, dummy;
+ Tcl_Size i;
+ int dummy;
Tcl_Obj *propName;
Class *mixin, *sup;
tailRecurse:
if (writable) {
@@ -591,11 +592,12 @@
Object *oPtr, /* The object to inspect. Must exist. */
int writable, /* Whether we're after the readable or writable
* property set. */
Tcl_HashTable *accumulator) /* Where to gather the names. */
{
- int i, dummy;
+ Tcl_Size i;
+ int dummy;
Tcl_Obj *propName;
Class *mixin;
if (writable) {
FOREACH(propName, oPtr->properties.writable) {
@@ -1026,14 +1028,14 @@
int
TclOODefinePropertyCmd(
void *useInstance, /* NULL for class, non-NULL for object. */
Tcl_Interp *interp, /* For error reporting and lookup. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
- int i;
+ Tcl_Size i;
const char *const options[] = {
"-get", "-kind", "-set", NULL
};
enum Options {
OPT_GET, OPT_KIND, OPT_SET
@@ -1189,15 +1191,16 @@
int
TclOOInfoClassPropCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Class *clsPtr;
- int i, idx, all = 0, writable = 0, allocated = 0;
+ Tcl_Size i;
+ int idx, all = 0, writable = 0, allocated = 0;
Tcl_Obj *result;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "className ?options...?");
return TCL_ERROR;
@@ -1247,15 +1250,16 @@
int
TclOOInfoObjectPropCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Object *oPtr;
- int i, idx, all = 0, writable = 0;
+ Tcl_Size i;
+ int idx, writable = 0, all = 0;
Tcl_Obj *result;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "objName ?options...?");
return TCL_ERROR;
Index: generic/tclOOStubInit.c
==================================================================
--- generic/tclOOStubInit.c
+++ generic/tclOOStubInit.c
@@ -11,10 +11,16 @@
MODULE_SCOPE const TclOOStubs tclOOStubs;
#ifdef __GNUC__
#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 = {
TCL_STUB_MAGIC,
Index: generic/tclObj.c
==================================================================
--- generic/tclObj.c
+++ generic/tclObj.c
@@ -4715,11 +4715,11 @@
int
Tcl_RepresentationCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *descObj;
if (objc != 2) {
Index: generic/tclPkg.c
==================================================================
--- generic/tclPkg.c
+++ generic/tclPkg.c
@@ -99,11 +99,11 @@
static int PkgRequireCore(void *data[], Tcl_Interp *interp, int result);
static int PkgRequireCoreFinal(void *data[], Tcl_Interp *interp, int result);
static int PkgRequireCoreCleanup(void *data[], Tcl_Interp *interp, int result);
static int PkgRequireCoreStep1(void *data[], Tcl_Interp *interp, int result);
static int PkgRequireCoreStep2(void *data[], Tcl_Interp *interp, int result);
-static int TclNRPkgRequireProc(void *clientData, Tcl_Interp *interp, int reqc, Tcl_Obj *const reqv[]);
+static int TclNRPkgRequireProc(void *clientData, Tcl_Interp *interp, Tcl_Size reqc, Tcl_Obj *const reqv[]);
static int SelectPackage(void *data[], Tcl_Interp *interp, int result);
static int SelectPackageFinal(void *data[], Tcl_Interp *interp, int result);
static int TclNRPackageObjCmdCleanup(void *data[], Tcl_Interp *interp, int result);
/*
@@ -434,19 +434,19 @@
{
RequireProcArgs args;
args.name = name;
args.clientDataPtr = clientDataPtr;
- return Tcl_NRCallObjProc(interp,
+ return Tcl_NRCallObjProc2(interp,
TclNRPkgRequireProc, (void *) &args, reqc, reqv);
}
static int
TclNRPkgRequireProc(
void *clientData,
Tcl_Interp *interp,
- int reqc,
+ Tcl_Size reqc,
Tcl_Obj *const reqv[])
{
RequireProcArgs *args = (RequireProcArgs *)clientData;
Tcl_NRAddCallback(interp,
@@ -1049,21 +1049,21 @@
*/
int
Tcl_PackageObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const pkgOptions[] = {
"files", "forget", "ifneeded", "names", "prefer",
"present", "provide", "require", "unknown", "vcompare",
Index: generic/tclProc.c
==================================================================
--- generic/tclProc.c
+++ generic/tclProc.c
@@ -32,28 +32,27 @@
*/
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_NRPostProc ApplyNR2;
static Tcl_NRPostProc InterpProcNR2;
static Tcl_NRPostProc Uplevel_Callback;
-static Tcl_ObjCmdProc NRInterpProc;
/*
* The ProcBodyObjType type
*/
@@ -152,11 +151,11 @@
* A new procedure gets created.
*
*----------------------------------------------------------------------
*/
-#undef TclObjInterpProc
+#undef TclObjInterpProc2
int
Tcl_ProcObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
Tcl_Size objc, /* Number of arguments. */
@@ -210,11 +209,11 @@
Tcl_AddErrorInfo(interp, "\")");
return TCL_ERROR;
}
cmd = TclNRCreateCommandInNs(interp, simpleName, (Tcl_Namespace *) nsPtr,
- TclObjInterpProc, NRInterpProc, procPtr, TclProcDeleteProc);
+ TclObjInterpProc2, TclNRInterpProc, procPtr, TclProcDeleteProc);
/*
* Now initialize the new procedure's cmdPtr field. This will be used
* later when the procedure is called to determine what namespace the
* procedure will run in. This will be different than the current
@@ -891,21 +890,21 @@
int
Tcl_UplevelObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
CmdFrame *invoker = NULL;
@@ -1056,19 +1055,19 @@
if (origCmd != NULL) {
cmdPtr = (Command *) origCmd;
}
if (cmdPtr->deleteProc == TclProcDeleteProc) {
- return (Proc *)cmdPtr->objClientData;
+ return (Proc *)cmdPtr->objClientData2;
}
return NULL;
}
static int
ProcWrongNumArgs(
Tcl_Interp *interp,
- int skip)
+ size_t skip)
{
CallFrame *framePtr = ((Interp *)interp)->varFramePtr;
Proc *procPtr = framePtr->procPtr;
Tcl_Size localCt = procPtr->numCompiledLocals, numArgs, i;
Tcl_Obj **desiredObjs;
@@ -1343,19 +1342,20 @@
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;
Proc *procPtr = framePtr->procPtr;
ByteCode *codePtr;
Var *varPtr, *defPtr;
Tcl_Size localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax;
Tcl_Obj *const *argObjs;
+ int skip = skip1;
ByteCodeGetInternalRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
/*
* Make sure that the local cache of variable names and initial values has
@@ -1583,11 +1583,11 @@
}
/*
*----------------------------------------------------------------------
*
- * TclObjInterpProc --
+ * TclObjInterpProc2/TclNRInterpProc --
*
* When a Tcl procedure gets invoked during bytecode evaluation, this
* object-based routine gets invoked to interpret the procedure.
*
* Results:
@@ -1598,24 +1598,24 @@
*
*----------------------------------------------------------------------
*/
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
+ Tcl_Size objc, /* Count of number of arguments to this
* procedure. */
Tcl_Obj *const objv[]) /* Argument value objects. */
{
/*
* Not used much in the core; external interface for iTcl
*/
- return Tcl_NRCallObjProc(interp, NRInterpProc, clientData, objc, objv);
+ return Tcl_NRCallObjProc2(interp, TclNRInterpProc, clientData, objc, objv);
}
int
TclNRInterpProc(
void *clientData, /* Record describing procedure to be
@@ -1632,14 +1632,15 @@
if (result != TCL_OK) {
return TCL_ERROR;
}
return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError);
}
-
+
+#ifndef TCL_NO_DEPRECATED
static int
NRInterpProc(
- void *clientData, /* Record describing procedure to be
+ 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
* procedure. */
@@ -1652,27 +1653,30 @@
return TCL_ERROR;
}
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
+ Tcl_Interp *interp, /* Interpreter in which procedure was
* invoked. */
- Tcl_Size 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. */
{
/*
* Not used much in the core; external interface for iTcl
*/
- return Tcl_NRCallObjProc2(interp, TclNRInterpProc, clientData, objc, objv);
+ return Tcl_NRCallObjProc(interp, NRInterpProc, clientData, objc, objv);
}
-
+#endif /* TCL_NO_DEPRECATED */
+
+
/*
*----------------------------------------------------------------------
*
* TclNRInterpProcCore --
*
@@ -2057,11 +2061,11 @@
/*
*----------------------------------------------------------------------
*
* 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:
* The interpreter's error info trace is set to a value that supplements
* the error code.
@@ -2259,37 +2263,38 @@
}
/*
*----------------------------------------------------------------------
*
- * 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.
*
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
Tcl_ObjCmdProc *
TclGetObjInterpProc(void)
{
return TclObjInterpProc;
}
+#endif /* TCL_NO_DEPRECATED */
Tcl_ObjCmdProc2 *
TclGetObjInterpProc2(void)
{
- return ObjInterpProc2;
+ return TclObjInterpProc2;
}
/*
*----------------------------------------------------------------------
*
@@ -2659,21 +2664,21 @@
int
Tcl_ApplyObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Proc *procPtr = NULL;
Tcl_Obj *lambdaPtr, *nsObjPtr;
int result;
@@ -2697,11 +2702,11 @@
return TCL_ERROR;
}
/*
* 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);
if (result != TCL_OK) {
return TCL_ERROR;
@@ -2751,11 +2756,11 @@
/*
*----------------------------------------------------------------------
*
* 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:
* The interpreter's error info trace is set to a value that supplements
* the error code.
Index: generic/tclProcess.c
==================================================================
--- generic/tclProcess.c
+++ generic/tclProcess.c
@@ -50,14 +50,14 @@
static int RefreshProcessInfo(ProcessInfo *info, int options);
static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, Tcl_Size 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;
/*
*----------------------------------------------------------------------
*
* InitProcessInfo --
@@ -418,11 +418,11 @@
static int
ProcessListObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *list;
Tcl_HashEntry *entry;
Tcl_HashSearch search;
@@ -469,11 +469,11 @@
static int
ProcessStatusObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *dict;
int options = WNOHANG;
Tcl_HashEntry *entry;
@@ -616,11 +616,11 @@
static int
ProcessPurgeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_HashEntry *entry;
Tcl_HashSearch search;
ProcessInfo *info;
@@ -714,11 +714,11 @@
static int
ProcessAutopurgeObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 1 && objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?flag?");
Index: generic/tclResult.c
==================================================================
--- generic/tclResult.c
+++ generic/tclResult.c
@@ -805,11 +805,11 @@
*/
int
TclMergeReturnOptions(
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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
* options dictionary should be written. */
int *codePtr, /* If not NULL, points to space where the
Index: generic/tclScan.c
==================================================================
--- generic/tclScan.c
+++ generic/tclScan.c
@@ -596,11 +596,11 @@
int
Tcl_ScanObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *format;
int numVars, nconversions, totalVars = -1;
int objIndex, offset, i, result, code;
Index: generic/tclStrIdxTree.c
==================================================================
--- generic/tclStrIdxTree.c
+++ generic/tclStrIdxTree.c
@@ -485,11 +485,11 @@
}
int
TclStrIdxTreeTestObjCmd(
void *clientData, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[])
+ Tcl_Size objc, Tcl_Obj *const objv[])
{
const char *cs, *cin, *ret;
static const char *const options[] = {
"findequal", "index", "puts-index", NULL
};
Index: generic/tclStrIdxTree.h
==================================================================
--- generic/tclStrIdxTree.h
+++ generic/tclStrIdxTree.h
@@ -181,9 +181,9 @@
MODULE_SCOPE Tcl_Obj * TclStrIdxTreeNewObj(void);
MODULE_SCOPE TclStrIdxTree*TclStrIdxTreeGetFromObj(Tcl_Obj *objPtr);
#ifdef TEST_STR_IDX_TREE
/* currently unused, debug resp. test purposes only */
-MODULE_SCOPE Tcl_ObjCmdProc TclStrIdxTreeTestObjCmd;
+MODULE_SCOPE Tcl_ObjCmdProc2 TclStrIdxTreeTestObjCmd;
#endif
#endif /* _TCLSTRIDXTREE_H */
Index: generic/tclStubInit.c
==================================================================
--- generic/tclStubInit.c
+++ generic/tclStubInit.c
@@ -62,11 +62,10 @@
#undef Tcl_SplitPath
#undef Tcl_FSSplitPath
#undef Tcl_ParseArgsObjv
#undef TclStaticLibrary
#define TclStaticLibrary Tcl_StaticLibrary
-#undef TclObjInterpProc
#if !defined(_WIN32) && !defined(__CYGWIN__)
# undef Tcl_WinConvertError
# define Tcl_WinConvertError 0
#endif
#undef TclGetStringFromObj
@@ -73,15 +72,22 @@
#if defined(TCL_NO_DEPRECATED)
# define TclGetStringFromObj 0
# define TclGetBytesFromObj 0
# define TclGetUnicodeFromObj 0
#endif
-#undef Tcl_Close
-#define Tcl_Close 0
-#undef Tcl_GetByteArrayFromObj
-#define Tcl_GetByteArrayFromObj 0
#define TclUnusedStubEntry 0
+
+#ifdef TCL_NO_DEPRECATED
+# define Tcl_CreateCommand 0
+# define Tcl_CreateObjCommand 0
+# define Tcl_CreateTrace 0
+# define Tcl_CreateObjTrace 0
+# define Tcl_NRCallObjProc 0
+# define Tcl_NRCreateCommand 0
+# define TclGetObjInterpProc 0
+#endif
+
#define TclUtfCharComplete Tcl_UtfCharComplete
#define TclUtfNext Tcl_UtfNext
#define TclUtfPrev Tcl_UtfPrev
#undef TclListObjGetElements
#undef TclListObjLength
@@ -193,11 +199,11 @@
Tcl_Interp **targetInterpPtr, const char **targetCmdPtr,
int *objcPtr, Tcl_Obj ***objv) {
Tcl_Size n = TCL_INDEX_NONE;
int result = Tcl_GetAliasObj(interp, childCmd, targetInterpPtr, targetCmdPtr, &n, objv);
if (objcPtr) {
- if ((sizeof(int) != sizeof(Tcl_Size)) && (result == TCL_OK) && (n > INT_MAX)) {
+ if ((sizeof(int) != sizeof(size_t)) && (result == TCL_OK) && (n > INT_MAX)) {
if (interp) {
Tcl_AppendResult(interp, "List too large to be processed", NULL);
}
return TCL_ERROR;
}
@@ -848,13 +854,13 @@
0, /* 26 */
Tcl_DbNewObj, /* 27 */
Tcl_DbNewStringObj, /* 28 */
Tcl_DuplicateObj, /* 29 */
TclFreeObj, /* 30 */
- Tcl_GetBoolean, /* 31 */
- Tcl_GetBooleanFromObj, /* 32 */
- Tcl_GetByteArrayFromObj, /* 33 */
+ 0, /* 31 */
+ 0, /* 32 */
+ 0, /* 33 */
Tcl_GetDouble, /* 34 */
Tcl_GetDoubleFromObj, /* 35 */
0, /* 36 */
Tcl_GetInt, /* 37 */
Tcl_GetIntFromObj, /* 38 */
@@ -898,11 +904,11 @@
0, /* 76 */
0, /* 77 */
Tcl_BadChannelOption, /* 78 */
Tcl_CallWhenDeleted, /* 79 */
Tcl_CancelIdleCall, /* 80 */
- Tcl_Close, /* 81 */
+ 0, /* 81 */
Tcl_CommandComplete, /* 82 */
Tcl_Concat, /* 83 */
Tcl_ConvertElement, /* 84 */
Tcl_ConvertCountedElement, /* 85 */
Tcl_CreateAlias, /* 86 */
Index: generic/tclTest.c
==================================================================
--- generic/tclTest.c
+++ generic/tclTest.c
@@ -171,19 +171,19 @@
static Tcl_ThreadCreateType AsyncThreadProc(void *);
static void CleanupTestSetassocdataTests(
void *clientData, Tcl_Interp *interp);
static void CmdDelProc1(void *clientData);
static void CmdDelProc2(void *clientData);
-static Tcl_CmdProc CmdProc1;
+static Tcl_ObjCmdProc2 CmdProc1;
static Tcl_CmdProc CmdProc2;
-static Tcl_CmdObjTraceProc CmdTraceDeleteProc;
-static Tcl_CmdObjTraceProc CmdTraceProc;
-static Tcl_ObjCmdProc CreatedCommandProc;
-static Tcl_ObjCmdProc CreatedCommandProc2;
+static Tcl_CmdObjTraceProc2 CmdTraceDeleteProc;
+static Tcl_CmdObjTraceProc2 CmdTraceProc;
+static Tcl_ObjCmdProc2 CreatedCommandProc;
+static Tcl_ObjCmdProc2 CreatedCommandProc2;
static void DelCallbackProc(void *clientData,
Tcl_Interp *interp);
-static Tcl_ObjCmdProc DelCmdProc;
+static Tcl_ObjCmdProc2 DelCmdProc;
static void DelDeleteProc(void *clientData);
static void EncodingFreeProc(void *clientData);
static int EncodingToUtfProc(void *clientData,
const char *src, int srcLen, int flags,
Tcl_EncodingState *statePtr, char *dst,
@@ -194,96 +194,95 @@
Tcl_EncodingState *statePtr, char *dst,
int dstLen, int *srcReadPtr, int *dstWrotePtr,
int *dstCharsPtr);
static void ExitProcEven(void *clientData);
static void ExitProcOdd(void *clientData);
-static Tcl_ObjCmdProc GetTimesCmd;
+static Tcl_ObjCmdProc2 GetTimesCmd;
static Tcl_ResolveCompiledVarProc InterpCompiledVarResolver;
static void MainLoop(void);
-static Tcl_CmdProc NoopCmd;
-static Tcl_ObjCmdProc NoopObjCmd;
+static Tcl_ObjCmdProc2 NoopCmd;
+static Tcl_ObjCmdProc2 NoopObjCmd;
static Tcl_CmdObjTraceProc TraceProc;
static void ObjTraceDeleteProc(void *clientData);
static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr);
static Tcl_FreeProc SpecialFree;
static int StaticInitProc(Tcl_Interp *interp);
-static Tcl_ObjCmdProc TestasyncCmd;
-static Tcl_ObjCmdProc TestbumpinterpepochCmd;
-static Tcl_ObjCmdProc TestbytestringCmd;
-static Tcl_ObjCmdProc TestsetbytearraylengthCmd;
-static Tcl_ObjCmdProc TestpurebytesobjCmd;
-static Tcl_ObjCmdProc TeststringbytesCmd;
-static Tcl_ObjCmdProc2 Testcmdobj2Cmd;
-static Tcl_ObjCmdProc TestcmdinfoCmd;
-static Tcl_ObjCmdProc TestcmdtokenCmd;
-static Tcl_ObjCmdProc TestcmdtraceCmd;
-static Tcl_ObjCmdProc TestconcatobjCmd;
-static Tcl_ObjCmdProc TestcreatecommandCmd;
-static Tcl_ObjCmdProc TestdcallCmd;
-static Tcl_ObjCmdProc TestdelCmd;
-static Tcl_ObjCmdProc TestdelassocdataCmd;
-static Tcl_ObjCmdProc TestdoubledigitsCmd;
-static Tcl_ObjCmdProc TestdstringCmd;
-static Tcl_ObjCmdProc TestencodingCmd;
-static Tcl_ObjCmdProc TestevalexCmd;
-static Tcl_ObjCmdProc TestevalobjvCmd;
-static Tcl_ObjCmdProc TesteventCmd;
+static Tcl_ObjCmdProc2 TestasyncCmd;
+static Tcl_ObjCmdProc2 TestbumpinterpepochCmd;
+static Tcl_ObjCmdProc2 TestbytestringCmd;
+static Tcl_ObjCmdProc2 TestsetbytearraylengthCmd;
+static Tcl_ObjCmdProc2 TestpurebytesobjCmd;
+static Tcl_ObjCmdProc2 TeststringbytesCmd;
+static Tcl_ObjCmdProc2 TestcmdinfoCmd;
+static Tcl_ObjCmdProc2 TestcmdtokenCmd;
+static Tcl_ObjCmdProc2 TestcmdtraceCmd;
+static Tcl_ObjCmdProc2 TestconcatobjCmd;
+static Tcl_ObjCmdProc2 TestcreatecommandCmd;
+static Tcl_ObjCmdProc2 TestdcallCmd;
+static Tcl_ObjCmdProc2 TestdelCmd;
+static Tcl_ObjCmdProc2 TestdelassocdataCmd;
+static Tcl_ObjCmdProc2 TestdoubledigitsCmd;
+static Tcl_ObjCmdProc2 TestdstringCmd;
+static Tcl_ObjCmdProc2 TestencodingCmd;
+static Tcl_ObjCmdProc2 TestevalexCmd;
+static Tcl_ObjCmdProc2 TestevalobjvCmd;
+static Tcl_ObjCmdProc2 TesteventCmd;
static int TesteventProc(Tcl_Event *event, int flags);
static int TesteventDeleteProc(Tcl_Event *event,
void *clientData);
-static Tcl_ObjCmdProc TestexithandlerCmd;
-static Tcl_ObjCmdProc TestexprlongCmd;
-static Tcl_ObjCmdProc TestexprlongobjCmd;
-static Tcl_ObjCmdProc TestexprdoubleCmd;
-static Tcl_ObjCmdProc TestexprdoubleobjCmd;
-static Tcl_ObjCmdProc TestexprparserCmd;
-static Tcl_ObjCmdProc TestexprstringCmd;
-static Tcl_ObjCmdProc TestfileCmd;
-static Tcl_ObjCmdProc TestfilelinkCmd;
-static Tcl_ObjCmdProc TestfeventCmd;
-static Tcl_ObjCmdProc TestgetassocdataCmd;
-static Tcl_ObjCmdProc TestgetintCmd;
-static Tcl_ObjCmdProc TestlongsizeCmd;
-static Tcl_ObjCmdProc TestgetplatformCmd;
-static Tcl_ObjCmdProc TestgetvarfullnameCmd;
-static Tcl_ObjCmdProc TestinterpdeleteCmd;
-static Tcl_ObjCmdProc TestlinkCmd;
-static Tcl_ObjCmdProc TestlinkarrayCmd;
-static Tcl_ObjCmdProc TestlistrepCmd;
-static Tcl_ObjCmdProc TestlocaleCmd;
-static Tcl_ObjCmdProc TestmainthreadCmd;
-static Tcl_ObjCmdProc TestsetmainloopCmd;
-static Tcl_ObjCmdProc TestexitmainloopCmd;
-static Tcl_ObjCmdProc TestpanicCmd;
-static Tcl_ObjCmdProc TestparseargsCmd;
-static Tcl_ObjCmdProc TestparserCmd;
-static Tcl_ObjCmdProc TestparsevarCmd;
-static Tcl_ObjCmdProc TestparsevarnameCmd;
-static Tcl_ObjCmdProc TestpreferstableCmd;
-static Tcl_ObjCmdProc TestprintCmd;
-static Tcl_ObjCmdProc TestregexpCmd;
-static Tcl_ObjCmdProc TestreturnCmd;
+static Tcl_ObjCmdProc2 TestexithandlerCmd;
+static Tcl_ObjCmdProc2 TestexprlongCmd;
+static Tcl_ObjCmdProc2 TestexprlongobjCmd;
+static Tcl_ObjCmdProc2 TestexprdoubleCmd;
+static Tcl_ObjCmdProc2 TestexprdoubleobjCmd;
+static Tcl_ObjCmdProc2 TestexprparserCmd;
+static Tcl_ObjCmdProc2 TestexprstringCmd;
+static Tcl_ObjCmdProc2 TestfileCmd;
+static Tcl_ObjCmdProc2 TestfilelinkCmd;
+static Tcl_ObjCmdProc2 TestfeventCmd;
+static Tcl_ObjCmdProc2 TestgetassocdataCmd;
+static Tcl_ObjCmdProc2 TestgetintCmd;
+static Tcl_ObjCmdProc2 TestlongsizeCmd;
+static Tcl_ObjCmdProc2 TestgetplatformCmd;
+static Tcl_ObjCmdProc2 TestgetvarfullnameCmd;
+static Tcl_ObjCmdProc2 TestinterpdeleteCmd;
+static Tcl_ObjCmdProc2 TestlinkCmd;
+static Tcl_ObjCmdProc2 TestlinkarrayCmd;
+static Tcl_ObjCmdProc2 TestlistrepCmd;
+static Tcl_ObjCmdProc2 TestlocaleCmd;
+static Tcl_ObjCmdProc2 TestmainthreadCmd;
+static Tcl_ObjCmdProc2 TestsetmainloopCmd;
+static Tcl_ObjCmdProc2 TestexitmainloopCmd;
+static Tcl_ObjCmdProc2 TestpanicCmd;
+static Tcl_ObjCmdProc2 TestparseargsCmd;
+static Tcl_ObjCmdProc2 TestparserCmd;
+static Tcl_ObjCmdProc2 TestparsevarCmd;
+static Tcl_ObjCmdProc2 TestparsevarnameCmd;
+static Tcl_ObjCmdProc2 TestpreferstableCmd;
+static Tcl_ObjCmdProc2 TestprintCmd;
+static Tcl_ObjCmdProc2 TestregexpCmd;
+static Tcl_ObjCmdProc2 TestreturnCmd;
static void TestregexpXflags(const char *string,
size_t length, int *cflagsPtr, int *eflagsPtr);
-static Tcl_ObjCmdProc TestsetassocdataCmd;
-static Tcl_ObjCmdProc TestsetCmd;
-static Tcl_ObjCmdProc Testset2Cmd;
-static Tcl_ObjCmdProc TestseterrorcodeCmd;
-static Tcl_ObjCmdProc TestsetobjerrorcodeCmd;
-static Tcl_ObjCmdProc TestsetplatformCmd;
-static Tcl_ObjCmdProc TestSizeCmd;
-static Tcl_ObjCmdProc TeststaticlibraryCmd;
-static Tcl_ObjCmdProc TesttranslatefilenameCmd;
-static Tcl_ObjCmdProc TestfstildeexpandCmd;
-static Tcl_ObjCmdProc TestupvarCmd;
+static Tcl_ObjCmdProc2 TestsetassocdataCmd;
+static Tcl_ObjCmdProc2 TestsetCmd;
+static Tcl_ObjCmdProc2 Testset2Cmd;
+static Tcl_ObjCmdProc2 TestseterrorcodeCmd;
+static Tcl_ObjCmdProc2 TestsetobjerrorcodeCmd;
+static Tcl_ObjCmdProc2 TestsetplatformCmd;
+static Tcl_ObjCmdProc2 TestSizeCmd;
+static Tcl_ObjCmdProc2 TeststaticlibraryCmd;
+static Tcl_ObjCmdProc2 TesttranslatefilenameCmd;
+static Tcl_ObjCmdProc2 TestfstildeexpandCmd;
+static Tcl_ObjCmdProc2 TestupvarCmd;
static Tcl_ObjCmdProc2 TestWrongNumArgsCmd;
-static Tcl_ObjCmdProc TestGetIndexFromObjStructCmd;
-static Tcl_ObjCmdProc TestChannelCmd;
-static Tcl_ObjCmdProc TestChannelEventCmd;
-static Tcl_ObjCmdProc TestSocketCmd;
-static Tcl_ObjCmdProc TestFilesystemCmd;
-static Tcl_ObjCmdProc TestSimpleFilesystemCmd;
+static Tcl_ObjCmdProc2 TestGetIndexFromObjStructCmd;
+static Tcl_ObjCmdProc2 TestChannelCmd;
+static Tcl_ObjCmdProc2 TestChannelEventCmd;
+static Tcl_ObjCmdProc2 TestSocketCmd;
+static Tcl_ObjCmdProc2 TestFilesystemCmd;
+static Tcl_ObjCmdProc2 TestSimpleFilesystemCmd;
static void TestReport(const char *cmd, Tcl_Obj *arg1,
Tcl_Obj *arg2);
static Tcl_Obj * TestReportGetNativePath(Tcl_Obj *pathPtr);
static Tcl_FSStatProc TestReportStat;
static Tcl_FSAccessProc TestReportAccess;
@@ -306,35 +305,35 @@
static Tcl_FSUtimeProc TestReportUtime;
static Tcl_FSNormalizePathProc TestReportNormalizePath;
static Tcl_FSPathInFilesystemProc TestReportInFilesystem;
static Tcl_FSFreeInternalRepProc TestReportFreeInternalRep;
static Tcl_FSDupInternalRepProc TestReportDupInternalRep;
-static Tcl_ObjCmdProc TestServiceModeCmd;
+static Tcl_ObjCmdProc2 TestServiceModeCmd;
static Tcl_FSStatProc SimpleStat;
static Tcl_FSAccessProc SimpleAccess;
static Tcl_FSOpenFileChannelProc SimpleOpenFileChannel;
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 TestGetUniCharCmd;
-static Tcl_ObjCmdProc TestFindFirstCmd;
-static Tcl_ObjCmdProc TestFindLastCmd;
-static Tcl_ObjCmdProc TestHashSystemHashCmd;
-static Tcl_ObjCmdProc TestGetIntForIndexCmd;
-static Tcl_ObjCmdProc TestLutilCmd;
+static Tcl_ObjCmdProc2 TestUtfNextCmd;
+static Tcl_ObjCmdProc2 TestUtfPrevCmd;
+static Tcl_ObjCmdProc2 TestNumUtfCharsCmd;
+static Tcl_ObjCmdProc2 TestGetUniCharCmd;
+static Tcl_ObjCmdProc2 TestFindFirstCmd;
+static Tcl_ObjCmdProc2 TestFindLastCmd;
+static Tcl_ObjCmdProc2 TestHashSystemHashCmd;
+static Tcl_ObjCmdProc2 TestGetIntForIndexCmd;
+static Tcl_ObjCmdProc2 TestLutilCmd;
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 TestApplyLambdaCmd;
+static Tcl_ObjCmdProc2 TestApplyLambdaCmd;
static const Tcl_Filesystem testReportingFilesystem = {
"reporting",
sizeof(Tcl_Filesystem),
TCL_FILESYSTEM_VERSION_1,
@@ -527,192 +526,189 @@
if (Tcl_OOInitStubs(interp) == NULL) {
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
+#if 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;
}
/*
* Create additional commands and math functions for testing Tcl.
*/
- Tcl_CreateObjCommand(interp, "gettimes", GetTimesCmd, NULL, NULL);
- Tcl_CreateCommand(interp, "noop", NoopCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "noop", NoopObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testpurebytesobj", TestpurebytesobjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetbytearraylength", TestsetbytearraylengthCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testbytestring", TestbytestringCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "teststringbytes", TeststringbytesCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "gettimes", GetTimesCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "noop", NoopCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "noop", NoopObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testpurebytesobj", TestpurebytesobjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsetbytearraylength", TestsetbytearraylengthCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testbytestring", TestbytestringCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "teststringbytes", TeststringbytesCmd, NULL, NULL);
Tcl_CreateObjCommand2(interp, "testwrongnumargs", TestWrongNumArgsCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfilesystem", TestFilesystemCmd,
+ Tcl_CreateObjCommand2(interp, "testfilesystem", TestFilesystemCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsimplefilesystem", TestSimpleFilesystemCmd,
+ Tcl_CreateObjCommand2(interp, "testsimplefilesystem", TestSimpleFilesystemCmd,
NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetindexfromobjstruct",
+ Tcl_CreateObjCommand2(interp, "testgetindexfromobjstruct",
TestGetIndexFromObjStructCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testasync", TestasyncCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testbumpinterpepoch",
+ Tcl_CreateObjCommand2(interp, "testasync", TestasyncCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testbumpinterpepoch",
TestbumpinterpepochCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testchannel", TestChannelCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testchannelevent", TestChannelEventCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testcmdtoken", TestcmdtokenCmd, NULL,
- NULL);
- Tcl_CreateObjCommand2(interp, "testcmdobj2", Testcmdobj2Cmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testcmdinfo", TestcmdinfoCmd, NULL,
- NULL);
- Tcl_CreateObjCommand(interp, "testcmdtrace", TestcmdtraceCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testconcatobj", TestconcatobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testcreatecommand", TestcreatecommandCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testdcall", TestdcallCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testdel", TestdelCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testdelassocdata", TestdelassocdataCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testdoubledigits", TestdoubledigitsCmd,
+ Tcl_CreateObjCommand2(interp, "testchannel", TestChannelCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testchannelevent", TestChannelEventCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testcmdtoken", TestcmdtokenCmd, NULL,
+ NULL);
+ Tcl_CreateObjCommand2(interp, "testcmdinfo", TestcmdinfoCmd, NULL,
+ NULL);
+ Tcl_CreateObjCommand2(interp, "testcmdtrace", TestcmdtraceCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testconcatobj", TestconcatobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testcreatecommand", TestcreatecommandCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testdcall", TestdcallCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testdel", TestdelCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testdelassocdata", TestdelassocdataCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testdoubledigits", TestdoubledigitsCmd,
NULL, NULL);
Tcl_DStringInit(&dstring);
- Tcl_CreateObjCommand(interp, "testdstring", TestdstringCmd, NULL,
- NULL);
- Tcl_CreateObjCommand(interp, "testencoding", TestencodingCmd, NULL,
- NULL);
- Tcl_CreateObjCommand(interp, "testevalex", TestevalexCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testevalobjv", TestevalobjvCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testevent", TesteventCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexithandler", TestexithandlerCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprlong", TestexprlongCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprlongobj", TestexprlongobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprdouble", TestexprdoubleCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprdoubleobj", TestexprdoubleobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprparser", TestexprparserCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexprstring", TestexprstringCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfevent", TestfeventCmd, NULL,
- NULL);
- Tcl_CreateObjCommand(interp, "testfilelink", TestfilelinkCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfile", TestfileCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testhashsystemhash",
- TestHashSystemHashCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetassocdata", TestgetassocdataCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetint", TestgetintCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testlongsize", TestlongsizeCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetplatform", TestgetplatformCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetvarfullname",
+ Tcl_CreateObjCommand2(interp, "testdstring", TestdstringCmd, NULL,
+ NULL);
+ Tcl_CreateObjCommand2(interp, "testencoding", TestencodingCmd, NULL,
+ NULL);
+ Tcl_CreateObjCommand2(interp, "testevalex", TestevalexCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testevalobjv", TestevalobjvCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testevent", TesteventCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexithandler", TestexithandlerCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexprlong", TestexprlongCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexprlongobj", TestexprlongobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexprdouble", TestexprdoubleCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexprdoubleobj", TestexprdoubleobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexprparser", TestexprparserCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testexprstring", TestexprstringCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfevent", TestfeventCmd, NULL,
+ NULL);
+ Tcl_CreateObjCommand2(interp, "testfilelink", TestfilelinkCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfile", TestfileCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testhashsystemhash",
+ TestHashSystemHashCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testgetassocdata", TestgetassocdataCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testgetint", TestgetintCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlongsize", TestlongsizeCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testgetplatform", TestgetplatformCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testgetvarfullname",
TestgetvarfullnameCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testinterpdelete", TestinterpdeleteCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(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,
- NULL);
- Tcl_CreateObjCommand(interp, "testpanic", TestpanicCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testparseargs", TestparseargsCmd,NULL,NULL);
- Tcl_CreateObjCommand(interp, "testparser", TestparserCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testparsevar", TestparsevarCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testparsevarname", TestparsevarnameCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testpreferstable", TestpreferstableCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testprint", TestprintCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testregexp", TestregexpCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testreturn", TestreturnCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testservicemode", TestServiceModeCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetassocdata", TestsetassocdataCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetnoerr", TestsetCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testseterr", TestsetCmd,
- INT2PTR(TCL_LEAVE_ERR_MSG), NULL);
- Tcl_CreateObjCommand(interp, "testset2", Testset2Cmd,
- INT2PTR(TCL_LEAVE_ERR_MSG), NULL);
- Tcl_CreateObjCommand(interp, "testseterrorcode", TestseterrorcodeCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetobjerrorcode",
- TestsetobjerrorcodeCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testutfnext",
- TestUtfNextCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testutfprev",
- TestUtfPrevCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testnumutfchars",
- TestNumUtfCharsCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetunichar",
- TestGetUniCharCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfindfirst",
- TestFindFirstCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfindlast",
- TestFindLastCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgetintforindex",
- TestGetIntForIndexCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsetplatform", TestsetplatformCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsize", TestSizeCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testsocket", TestSocketCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "teststaticlibrary", TeststaticlibraryCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testtranslatefilename",
- TesttranslatefilenameCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfstildeexpand",
- TestfstildeexpandCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testupvar", TestupvarCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testmainthread", TestmainthreadCmd, NULL,
- NULL);
- Tcl_CreateObjCommand(interp, "testsetmainloop", TestsetmainloopCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testexitmainloop", TestexitmainloopCmd,
+ Tcl_CreateObjCommand2(interp, "testinterpdelete", TestinterpdeleteCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlink", TestlinkCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlinkarray", TestlinkarrayCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlistrep", TestlistrepCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlocale", TestlocaleCmd, NULL,
+ NULL);
+ Tcl_CreateObjCommand2(interp, "testpanic", TestpanicCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testparseargs", TestparseargsCmd,NULL,NULL);
+ Tcl_CreateObjCommand2(interp, "testparser", TestparserCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testparsevar", TestparsevarCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testparsevarname", TestparsevarnameCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testpreferstable", TestpreferstableCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testprint", TestprintCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testregexp", TestregexpCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testreturn", TestreturnCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testservicemode", TestServiceModeCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsetassocdata", TestsetassocdataCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsetnoerr", TestsetCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testseterr", TestsetCmd,
+ INT2PTR(TCL_LEAVE_ERR_MSG), NULL);
+ Tcl_CreateObjCommand2(interp, "testset2", Testset2Cmd,
+ INT2PTR(TCL_LEAVE_ERR_MSG), NULL);
+ Tcl_CreateObjCommand2(interp, "testseterrorcode", TestseterrorcodeCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsetobjerrorcode",
+ TestsetobjerrorcodeCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testutfnext",
+ TestUtfNextCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testutfprev",
+ TestUtfPrevCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testnumutfchars",
+ TestNumUtfCharsCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testgetunichar",
+ TestGetUniCharCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfindfirst",
+ TestFindFirstCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfindlast",
+ TestFindLastCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testgetintforindex",
+ TestGetIntForIndexCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsetplatform", TestsetplatformCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsize", TestSizeCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testsocket", TestSocketCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "teststaticlibrary", TeststaticlibraryCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testtranslatefilename",
+ TesttranslatefilenameCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfstildeexpand",
+ TestfstildeexpandCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testupvar", TestupvarCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testmainthread", TestmainthreadCmd, NULL,
+ NULL);
+ Tcl_CreateObjCommand2(interp, "testsetmainloop", TestsetmainloopCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(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,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testnrelevels", TestNRELevels,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testinterpresolver", TestInterpResolverCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testapplylambda", TestApplyLambdaCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testlutil", TestLutilCmd,
+ Tcl_CreateObjCommand2(interp, "testnreunwind", TestNREUnwind,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testnrelevels", TestNRELevels,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testinterpresolver", TestInterpResolverCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testapplylambda", TestApplyLambdaCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlutil", TestLutilCmd,
NULL, NULL);
if (TclObjTest_Init(interp) != TCL_OK) {
return TCL_ERROR;
}
@@ -796,18 +792,17 @@
if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
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
+#if 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;
}
return Procbodytest_SafeInit(interp);
@@ -832,11 +827,11 @@
static int
TestasyncCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
TestAsyncHandler *asyncPtr, *prevPtr;
int id, code;
static int nextId = 1;
@@ -1033,11 +1028,11 @@
static int
TestbumpinterpepochCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *)interp;
if (objc != 1) {
@@ -1046,44 +1041,10 @@
}
iPtr->compileEpoch++;
return TCL_OK;
}
-/*
- *----------------------------------------------------------------------
- *
- * Testcmdobj2 --
- *
- * Mock up to test the Tcl_CreateObjCommand2 functionality
- *
- * Results:
- * Standard Tcl result.
- *
- * Side effects:
- * Sets interpreter result to number of arguments, first arg, last arg.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-Testcmdobj2Cmd(
- TCL_UNUSED(void *),
- Tcl_Interp *interp, /* Current interpreter. */
- Tcl_Size objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
-{
- Tcl_Obj *resultObj;
- resultObj = Tcl_NewListObj(0, NULL);
- Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewWideIntObj(objc));
- if (objc > 1) {
- Tcl_ListObjAppendElement(interp, resultObj, objv[1]);
- Tcl_ListObjAppendElement(interp, resultObj, objv[objc-1]);
- }
- Tcl_SetObjResult(interp, resultObj);
- return TCL_OK;
-}
-
/*
*----------------------------------------------------------------------
*
* TestcmdinfoCmd --
*
@@ -1102,23 +1063,21 @@
static int
TestcmdinfoCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const subcmds[] = {
- "call", "call2", "create", "delete", "get", "modify", NULL
+ "create", "delete", "get", "modify", NULL
};
enum options {
- CMDINFO_CALL, CMDINFO_CALL2, CMDINFO_CREATE,
+ CMDINFO_CREATE,
CMDINFO_DELETE, CMDINFO_GET, CMDINFO_MODIFY
} idx;
Tcl_CmdInfo info;
- Tcl_Obj **cmdObjv;
- Tcl_Size cmdObjc;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "command arg");
return TCL_ERROR;
}
@@ -1125,35 +1084,12 @@
if (Tcl_GetIndexFromObj(interp, objv[1], subcmds, "option", 0,
&idx) != TCL_OK) {
return TCL_ERROR;
}
switch (idx) {
- case CMDINFO_CALL:
- case CMDINFO_CALL2:
- if (Tcl_ListObjGetElements(interp, objv[2], &cmdObjc, &cmdObjv) != TCL_OK) {
- return TCL_ERROR;
- }
- if (cmdObjc == 0) {
- Tcl_AppendResult(interp, "No command name given", NULL);
- return TCL_ERROR;
- }
- if (Tcl_GetCommandInfo(interp, Tcl_GetString(cmdObjv[0]), &info) == 0) {
- return TCL_ERROR;
- }
- if (idx == CMDINFO_CALL) {
- /*
- * Note when calling through the old 32-bit API, it is the caller's
- * responsibility to check that number of arguments is <= INT_MAX.
- * We do not do that here just so we can test what happens if the
- * caller mistakenly passes more arguments.
- */
- return info.objProc(info.objClientData, interp, cmdObjc, cmdObjv);
- } else {
- return info.objProc2(info.objClientData2, interp, cmdObjc, cmdObjv);
- }
case CMDINFO_CREATE:
- Tcl_CreateCommand(interp, Tcl_GetString(objv[2]), CmdProc1,
+ Tcl_CreateObjCommand2(interp, Tcl_GetString(objv[2]), CmdProc1,
(void *)"original", CmdDelProc1);
break;
case CMDINFO_DELETE:
Tcl_DStringInit(&delString);
Tcl_DeleteCommand(interp, Tcl_GetString(objv[2]));
@@ -1162,13 +1098,13 @@
case CMDINFO_GET:
if (Tcl_GetCommandInfo(interp, Tcl_GetString(objv[2]), &info) ==0) {
Tcl_AppendResult(interp, "??", (char *)NULL);
return TCL_OK;
}
- if (info.proc == CmdProc1) {
+ if (info.objProc2 == CmdProc1) {
Tcl_AppendResult(interp, "CmdProc1", " ",
- (char *)info.clientData, (char *)NULL);
+ (char *)info.objClientData2, (char *)NULL);
} else if (info.proc == CmdProc2) {
Tcl_AppendResult(interp, "CmdProc2", " ",
(char *)info.clientData, (char *)NULL);
} else {
Tcl_AppendResult(interp, "unknown", (char *)NULL);
@@ -1218,11 +1154,11 @@
static int
CmdProc0(
void *clientData, /* String to return. */
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
TestCommandTokenRef *refPtr = (TestCommandTokenRef *) clientData;
Tcl_AppendResult(interp, "CmdProc1 ", refPtr->value, (char *)NULL);
return TCL_OK;
@@ -1230,12 +1166,12 @@
static int
CmdProc1(
void *clientData, /* String to return. */
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*argc*/,
- TCL_UNUSED(const char **) /*argv*/)
+ TCL_UNUSED(Tcl_Size) /*argc*/,
+ TCL_UNUSED(Tcl_Obj *const *) /*argv*/)
{
Tcl_AppendResult(interp, "CmdProc1 ", (char *)clientData, (char *)NULL);
return TCL_OK;
}
@@ -1309,11 +1245,11 @@
static int
TestcmdtokenCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
TestCommandTokenRef *refPtr;
int id;
char buf[30];
@@ -1322,11 +1258,11 @@
Tcl_WrongNumArgs(interp, 1, objv, "option arg");
return TCL_ERROR;
}
if (strcmp(Tcl_GetString(objv[1]), "create") == 0) {
refPtr = (TestCommandTokenRef *)Tcl_Alloc(sizeof(TestCommandTokenRef));
- refPtr->token = Tcl_CreateObjCommand(interp, Tcl_GetString(objv[2]), CmdProc0,
+ refPtr->token = Tcl_CreateObjCommand2(interp, Tcl_GetString(objv[2]), CmdProc0,
refPtr, CmdDelProc0);
refPtr->id = nextCommandTokenRefId;
refPtr->value = "original";
nextCommandTokenRefId++;
refPtr->nextPtr = firstCommandTokenRef;
@@ -1393,11 +1329,11 @@
static int
TestcmdtraceCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_DString buffer;
int result;
@@ -1406,11 +1342,11 @@
return TCL_ERROR;
}
if (strcmp(Tcl_GetString(objv[1]), "tracetest") == 0) {
Tcl_DStringInit(&buffer);
- cmdTrace = Tcl_CreateObjTrace(interp, 50000, 0, CmdTraceProc, &buffer, NULL);
+ cmdTrace = Tcl_CreateObjTrace2(interp, 50000, 0, CmdTraceProc, &buffer, NULL);
result = Tcl_EvalEx(interp, Tcl_GetString(objv[2]), TCL_INDEX_NONE, 0);
if (result == TCL_OK) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), (char *)NULL);
}
@@ -1422,16 +1358,16 @@
* called. Note that this trace procedure removes itself as a further
* check of the robustness of the trace proc calling code in
* TclNRExecuteByteCode.
*/
- cmdTrace = Tcl_CreateObjTrace(interp, 50000, 0, CmdTraceDeleteProc, NULL, NULL);
+ cmdTrace = Tcl_CreateObjTrace2(interp, 50000, 0, CmdTraceDeleteProc, NULL, NULL);
Tcl_EvalEx(interp, Tcl_GetString(objv[2]), TCL_INDEX_NONE, 0);
} else if (strcmp(Tcl_GetString(objv[1]), "leveltest") == 0) {
Interp *iPtr = (Interp *) interp;
Tcl_DStringInit(&buffer);
- cmdTrace = Tcl_CreateObjTrace(interp, iPtr->numLevels + 4, 0, CmdTraceProc,
+ cmdTrace = Tcl_CreateObjTrace2(interp, iPtr->numLevels + 4, 0, CmdTraceProc,
&buffer, NULL);
result = Tcl_EvalEx(interp, Tcl_GetString(objv[2]), TCL_INDEX_NONE, 0);
if (result == TCL_OK) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), (char *)NULL);
@@ -1444,11 +1380,11 @@
*/
static int deleteCalled;
deleteCalled = 0;
- cmdTrace = Tcl_CreateObjTrace(interp, 50000,
+ cmdTrace = Tcl_CreateObjTrace2(interp, 50000,
TCL_ALLOW_INLINE_COMPILATION, TraceProc,
&deleteCalled, ObjTraceDeleteProc);
result = Tcl_EvalEx(interp, Tcl_GetString(objv[2]), TCL_INDEX_NONE, 0);
Tcl_DeleteTrace(interp, cmdTrace);
if (!deleteCalled) {
@@ -1459,12 +1395,12 @@
}
} else if (strcmp(Tcl_GetString(objv[1]), "doubletest") == 0) {
Tcl_Trace t1, t2;
Tcl_DStringInit(&buffer);
- t1 = Tcl_CreateObjTrace(interp, 1, 0, CmdTraceProc, &buffer, NULL);
- t2 = Tcl_CreateObjTrace(interp, 50000, 0, CmdTraceProc, &buffer, NULL);
+ t1 = Tcl_CreateObjTrace2(interp, 1, 0, CmdTraceProc, &buffer, NULL);
+ t2 = Tcl_CreateObjTrace2(interp, 50000, 0, CmdTraceProc, &buffer, NULL);
result = Tcl_EvalEx(interp, Tcl_GetString(objv[2]), TCL_INDEX_NONE, 0);
if (result == TCL_OK) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, Tcl_DStringValue(&buffer), (char *)NULL);
}
@@ -1483,19 +1419,19 @@
CmdTraceProc(
void *clientData, /* Pointer to buffer in which the
* command and arguments are appended.
* Accumulates test result. */
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*level*/,
+ TCL_UNUSED(Tcl_Size) /*level*/,
const char *command, /* The command being traced (after
* substitutions). */
TCL_UNUSED(Tcl_Command) /*cmdProc*/,
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
Tcl_DString *bufPtr = (Tcl_DString *) clientData;
- int i;
+ Tcl_Size i;
Tcl_DStringAppendElement(bufPtr, command);
Tcl_DStringStartSublist(bufPtr);
for (i = 0; i < objc; i++) {
@@ -1507,14 +1443,14 @@
static int
CmdTraceDeleteProc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*level*/,
+ TCL_UNUSED(Tcl_Size) /*level*/,
TCL_UNUSED(const char *) /*command*/,
TCL_UNUSED(Tcl_Command),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
/*
* Remove ourselves to test whether calling Tcl_DeleteTrace within a trace
* callback causes the for loop in TclNRExecuteByteCode that calls traces to
@@ -1527,14 +1463,14 @@
static int
TraceProc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- TCL_UNUSED(int) /*level*/,
+ TCL_UNUSED(Tcl_Size) /*level*/,
const char *command,
TCL_UNUSED(Tcl_Command),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *word = Tcl_GetString(objv[0]);
if (!strcmp(word, "Error")) {
@@ -1584,24 +1520,24 @@
static int
TestcreatecommandCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option");
return TCL_ERROR;
}
if (strcmp(Tcl_GetString(objv[1]), "create") == 0) {
- Tcl_CreateObjCommand(interp, "test_ns_basic::createdcommand",
+ Tcl_CreateObjCommand2(interp, "test_ns_basic::createdcommand",
CreatedCommandProc, NULL, NULL);
} else if (strcmp(Tcl_GetString(objv[1]), "delete") == 0) {
Tcl_DeleteCommand(interp, "test_ns_basic::createdcommand");
} else if (strcmp(Tcl_GetString(objv[1]), "create2") == 0) {
- Tcl_CreateObjCommand(interp, "value:at:",
+ Tcl_CreateObjCommand2(interp, "value:at:",
CreatedCommandProc2, NULL, NULL);
} else if (strcmp(Tcl_GetString(objv[1]), "delete2") == 0) {
Tcl_DeleteCommand(interp, "value:at:");
} else {
Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
@@ -1613,11 +1549,11 @@
static int
CreatedCommandProc(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
Tcl_CmdInfo info;
int found;
@@ -1635,11 +1571,11 @@
static int
CreatedCommandProc2(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
Tcl_CmdInfo info;
int found;
@@ -1673,14 +1609,14 @@
static int
TestdcallCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
- int i;
+ Tcl_Size i;
int id;
delInterp = Tcl_CreateInterp();
Tcl_DStringInit(&delString);
for (i = 1; i < objc; i++) {
@@ -1738,11 +1674,11 @@
static int
TestdelCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
DelCmd *dPtr;
Tcl_Interp *child;
@@ -1759,20 +1695,20 @@
dPtr = (DelCmd *)Tcl_Alloc(sizeof(DelCmd));
dPtr->interp = interp;
dPtr->deleteCmd = (char *)Tcl_Alloc(strlen(Tcl_GetString(objv[3])) + 1);
strcpy(dPtr->deleteCmd, Tcl_GetString(objv[3]));
- Tcl_CreateObjCommand(child, Tcl_GetString(objv[2]), DelCmdProc, dPtr,
+ Tcl_CreateObjCommand2(child, Tcl_GetString(objv[2]), DelCmdProc, dPtr,
DelDeleteProc);
return TCL_OK;
}
static int
DelCmdProc(
void *clientData, /* String result to return. */
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objv*/,
+ TCL_UNUSED(Tcl_Size) /*objv*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
DelCmd *dPtr = (DelCmd *) clientData;
Tcl_AppendResult(interp, dPtr->deleteCmd, (char *)NULL);
@@ -1813,11 +1749,11 @@
static int
TestdelassocdataCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "data_key");
return TCL_ERROR;
@@ -1849,11 +1785,11 @@
static int
TestdoubledigitsCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj* const objv[]) /* Parameter vector */
{
static const char *options[] = {
"shortest",
"e",
@@ -1936,11 +1872,11 @@
static int
TestdstringCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
int count;
if (objc < 2) {
@@ -2089,11 +2025,11 @@
UtfTransformFn(Tcl_Interp *interp, Tcl_Encoding encoding, const char *src,
Tcl_Size srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
Tcl_Size dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
static int UtfExtWrapper(
- Tcl_Interp *interp, UtfTransformFn *transformer, int objc, Tcl_Obj *const objv[])
+ Tcl_Interp *interp, UtfTransformFn *transformer, Tcl_Size objc, Tcl_Obj *const objv[])
{
Tcl_Encoding encoding;
Tcl_EncodingState encState, *encStatePtr;
Tcl_Size srcLen, bufLen;
const unsigned char *bytes;
@@ -2287,11 +2223,11 @@
static int
TestencodingCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Encoding encoding;
Tcl_Size length;
const char *string;
@@ -2472,11 +2408,11 @@
static int
TestevalexCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int flags;
Tcl_Size length;
const char *script;
@@ -2518,11 +2454,11 @@
static int
TestevalobjvCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int evalGlobal;
if (objc < 3) {
@@ -2567,11 +2503,11 @@
static int
TesteventCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter vector */
{
static const char *const subcommands[] = { /* Possible subcommands */
"queue", "delete", NULL
};
@@ -2746,11 +2682,11 @@
static int
TestexithandlerCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
int value;
if (objc != 3) {
@@ -2821,11 +2757,11 @@
static int
TestexprlongCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
long exprResult;
char buf[4 + TCL_INTEGER_SPACE];
int result;
@@ -2863,11 +2799,11 @@
static int
TestexprlongobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument objects. */
{
long exprResult;
char buf[4 + TCL_INTEGER_SPACE];
int result;
@@ -2905,11 +2841,11 @@
static int
TestexprdoubleCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
double exprResult;
char buf[4 + TCL_DOUBLE_SPACE];
int result;
@@ -2948,11 +2884,11 @@
static int
TestexprdoubleobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument objects. */
{
double exprResult;
char buf[4 + TCL_DOUBLE_SPACE];
int result;
@@ -2990,11 +2926,11 @@
static int
TestexprstringCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "expression");
return TCL_ERROR;
@@ -3021,11 +2957,11 @@
static int
TestfilelinkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Obj *contents;
if (objc < 2 || objc > 3) {
@@ -3088,11 +3024,11 @@
static int
TestgetassocdataCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
char *res;
if (objc != 2) {
@@ -3125,11 +3061,11 @@
static int
TestgetplatformCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
static const char *const platformStrings[] = { "unix", "mac", "windows" };
TclPlatformType *platform;
@@ -3164,11 +3100,11 @@
static int
TestinterpdeleteCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
Tcl_Interp *childToDelete;
if (objc != 2) {
@@ -3203,11 +3139,11 @@
static int
TestlinkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
static int intVar = 43;
static int boolVar = 4;
static double realVar = 1.23;
@@ -3664,11 +3600,11 @@
static int
TestlinkarrayCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *LinkOption[] = {
"update", "remove", "create", NULL
};
@@ -3684,11 +3620,12 @@
TCL_LINK_LONG, TCL_LINK_ULONG, TCL_LINK_WIDE_INT, TCL_LINK_WIDE_UINT,
TCL_LINK_FLOAT, TCL_LINK_DOUBLE, TCL_LINK_STRING, TCL_LINK_CHARS,
TCL_LINK_BINARY
};
int typeIndex, readonly, size;
- Tcl_Size i, length;
+ Tcl_Size i;
+ Tcl_Size length;
char *name, *arg;
Tcl_WideInt addr;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option args");
@@ -3783,11 +3720,11 @@
static int
TestlistrepCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/* Subcommands supported by this command */
static const char *const subcommands[] = {
"new",
@@ -3937,11 +3874,11 @@
static int
TestlocaleCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
int index;
const char *locale;
static const char *const optionStrings[] = {
@@ -4023,11 +3960,11 @@
static int
TestparserCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
Tcl_Size dummy;
int length;
@@ -4080,11 +4017,11 @@
static int
TestexprparserCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
Tcl_Size dummy;
int length;
@@ -4229,11 +4166,11 @@
static int
TestparsevarCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *value, *name, *termPtr;
if (objc != 2) {
@@ -4270,11 +4207,11 @@
static int
TestparsevarnameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
int length, append;
Tcl_Size dummy;
@@ -4334,11 +4271,11 @@
static int
TestpreferstableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
Interp *iPtr = (Interp *) interp;
iPtr->packagePrefer = PKG_PREFER_STABLE;
@@ -4364,11 +4301,11 @@
static int
TestprintCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_WideInt argv1 = 0;
size_t argv2;
long argv3;
@@ -4406,15 +4343,16 @@
static int
TestregexpCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int indices, match, about;
- Tcl_Size stringLength, i, ii;
+ Tcl_Size i;
+ Tcl_Size stringLength, ii;
int hasxflags, cflags, eflags;
Tcl_RegExp regExpr;
const char *string;
Tcl_Obj *objPtr;
Tcl_RegExpInfo info;
@@ -4566,11 +4504,11 @@
for (i = 0; i < objc; i++) {
Tcl_Size start, end;
Tcl_Obj *newPtr, *varPtr, *valuePtr;
varPtr = objv[i];
- ii = ((cflags®_EXPECT) && i == objc-1) ? TCL_INDEX_NONE : i;
+ ii = ((cflags®_EXPECT) && i == objc-1) ? TCL_INDEX_NONE : (Tcl_Size)i;
if (indices) {
Tcl_Obj *objs[2];
if (ii == TCL_INDEX_NONE) {
TclRegExpRangeUniChar(regExpr, ii, &start, &end);
@@ -4730,11 +4668,11 @@
static int
TestreturnCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
return TCL_RETURN;
}
@@ -4758,11 +4696,11 @@
static int
TestsetassocdataCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
char *buf, *oldData;
Tcl_InterpDeleteProc *procPtr;
@@ -4808,11 +4746,11 @@
static int
TestsetplatformCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
Tcl_Size length;
TclPlatformType *platform;
@@ -4838,11 +4776,11 @@
static int
TestSizeCmd(
TCL_UNUSED(void *), /* Unused */
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
if (objc != 2) {
goto syntax;
}
@@ -4867,21 +4805,21 @@
*
* Results:
* A standard Tcl result.
*
* Side effects:
- * When the package given by objv[1] is loaded into an interpreter,
+ * When the package given by Tcl_GetString(objv[1]) is loaded into an interpreter,
* variable "x" in that interpreter is set to "loaded".
*
*----------------------------------------------------------------------
*/
static int
TeststaticlibraryCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
int safe, loaded;
if (objc != 4) {
@@ -4927,11 +4865,11 @@
static int
TesttranslatefilenameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
Tcl_DString buffer;
const char *result;
@@ -4969,11 +4907,11 @@
static int
TestfstildeexpandCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_DString buffer;
if (objc != 2) {
@@ -5006,11 +4944,11 @@
static int
TestupvarCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
int flags = 0;
if ((objc != 5) && (objc != 6)) {
@@ -5057,11 +4995,11 @@
static int
TestseterrorcodeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
if (objc > 6) {
Tcl_AppendResult(interp, "too many args", (char *)NULL);
return TCL_ERROR;
@@ -5109,11 +5047,11 @@
static int
TestsetobjerrorcodeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_SetObjErrorCode(interp, Tcl_ConcatObj(objc - 1, objv + 1));
return TCL_ERROR;
}
@@ -5137,11 +5075,11 @@
static int
TestfeventCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
static Tcl_Interp *interp2 = NULL;
int code;
Tcl_Channel chan;
@@ -5207,11 +5145,11 @@
static int
TestpanicCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
/*
* Put the arguments into a var args structure
* Append all of the arguments together separated by spaces
@@ -5226,17 +5164,17 @@
static int
TestfileCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* The argument objects. */
{
int force, i, result;
Tcl_Obj *error = NULL;
const char *subcmd;
- int j;
+ Tcl_Size j;
if (objc < 3) {
return TCL_ERROR;
}
@@ -5309,11 +5247,11 @@
static int
TestgetvarfullnameCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *name, *arg;
int flags = 0;
Tcl_Namespace *namespacePtr;
@@ -5383,11 +5321,11 @@
static int
GetTimesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* The current interpreter. */
- TCL_UNUSED(int) /*cobjc*/,
+ TCL_UNUSED(Tcl_Size) /*cobjc*/,
TCL_UNUSED(Tcl_Obj *const *) /*cobjv*/)
{
Interp *iPtr = (Interp *) interp;
int i, n;
double timePer;
@@ -5562,12 +5500,12 @@
static int
NoopCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*argc*/,
- TCL_UNUSED(const char **) /*argv*/)
+ TCL_UNUSED(Tcl_Size) /*objc*/,
+ TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
return TCL_OK;
}
/*
@@ -5589,11 +5527,11 @@
static int
NoopObjCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
return TCL_OK;
}
@@ -5614,11 +5552,11 @@
static int
TeststringbytesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Size n;
const unsigned char *p;
@@ -5654,11 +5592,11 @@
static int
TestpurebytesobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
Tcl_Obj *objPtr;
if (objc > 2) {
@@ -5701,11 +5639,11 @@
static int
TestsetbytearraylengthCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
int n;
Tcl_Obj *obj = NULL;
@@ -5750,11 +5688,11 @@
static int
TestbytestringCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
struct {
#if !defined(TCL_NO_DEPRECATED)
int n; /* On purpose, not Tcl_Size, in order to demonstrate what happens */
@@ -5802,11 +5740,11 @@
static int
TestsetCmd(
void *data, /* Additional flags for Get/SetVar2. */
Tcl_Interp *interp,/* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
int flags = PTR2INT(data);
const char *value;
@@ -5833,11 +5771,11 @@
}
static int
Testset2Cmd(
void *data, /* Additional flags for Get/SetVar2. */
Tcl_Interp *interp,/* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
int flags = PTR2INT(data);
const char *value;
@@ -5882,11 +5820,11 @@
static int
TestmainthreadCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,/* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv)
{
if (objc == 1) {
Tcl_Obj *idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)Tcl_GetCurrentThread());
@@ -5943,11 +5881,11 @@
static int
TestsetmainloopCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
exitMainLoop = 0;
Tcl_SetMainLoop(MainLoop);
return TCL_OK;
@@ -5972,11 +5910,11 @@
static int
TestexitmainloopCmd(
TCL_UNUSED(void *),
TCL_UNUSED(Tcl_Interp *),
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
exitMainLoop = 1;
return TCL_OK;
}
@@ -6000,11 +5938,11 @@
static int
TestChannelCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Interpreter for result. */
- int objc, /* Count of additional args. */
+ Tcl_Size objc, /* Count of additional args. */
Tcl_Obj *const *objv) /* Additional args. */
{
const char *cmdName; /* Sub command. */
Tcl_HashTable *hTblPtr; /* Hash table of channels. */
Tcl_HashSearch hSearch; /* Search variable. */
@@ -6050,11 +5988,11 @@
chan = Tcl_GetChannel(interp, Tcl_GetString(objv[2]), &mode);
}
if (chan == (Tcl_Channel) NULL) {
return TCL_ERROR;
}
- chanPtr = (Channel *)chan;
+ chanPtr = (Channel *) chan;
statePtr = chanPtr->state;
chanPtr = statePtr->topChanPtr;
chan = (Tcl_Channel) chanPtr;
} else {
statePtr = NULL;
@@ -6373,11 +6311,11 @@
return TCL_OK;
}
for (hPtr = Tcl_FirstHashEntry(hTblPtr, &hSearch);
hPtr != NULL;
hPtr = Tcl_NextHashEntry(&hSearch)) {
- chanPtr = (Channel *)Tcl_GetHashValue(hPtr);
+ chanPtr = (Channel *) Tcl_GetHashValue(hPtr);
statePtr = chanPtr->state;
if (statePtr->flags & TCL_READABLE) {
Tcl_AppendElement(interp, (char *)Tcl_GetHashKey(hTblPtr, hPtr));
}
}
@@ -6430,11 +6368,11 @@
if (hTblPtr == NULL) {
return TCL_OK;
}
for (hPtr = Tcl_FirstHashEntry(hTblPtr, &hSearch);
hPtr != NULL; hPtr = Tcl_NextHashEntry(&hSearch)) {
- chanPtr = (Channel *)Tcl_GetHashValue(hPtr);
+ chanPtr = (Channel *) Tcl_GetHashValue(hPtr);
statePtr = chanPtr->state;
if (statePtr->flags & TCL_WRITABLE) {
Tcl_AppendElement(interp, (char *)Tcl_GetHashKey(hTblPtr, hPtr));
}
}
@@ -6496,11 +6434,11 @@
static int
TestChannelEventCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
Tcl_Obj *resultListPtr;
Channel *chanPtr;
ChannelState *statePtr; /* state info for channel */
@@ -6511,11 +6449,11 @@
if ((objc < 3) || (objc > 5)) {
Tcl_WrongNumArgs(interp, 1, objv, "channel cmd ?arg1? ?arg2?");
return TCL_ERROR;
}
- chanPtr = (Channel *)Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL);
+ chanPtr = (Channel *) Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL);
if (chanPtr == NULL) {
return TCL_ERROR;
}
statePtr = chanPtr->state;
@@ -6706,11 +6644,11 @@
static int
TestSocketCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Interpreter for result. */
- int objc, /* Count of additional args. */
+ Tcl_Size objc, /* Count of additional objc. */
Tcl_Obj *const *objv) /* Additional args. */
{
const char *cmdName; /* Sub command. */
Tcl_Size len; /* Length of subcommand string. */
@@ -6782,11 +6720,11 @@
static int
TestServiceModeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Arguments. */
{
int newmode, oldmode;
if (objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?newmode?");
@@ -6877,11 +6815,11 @@
static int
TestGetIndexFromObjStructCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *const ary[] = {
"a", "b", "c", "d", "ee", "ff", NULL, NULL
};
@@ -6939,11 +6877,11 @@
static int
TestFilesystemCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
int res, boolVal;
const char *msg;
@@ -7310,11 +7248,11 @@
static int
TestSimpleFilesystemCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
int res, boolVal;
const char *msg;
@@ -7472,11 +7410,11 @@
static int
TestUtfNextCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Size numBytes;
char *bytes;
const char *result, *first;
@@ -7533,11 +7471,11 @@
static int
TestUtfPrevCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Size numBytes, offset;
char *bytes;
const char *result;
@@ -7573,11 +7511,11 @@
static int
TestNumUtfCharsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc > 1) {
Tcl_Size numBytes, len, limit = TCL_INDEX_NONE;
const char *bytes = Tcl_GetStringFromObj(objv[1], &numBytes);
@@ -7605,11 +7543,11 @@
*/
static int
TestGetUniCharCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter */
- int objc, /* Number of arguments */
+ Tcl_Size objc,
Tcl_Obj *const objv[] /* Argument strings */
)
{
int index;
int c ;
@@ -7630,11 +7568,11 @@
static int
TestFindFirstCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc > 1) {
int len = -1;
@@ -7652,11 +7590,11 @@
static int
TestFindLastCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
if (objc > 1) {
int len = -1;
@@ -7670,11 +7608,11 @@
static int
TestGetIntForIndexCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Size result;
Tcl_WideInt endvalue;
@@ -7721,11 +7659,11 @@
static int
TestcpuidCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
int status, index, i;
int regs[4];
Tcl_Obj *regsObjs[4];
@@ -7757,11 +7695,11 @@
static int
TestHashSystemHashCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const Tcl_HashKeyType hkType = {
TCL_HASH_KEY_TYPE_VERSION, TCL_HASH_KEY_SYSTEM_HASH,
NULL, NULL, NULL, NULL
@@ -7833,19 +7771,19 @@
*/
static int
TestgetintCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?args?");
return TCL_ERROR;
} else {
int val, total=0;
- int i;
+ Tcl_Size i;
for (i=1 ; i 1) {
Tcl_WrongNumArgs(interp, 1, objv, "");
return TCL_ERROR;
@@ -7903,11 +7841,11 @@
static int
TestNREUnwind(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
/*
* Insure that callbacks effectively run at the proper level during the
* unwinding of the NRE stack.
@@ -7921,11 +7859,11 @@
static int
TestNRELevels(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
Interp *iPtr = (Interp *) interp;
static Tcl_Size *refDepth = NULL;
Tcl_Size depth;
@@ -7977,11 +7915,11 @@
static int
TestconcatobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *) /*objv*/)
{
Tcl_Obj *list1Ptr, *list2Ptr, *emptyPtr, *concatPtr, *tmpPtr;
int result = TCL_OK;
Tcl_Size len;
@@ -8294,11 +8232,11 @@
static int
TestparseargsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Arguments. */
{
static int foo = 0;
const char *media = NULL, *color = NULL;
Tcl_Size count = objc;
@@ -8538,11 +8476,11 @@
static int
TestInterpResolverCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const table[] = {
"down", "up", NULL
};
@@ -8600,11 +8538,11 @@
*------------------------------------------------------------------------
*/
int TestApplyLambdaCmd (
TCL_UNUSED(void*),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int), /* objc. */
+ TCL_UNUSED(Tcl_Size), /* objc. */
TCL_UNUSED(Tcl_Obj *const *)) /* objv. */
{
Tcl_Obj *lambdaObjs[2];
Tcl_Obj *evalObjs[2];
Tcl_Obj *lambdaObj;
@@ -8677,11 +8615,11 @@
static int
TestLutilCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Arguments. */
{
Tcl_Size nL1, nL2;
Tcl_Obj *l1Obj = NULL;
Tcl_Obj *l2Obj = NULL;
Index: generic/tclTestABSList.c
==================================================================
--- generic/tclTestABSList.c
+++ generic/tclTestABSList.c
@@ -666,11 +666,11 @@
*/
static Tcl_Obj *
my_NewLStringObj(
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj * const objv[])
{
LString *lstringRepPtr;
Tcl_ObjInternalRep itr;
size_t repSize;
@@ -920,11 +920,11 @@
static int
lLStringObjCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj * const objv[])
{
Tcl_Obj *lstringObj;
(void)clientData;
@@ -1134,11 +1134,11 @@
* Create a new lgen Tcl_Obj
*/
Tcl_Obj *
newLgenObj(
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj * const objv[])
{
Tcl_WideInt length;
LgenSeries *lGenSeriesRepPtr;
Tcl_Size repSize;
@@ -1185,11 +1185,11 @@
*/
static int
lGenObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj * const objv[])
{
Tcl_Obj *genObj = newLgenObj(interp, objc-1, &objv[1]);
if (genObj) {
Tcl_SetObjResult(interp, genObj);
@@ -1204,11 +1204,11 @@
*/
int Lgen_Init(Tcl_Interp *interp) {
if (Tcl_InitStubs(interp, "8.7", 0) == NULL) {
return TCL_ERROR;
}
- Tcl_CreateObjCommand(interp, "lgen", lGenObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "lgen", lGenObjCmd, NULL, NULL);
Tcl_PkgProvide(interp, "lgen", "1.0");
return TCL_OK;
}
@@ -1247,10 +1247,10 @@
int Tcl_ABSListTest_Init(Tcl_Interp *interp) {
if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) {
return TCL_ERROR;
}
- Tcl_CreateObjCommand(interp, "lstring", lLStringObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "lgen", lGenObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "lstring", lLStringObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "lgen", lGenObjCmd, NULL, NULL);
Tcl_PkgProvide(interp, "abstractlisttest", "1.0.0");
return TCL_OK;
}
Index: generic/tclTestObj.c
==================================================================
--- generic/tclTestObj.c
+++ generic/tclTestObj.c
@@ -35,19 +35,19 @@
static int CheckIfVarUnset(Tcl_Interp *interp, Tcl_Obj **varPtr, Tcl_Size varIndex);
static int GetVariableIndex(Tcl_Interp *interp,
Tcl_Obj *obj, Tcl_Size *indexPtr);
static void SetVarToObj(Tcl_Obj **varPtr, Tcl_Size 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_ObjCmdProc TestbigdataCmd;
+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;
+static Tcl_ObjCmdProc2 TestbigdataCmd;
#define VARPTR_KEY "TCLOBJTEST_VARPTR"
#define NUMBER_OF_OBJECT_VARS 20
static void
@@ -116,27 +116,27 @@
Tcl_SetAssocData(interp, VARPTR_KEY, VarPtrDeleteProc, varPtr);
for (i = 0; i < NUMBER_OF_OBJECT_VARS; i++) {
varPtr[i] = NULL;
}
- Tcl_CreateObjCommand(interp, "testbignumobj", TestbignumobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testbooleanobj", TestbooleanobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testdoubleobj", TestdoubleobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testintobj", TestintobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testindexobj", TestindexobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testlistobj", TestlistobjCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testobj", TestobjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "teststringobj", TeststringobjCmd,
+ Tcl_CreateObjCommand2(interp, "testbignumobj", TestbignumobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testbooleanobj", TestbooleanobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testdoubleobj", TestdoubleobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testintobj", TestintobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testindexobj", TestindexobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testlistobj", TestlistobjCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testobj", TestobjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "teststringobj", TeststringobjCmd,
NULL, NULL);
if (sizeof(Tcl_Size) == sizeof(Tcl_WideInt)) {
- Tcl_CreateObjCommand(interp, "testbigdata", TestbigdataCmd,
+ Tcl_CreateObjCommand2(interp, "testbigdata", TestbigdataCmd,
NULL, NULL);
}
return TCL_OK;
}
@@ -160,11 +160,11 @@
static int
TestbignumobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Argument count */
+ Tcl_Size objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
{
static const char *const subcmds[] = {
"set", "get", "mult10", "div10", "iseven", "radixsize", NULL
};
@@ -359,11 +359,11 @@
static int
TestbooleanobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size varIndex;
int boolValue;
const char *subCmd;
@@ -459,11 +459,11 @@
static int
TestdoubleobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size varIndex;
double doubleValue;
const char *subCmd;
@@ -575,14 +575,15 @@
static int
TestindexobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int allowAbbrev, index, setError, i, result;
+ int allowAbbrev, index, setError, result;
+ Tcl_Size i;
Tcl_Size index2;
const char **argv;
static const char *const tablePtr[] = {"a", "b", "check", NULL};
/*
@@ -665,11 +666,11 @@
static int
TestintobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size varIndex;
#if (INT_MAX != LONG_MAX) /* int is not the same size as long */
int i;
@@ -893,11 +894,11 @@
static int
TestlistobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Tcl interpreter */
- int objc, /* Number of arguments */
+ Tcl_Size objc, /* Number of arguments */
Tcl_Obj *const objv[]) /* Argument objects */
{
/* Subcommands supported by this command */
static const char* const subcommands[] = {
"set",
@@ -1092,11 +1093,11 @@
static int
TestobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Size varIndex, destIndex;
int i;
const Tcl_ObjType *targetType;
@@ -1312,16 +1313,16 @@
static int
TeststringobjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_UniChar *unicode;
- Tcl_Size size, varIndex;
- int option, i;
+ Tcl_Size size, varIndex, i;
+ int option;
Tcl_Size length;
#define MAX_STRINGS 11
const char *string, *strings[MAX_STRINGS+1];
String *strPtr;
Tcl_Obj **varPtr;
@@ -1609,11 +1610,11 @@
*/
static int
TestbigdataCmd (
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const subcmds[] = {
"string", "bytearray", "list", "dict", NULL
};
Index: generic/tclTestProcBodyObj.c
==================================================================
--- generic/tclTestProcBodyObj.c
+++ generic/tclTestProcBodyObj.c
@@ -37,20 +37,20 @@
* procs
*/
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;
/*
* Declarations for functions defined in this file.
*/
-static Tcl_ObjCmdProc ProcBodyTestProcCmd;
-static Tcl_ObjCmdProc ProcBodyTestCheckCmd;
+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);
/*
@@ -57,18 +57,18 @@
* List of commands to create when the package is loaded; must go after the
* declarations of the enable command procedure.
*/
static const CmdTable commands[] = {
- { procCommand, ProcBodyTestProcCmd, 1 },
- { checkCommand, ProcBodyTestCheckCmd, 1 },
+ { procCommand, ProcBodyTestProcObjCmd, 1 },
+ { checkCommand, ProcBodyTestCheckObjCmd, 1 },
{ 0, 0, 0 }
};
static const CmdTable safeCommands[] = {
- { procCommand, ProcBodyTestProcCmd, 1 },
- { checkCommand, ProcBodyTestCheckCmd, 1 },
+ { procCommand, ProcBodyTestProcObjCmd, 1 },
+ { checkCommand, ProcBodyTestCheckObjCmd, 1 },
{ 0, 0, 0 }
};
/*
*----------------------------------------------------------------------
@@ -152,11 +152,11 @@
return TCL_ERROR;
}
}
snprintf(buf, sizeof(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;
}
/*
*----------------------------------------------------------------------
@@ -194,11 +194,11 @@
}
/*
*----------------------------------------------------------------------
*
- * ProcBodyTestProcCmd --
+ * ProcBodyTestProcObjCmd --
*
* Implements the "procbodytest::proc" command. Here is the command
* description:
* procbodytest::proc newName argList bodyName
* Looks up a procedure called $bodyName and, if the procedure exists,
@@ -225,14 +225,14 @@
*
*----------------------------------------------------------------------
*/
static int
-ProcBodyTestProcCmd(
+ProcBodyTestProcObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* the current interpreter */
- int objc, /* argument count */
+ Tcl_Size objc, /* argument count */
Tcl_Obj *const objv[]) /* arguments */
{
const char *fullName;
Tcl_Command procCmd;
Command *cmdPtr;
@@ -261,21 +261,21 @@
/*
* check that this is a procedure and not a builtin command:
* 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", (char *)NULL);
return TCL_ERROR;
}
/*
* 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!", (char *)NULL);
return TCL_ERROR;
}
@@ -306,11 +306,11 @@
}
/*
*----------------------------------------------------------------------
*
- * ProcBodyTestCheckCmd --
+ * ProcBodyTestCheckObjCmd --
*
* Implements the "procbodytest::check" command. Here is the command
* description:
* procbodytest::check
*
@@ -324,14 +324,14 @@
*
*----------------------------------------------------------------------
*/
static int
-ProcBodyTestCheckCmd(
+ProcBodyTestCheckObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* the current interpreter */
- int objc, /* argument count */
+ Tcl_Size objc, /* argument count */
Tcl_Obj *const objv[]) /* arguments */
{
const char *version;
if (objc != 1) {
Index: generic/tclThreadTest.c
==================================================================
--- generic/tclThreadTest.c
+++ generic/tclThreadTest.c
@@ -119,11 +119,11 @@
* this mutex.
*/
TCL_DECLARE_MUTEX(threadMutex)
-static Tcl_ObjCmdProc ThreadCmd;
+static Tcl_ObjCmdProc2 ThreadObjCmd;
static int ThreadCreate(Tcl_Interp *interp, const char *script,
int joinable);
static int ThreadList(Tcl_Interp *interp);
static int ThreadSend(Tcl_Interp *interp, Tcl_ThreadId id,
const char *script, int wait);
@@ -169,18 +169,18 @@
if (mainThreadId == 0) {
mainThreadId = Tcl_GetCurrentThread();
}
Tcl_MutexUnlock(&threadMutex);
- Tcl_CreateObjCommand(interp, "testthread", ThreadCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testthread", ThreadObjCmd, NULL, NULL);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
- * ThreadCmd --
+ * ThreadObjCmd --
*
* This procedure is invoked to process the "testthread" Tcl command. See
* the user documentation for details on what it does.
*
* thread cancel ?-unwind? id ?result?
@@ -202,14 +202,14 @@
*
*----------------------------------------------------------------------
*/
static int
-ThreadCmd(
+ThreadObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
static const char *const threadOptions[] = {
"cancel", "create", "event", "exit", "id",
@@ -245,11 +245,12 @@
switch (option) {
case THREAD_CANCEL: {
Tcl_WideInt id;
const char *result;
- int flags, arg;
+ int flags;
+ Tcl_Size arg;
if ((objc < 3) || (objc > 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "?-unwind? id ?result?");
return TCL_ERROR;
}
Index: generic/tclTimer.c
==================================================================
--- generic/tclTimer.c
+++ generic/tclTimer.c
@@ -778,11 +778,11 @@
int
Tcl_AfterObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt ms = 0; /* Number of milliseconds to wait */
Tcl_Time wakeup;
AfterInfo *afterPtr;
Index: generic/tclTrace.c
==================================================================
--- generic/tclTrace.c
+++ generic/tclTrace.c
@@ -50,11 +50,11 @@
char *startCmd; /* Used for bookkeeping with step execution
* traces, store the command name which
* invoked step trace */
int curFlags; /* Trace flags for the current command */
int curCode; /* Return code for the current command */
- size_t refCount; /* Used to ensure this structure is not
+ Tcl_Size refCount; /* Used to ensure this structure is not
* deleted too early. Keeps track of how many
* pieces of code have a pointer to this
* structure. */
char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual
* size will be as large as necessary to hold
@@ -129,28 +129,32 @@
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_CmdObjTraceProc2 TraceExecutionProc;
+#ifndef TCL_NO_DEPRECATED
static int StringTraceProc(void *clientData,
Tcl_Interp *interp, Tcl_Size level,
const char *command, Tcl_Command commandInfo,
Tcl_Size objc, Tcl_Obj *const objv[]);
static void StringTraceDeleteProc(void *clientData);
+#endif /* TCL_NO_DEPRECATED */
static void DisposeTraceResult(int flags, char *result);
static int TraceVarEx(Tcl_Interp *interp, const char *part1,
const char *part2, VarTrace *tracePtr);
/*
* The following structure holds the client data for string-based
* trace procs
*/
+#ifndef TCL_NO_DEPRECATED
typedef struct {
void *clientData; /* Client data from Tcl_CreateTrace */
Tcl_CmdTraceProc *proc; /* Trace function from Tcl_CreateTrace */
} StringTraceData;
+#endif /* TCL_NO_DEPRECATED */
/*
* Convenience macros for iterating over the list of traces. Note that each of
* these *must* be treated as a command, and *must* have a block following it.
*/
@@ -186,11 +190,11 @@
int
Tcl_TraceObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
/* Main sub commands to 'trace' */
static const char *const traceOptions[] = {
"add", "info", "remove",
@@ -1976,10 +1980,11 @@
* passing it the original client data.
*
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
typedef struct {
Tcl_CmdObjTraceProc *proc;
Tcl_CmdObjTraceDeleteProc *delProc;
void *clientData;
} TraceWrapperInfo;
@@ -2029,10 +2034,11 @@
info->clientData = clientData;
return Tcl_CreateObjTrace2(interp, level, flags,
(proc ? traceWrapperProc : NULL),
info, traceWrapperDelProc);
}
+#endif /* TCL_NO_DEPRECATED */
Tcl_Trace
Tcl_CreateObjTrace2(
Tcl_Interp *interp, /* Tcl interpreter */
Tcl_Size level, /* Maximum nesting level */
@@ -2119,10 +2125,11 @@
* substitution. Proc does not return a value.
*
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
Tcl_Trace
Tcl_CreateTrace(
Tcl_Interp *interp, /* Interpreter in which to create trace. */
Tcl_Size level, /* Only call proc for commands at nesting
* level<=argument level (1=>top level). */
@@ -2214,10 +2221,11 @@
StringTraceDeleteProc(
void *clientData)
{
Tcl_Free(clientData);
}
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
*
* Tcl_DeleteTrace --
Index: generic/tclVar.c
==================================================================
--- generic/tclVar.c
+++ generic/tclVar.c
@@ -186,11 +186,11 @@
Tcl_Obj *arrayNameObj, Var *varPtr,
ArraySearch *searchPtr);
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);
static int LocateArray(Tcl_Interp *interp, Tcl_Obj *name,
Var **varPtrPtr, int *isArrayPtr);
@@ -210,11 +210,11 @@
/*
* 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);
/*
* Functions defined in this file that may be exported in the future for use
@@ -1482,11 +1482,11 @@
int
Tcl_SetObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varValueObj;
if (objc == 2) {
@@ -2730,14 +2730,15 @@
int
Tcl_UnsetObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, flags = TCL_LEAVE_ERR_MSG;
+ Tcl_Size i;
+ int flags = TCL_LEAVE_ERR_MSG;
const char *name;
if (objc == 1) {
/*
* Do nothing if no arguments supplied, so as to match command
@@ -2797,17 +2798,17 @@
int
Tcl_AppendObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Var *varPtr, *arrayPtr;
Tcl_Obj *varValuePtr = NULL;
/* Initialized to avoid compiler warning. */
- int i;
+ Tcl_Size i;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "varName ?value ...?");
return TCL_ERROR;
}
@@ -2862,11 +2863,11 @@
int
Tcl_LappendObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *varValuePtr, *newValuePtr;
Tcl_Size numElems;
Var *varPtr, *arrayPtr;
@@ -3068,21 +3069,21 @@
static int
ArrayForObjCmd(
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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,
+ Tcl_Size objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *varListObj, *arrayNameObj, *scriptObj;
ArraySearch *searchPtr = NULL;
Var *varPtr;
@@ -3315,11 +3316,11 @@
static int
ArrayStartSearchCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
int isArray;
ArraySearch *searchPtr;
@@ -3410,11 +3411,11 @@
static int
ArrayAnyMoreCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
Var *varPtr;
Tcl_Obj *varNameObj, *searchObj;
@@ -3488,11 +3489,11 @@
static int
ArrayNextElementCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
Tcl_Obj *varNameObj, *searchObj;
ArraySearch *searchPtr;
@@ -3568,11 +3569,11 @@
static int
ArrayDoneSearchCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *) interp;
Var *varPtr;
Tcl_Obj *varNameObj, *searchObj;
@@ -3628,11 +3629,11 @@
static int
ArrayExistsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Interp *iPtr = (Interp *)interp;
int isArray;
@@ -3668,11 +3669,11 @@
static int
ArrayGetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Var *varPtr, *varPtr2;
Tcl_Obj *varNameObj, *nameObj, *valueObj, *nameLstObj, *tmpResObj;
Tcl_Obj **nameObjPtr, *patternObj;
@@ -3828,11 +3829,11 @@
static int
ArrayNamesCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const options[] = {
"-exact", "-glob", "-regexp", NULL
};
@@ -3995,11 +3996,11 @@
static int
ArraySetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_Obj *arrayNameObj;
Tcl_Obj *arrayElemObj;
Var *varPtr, *arrayPtr;
@@ -4179,11 +4180,11 @@
static int
ArraySizeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
Tcl_HashSearch search;
Var *varPtr2;
@@ -4238,11 +4239,11 @@
static int
ArrayStatsCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Var *varPtr;
Tcl_Obj *varNameObj;
char *stats;
@@ -4292,11 +4293,11 @@
static int
ArrayUnsetCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Var *varPtr, *varPtr2, *protectedVarPtr;
Tcl_Obj *varNameObj, *patternObj, *nameObj;
Tcl_HashSearch search;
@@ -4860,11 +4861,11 @@
int
Tcl_ConstObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Var *varPtr, *arrayPtr;
Tcl_Obj *part1Ptr;
@@ -4935,18 +4936,19 @@
int
Tcl_GlobalObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
+ Tcl_Size i;
/*
* If we are not executing inside a Tcl procedure, just return.
*/
@@ -5039,18 +5041,19 @@
int
Tcl_VariableObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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;
+ Tcl_Size i;
+ int result;
Tcl_Obj *varNamePtr, *tailPtr;
for (i=1 ; i 5) {
@@ -3853,11 +3853,11 @@
static int
ZipFSLMkZipObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *password;
if (objc < 3 || objc > 4) {
@@ -3894,11 +3894,11 @@
static int
ZipFSMkImgObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *originFile, *stripPrefix, *password;
if (objc < 3 || objc > 6) {
@@ -3921,11 +3921,11 @@
static int
ZipFSLMkImgObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *originFile, *password;
if (objc < 3 || objc > 5) {
@@ -3963,11 +3963,11 @@
static int
ZipFSCanonicalObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *mntPoint = NULL;
Tcl_DString dsPath, dsMount;
@@ -4015,11 +4015,11 @@
static int
ZipFSExistsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *filename;
int exists;
@@ -4064,11 +4064,11 @@
static int
ZipFSInfoObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *filename;
ZipEntry *z;
int ret;
@@ -4124,11 +4124,11 @@
static int
ZipFSListObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *pattern = NULL;
Tcl_RegExp regexp = NULL;
Tcl_HashEntry *hPtr;
@@ -4345,11 +4345,11 @@
static int
ZipFSTclLibraryObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *)) /*objv*/
{
if (!Tcl_IsSafe(interp)) {
Tcl_Obj *pResult = TclZipfs_TclLibrary();
@@ -6290,11 +6290,11 @@
* Add the [zipfs find] subcommand.
*/
Tcl_GetEnsembleMappingDict(NULL, ensemble, &mapObj);
TclDictPutString(NULL, mapObj, "find", "::tcl::zipfs::find");
- Tcl_CreateObjCommand(interp, "::tcl::zipfs::tcl_library_init",
+ Tcl_CreateObjCommand2(interp, "::tcl::zipfs::tcl_library_init",
ZipFSTclLibraryObjCmd, NULL, NULL);
}
return TCL_OK;
}
Index: generic/tclZlib.c
==================================================================
--- generic/tclZlib.c
+++ generic/tclZlib.c
@@ -168,35 +168,35 @@
static Tcl_DriverHandlerProc ZlibTransformEventHandler;
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);
static Tcl_Obj * ConvertErrorToList(int code, uLong adler);
static inline int Deflate(z_streamp strm, void *bufferPtr,
size_t bufferSize, int flush, size_t *writtenPtr);
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, Tcl_Size objc,
Tcl_Obj *const objv[]);
static int ResultDecompress(ZlibChannelData *chanDataPtr,
char *buf, int toRead, int flush,
int *errorCodePtr);
static Tcl_Channel ZlibStackChannelTransform(Tcl_Interp *interp,
int mode, int format, int level, int limit,
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, Tcl_Size objc,
Tcl_Obj *const objv[]);
static inline void ZlibTransformEventTimerKill(
ZlibChannelData *chanDataPtr);
static void ZlibTransformTimerRun(void *clientData);
@@ -839,11 +839,11 @@
/*
* 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) {
goto error;
}
@@ -1967,18 +1967,16 @@
static int
ZlibCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
- int i, option, level = -1;
- size_t buffersize = 0;
- Tcl_Size dlen = 0;
- unsigned int start;
- Tcl_WideInt wideLen;
+ int option, level = -1;
+ Tcl_Size i, dlen = 0, buffersize = 0;
+ Tcl_WideInt wideLen, start;
Byte *data;
Tcl_Obj *headerDictObj;
const char *extraInfoStr = NULL;
static const char *const commands[] = {
"adler32", "compress", "crc32", "decompress", "deflate", "gunzip",
@@ -2008,12 +2006,12 @@
}
data = Tcl_GetBytesFromObj(interp, objv[2], &dlen);
if (data == NULL) {
return TCL_ERROR;
}
- if (objc > 3 && Tcl_GetIntFromObj(interp, objv[3],
- (int *) &start) != TCL_OK) {
+ if (objc>3 && Tcl_GetWideIntFromObj(interp, objv[3],
+ &start) != TCL_OK) {
return TCL_ERROR;
}
if (objc < 4) {
start = Tcl_ZlibAdler32(0, NULL, 0);
}
@@ -2246,11 +2244,11 @@
*/
static int
ZlibStreamSubcmd(
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const stream_formats[] = {
"compress", "decompress", "deflate", "gunzip", "gzip", "inflate",
NULL
@@ -2257,11 +2255,12 @@
};
enum zlibFormats {
FMT_COMPRESS, FMT_DECOMPRESS, FMT_DEFLATE, FMT_GUNZIP, FMT_GZIP,
FMT_INFLATE
} fmt;
- int i, format, mode = 0, option, level;
+ Tcl_Size i;
+ int format, mode = 0, option, level;
enum objIndices {
OPT_COMPRESSION_DICTIONARY = 0,
OPT_GZIP_HEADER = 1,
OPT_COMPRESSION_LEVEL = 2,
OPT_END = -1
@@ -2407,11 +2406,11 @@
*/
static int
ZlibPushSubcmd(
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
static const char *const stream_formats[] = {
"compress", "decompress", "deflate", "gunzip", "gzip", "inflate",
NULL
@@ -2419,11 +2418,11 @@
enum zlibFormats {
FMT_COMPRESS, FMT_DECOMPRESS, FMT_DEFLATE, FMT_GUNZIP, FMT_GZIP,
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
};
static const char *const pushDecompressOptions[] = {
"-dictionary", "-header", "-level", "-limit", NULL
@@ -2430,11 +2429,11 @@
};
const char *const *pushOptions = pushDecompressOptions;
enum pushOptionsEnum {poDictionary, poHeader, poLevel, poLimit} option;
Tcl_Obj *headerObj = NULL, *compDictObj = NULL;
int limit = DEFAULT_BUFFER_SIZE;
- Tcl_Size dummy;
+ Tcl_Size i, dummy;
if (objc < 4) {
Tcl_WrongNumArgs(interp, 2, objv, "mode channel ?options...?");
return TCL_ERROR;
}
@@ -2589,11 +2588,11 @@
static int
ZlibStreamCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_ZlibStream zstream = (Tcl_ZlibStream) clientData;
int count, code;
Tcl_Obj *obj;
@@ -2715,15 +2714,16 @@
static int
ZlibStreamAddCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_ZlibStream zstream = (Tcl_ZlibStream) clientData;
- int code, buffersize = -1, flush = -1, i;
+ int code, buffersize = -1, flush = -1;
+ Tcl_Size i;
Tcl_Obj *obj, *compDictObj = NULL;
static const char *const add_options[] = {
"-buffer", "-dictionary", "-finalize", "-flush", "-fullflush", NULL
};
enum addOptions {
@@ -2842,15 +2842,16 @@
static int
ZlibStreamPutCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
Tcl_ZlibStream zstream = (Tcl_ZlibStream) clientData;
- int flush = -1, i;
+ int flush = -1;
+ Tcl_Size i;
Tcl_Obj *compDictObj = NULL;
static const char *const put_options[] = {
"-dictionary", "-finalize", "-flush", "-fullflush", NULL
};
enum putOptions {
@@ -2933,11 +2934,11 @@
static int
ZlibStreamHeaderCmd(
void *clientData,
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj *const objv[])
{
ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) clientData;
Tcl_Obj *resultObj;
@@ -4011,11 +4012,11 @@
/*
* 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.
*
* TODO: Describe whether we're using the system version of the library or
Index: library/init.tcl
==================================================================
--- library/init.tcl
+++ library/init.tcl
@@ -13,11 +13,11 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-package require -exact tcl 9.0.1
+package require -exact tcl 9.1a0
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
#
# The environment variable TCLLIBPATH
Index: macosx/README
==================================================================
--- macosx/README
+++ macosx/README
@@ -90,13 +90,13 @@
----------------------------------------------------------
- Unpack the Tcl source release archive.
- The following instructions assume the Tcl source tree is named "tcl${ver}",
-(where ${ver} is a shell variable containing the Tcl version number e.g. '9.0').
+(where ${ver} is a shell variable containing the Tcl version number e.g. '9.1').
Setup this shell variable as follows:
- ver="9.0"
+ ver="9.1"
- Setup environment variables as desired, e.g. for a universal build on 10.9:
CFLAGS="-arch x86_64 -arch arm64 -mmacosx-version-min=10.9"
export CFLAGS
Index: macosx/tclMacOSXBundle.c
==================================================================
--- macosx/tclMacOSXBundle.c
+++ macosx/tclMacOSXBundle.c
@@ -246,11 +246,11 @@
* FIXME: This is a quick fix, it is probably not right for
* internationalization.
*/
CFURLGetFileSystemRepresentation(libURL, TRUE,
- (unsigned char *) libraryPath, maxPathLen);
+ (unsigned char *) libraryPath, (CFIndex)maxPathLen);
CFRelease(libURL);
}
if (versionedBundleRef) {
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
/*
Index: macosx/tclMacOSXFCmd.c
==================================================================
--- macosx/tclMacOSXFCmd.c
+++ macosx/tclMacOSXFCmd.c
@@ -713,11 +713,11 @@
Tcl_ExternalToUtf(NULL, encoding, src, TCL_INDEX_NONE, /* flags */ 0,
/* statePtr */ NULL, dst, size, /* srcReadPtr */ NULL,
/* dstWrotePtr */ &written, /* dstCharsPtr */ NULL);
Tcl_FreeEncoding(encoding);
- (void)Tcl_InitStringRep(objPtr, NULL, written);
+ (void)Tcl_InitStringRep(objPtr, NULL, (size_t)written);
}
/*
* Local Variables:
* mode: c
Index: macosx/tclMacOSXNotify.c
==================================================================
--- macosx/tclMacOSXNotify.c
+++ macosx/tclMacOSXNotify.c
@@ -1817,11 +1817,11 @@
*/
while (1) {
if (timeout > 0) {
blockTime.tv_sec = abortTime.sec - now.sec;
- blockTime.tv_usec = abortTime.usec - now.usec;
+ blockTime.tv_usec = (int)(abortTime.usec - now.usec);
if (blockTime.tv_usec < 0) {
blockTime.tv_sec -= 1;
blockTime.tv_usec += 1000000;
}
if (blockTime.tv_sec < 0) {
@@ -2116,11 +2116,11 @@
* readable. Note that there may be multiple bytes pending, but to
* avoid a race condition we only read one at a time.
*/
if (FD_ISSET(receivePipe, &readableMask)) {
- i = read(receivePipe, buf, 1);
+ i = (int)read(receivePipe, buf, 1);
if ((i == 0) || ((i == 1) && (buf[0] == 'q'))) {
/*
* Someone closed the write end of the pipe or sent us a Quit
* message [Bug: 4139] and then closed the write end of the
Index: tests/cmdInfo.test
==================================================================
--- tests/cmdInfo.test
+++ tests/cmdInfo.test
@@ -25,11 +25,11 @@
testConstraint testcmdtoken [llength [info commands testcmdtoken]]
test cmdinfo-1.1 {command procedure and clientData} {testcmdinfo} {
testcmdinfo create x1
testcmdinfo get x1
-} {CmdProc1 original CmdDelProc1 original :: stringProc}
+} {CmdProc1 original CmdDelProc1 original :: nativeObjectProc2}
test cmdinfo-1.2 {command procedure and clientData} {testcmdinfo} {
testcmdinfo create x1
x1
} {CmdProc1 original}
test cmdinfo-1.3 {command procedure and clientData} {testcmdinfo} {
Index: tests/icuUcmTests.tcl
==================================================================
--- tests/icuUcmTests.tcl
+++ tests/icuUcmTests.tcl
@@ -1,11 +1,11 @@
# This file is automatically generated by ucm2tests.tcl.
# Edits will be overwritten on next generation.
#
-# Tests comparing Tcl encodings to ICU.
-# This file is NOT standalone. It should be sourced into a test script.
+# Generates tests comparing Tcl encodings to ICU.
+# The generated file is NOT standalone. It should be sourced into a test script.
proc ucmConvertfromMismatches {enc map} {
set mismatches {}
foreach {unihex hex} $map {
set unihex [string range 00000000$unihex end-7 end]; # Make 8 digits
Index: tools/tsdPerf.c
==================================================================
--- tools/tsdPerf.c
+++ tools/tsdPerf.c
@@ -8,11 +8,11 @@
Tcl_WideInt value;
} TsdPerf;
static int
-tsdPerfSetObjCmd(void *cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) {
+tsdPerfSetObjCmd(void *cdata, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const *objv) {
TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf));
Tcl_WideInt i;
if (2 != objc) {
Tcl_WrongNumArgs(interp, 1, objv, "value");
@@ -27,11 +27,11 @@
return TCL_OK;
}
static int
-tsdPerfGetObjCmd(void *cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) {
+tsdPerfGetObjCmd(void *cdata, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const *objv) {
TsdPerf *perf = Tcl_GetThreadData(&key, sizeof(TsdPerf));
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(perf->value));
@@ -38,16 +38,16 @@
return TCL_OK;
}
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;
}
/*
Index: unix/Makefile.in
==================================================================
--- unix/Makefile.in
+++ unix/Makefile.in
@@ -2036,26 +2036,17 @@
# If PKG_DIR is changed to a different relative depth to the build dir, need
# to adapt the ../.. relative paths below and at the top of configure.ac (we
# cannot use absolute paths due to issues in nested configure when path to
# build dir contains spaces).
PKG_DIR = ./pkgs
-PKG8_DIR = ./pkgs8
configure-packages:
@for i in $(PKGS_DIR)/*; do \
if [ -d $$i ] ; then \
if [ -x $$i/configure ] ; then \
pkg=`basename $$i`; \
echo "Configuring package '$$pkg'"; \
- mkdir -p $(PKG8_DIR)/$$pkg; \
- if [ ! -f $(PKG8_DIR)/$$pkg/Makefile ] ; then \
- ( cd $(PKG8_DIR)/$$pkg; \
- $$i/configure --with-tcl8 --with-tcl=../.. \
- --with-tclinclude=$(GENERIC_DIR) \
- $(PKG_CFG_ARGS) --libdir=$(PACKAGE_DIR) \
- --enable-shared; ) || exit $$?; \
- fi; \
mkdir -p $(PKG_DIR)/$$pkg; \
if [ ! -f $(PKG_DIR)/$$pkg/Makefile ] ; then \
( cd $(PKG_DIR)/$$pkg; \
$$i/configure --with-tcl=../.. \
--with-tclinclude=$(GENERIC_DIR) \
@@ -2068,14 +2059,10 @@
packages: configure-packages ${STUB_LIB_FILE}
@for i in $(PKGS_DIR)/*; do \
if [ -d $$i ] ; then \
pkg=`basename $$i`; \
- if [ -f $(PKG8_DIR)/$$pkg/Makefile ] ; then \
- echo "Building package '$$pkg' for Tcl 8"; \
- ( cd $(PKG8_DIR)/$$pkg; $(MAKE); ) || exit $$?; \
- fi; \
if [ -f $(PKG_DIR)/$$pkg/Makefile ] ; then \
echo "Building package '$$pkg'"; \
( cd $(PKG_DIR)/$$pkg; $(MAKE); ) || exit $$?; \
fi; \
fi; \
@@ -2083,15 +2070,10 @@
install-packages: packages
@for i in $(PKGS_DIR)/*; do \
if [ -d $$i ] ; then \
pkg=`basename $$i`; \
- if [ -f $(PKG8_DIR)/$$pkg/Makefile ] ; then \
- echo "Installing package '$$pkg' for Tcl 8"; \
- ( cd $(PKG8_DIR)/$$pkg; $(MAKE) install \
- "DESTDIR=$(INSTALL_ROOT)"; ) || exit $$?; \
- fi; \
if [ -f $(PKG_DIR)/$$pkg/Makefile ] ; then \
echo "Installing package '$$pkg'"; \
( cd $(PKG_DIR)/$$pkg; $(MAKE) install \
"DESTDIR=$(INSTALL_ROOT)"; ) || exit $$?; \
fi; \
@@ -2115,13 +2097,10 @@
clean-packages:
@for i in $(PKGS_DIR)/*; do \
if [ -d $$i ] ; then \
pkg=`basename $$i`; \
- if [ -f $(PKG8_DIR)/$$pkg/Makefile ] ; then \
- ( cd $(PKG8_DIR)/$$pkg; $(MAKE) clean; ) \
- fi; \
if [ -f $(PKG_DIR)/$$pkg/Makefile ] ; then \
( cd $(PKG_DIR)/$$pkg; $(MAKE) clean; ) \
fi; \
fi; \
done
@@ -2128,21 +2107,16 @@
distclean-packages:
@for i in $(PKGS_DIR)/*; do \
if [ -d $$i ] ; then \
pkg=`basename $$i`; \
- if [ -f $(PKG8_DIR)/$$pkg/Makefile ] ; then \
- ( cd $(PKG8_DIR)/$$pkg; $(MAKE) distclean; ) \
- fi; \
- rm -rf $(PKG8_DIR)/$$pkg; \
if [ -f $(PKG_DIR)/$$pkg/Makefile ] ; then \
( cd $(PKG_DIR)/$$pkg; $(MAKE) distclean; ) \
fi; \
rm -rf $(PKG_DIR)/$$pkg; \
fi; \
done; \
- rm -rf $(PKG8_DIR)
rm -rf $(PKG_DIR)
dist-packages: configure-packages
@rm -rf $(DISTROOT)/pkgs; \
mkdir -p $(DISTROOT)/pkgs; \
Index: unix/configure
==================================================================
--- unix/configure
+++ unix/configure
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for tcl 9.0.
+# Generated by GNU Autoconf 2.72 for tcl 9.1.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
# Inc.
#
@@ -599,12 +599,12 @@
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=''
# Factoring default headers for most tests.
ac_includes_default="\
@@ -1364,11 +1364,11 @@
#
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]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
@@ -1426,11 +1426,11 @@
_ACEOF
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
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
@@ -1543,11 +1543,11 @@
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.72
Copyright (C) 2023 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -2026,11 +2026,11 @@
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.72. Invocation command line was
$ $0$ac_configure_args_raw
_ACEOF
@@ -2705,14 +2705,14 @@
-TCL_VERSION=9.0
+TCL_VERSION=9.1
TCL_MAJOR_VERSION=9
-TCL_MINOR_VERSION=0
-TCL_PATCH_LEVEL=".1"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VERSION=${TCL_VERSION}
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
EXTRA_BUILD_HTML=${EXTRA_BUILD_HTML:-"@:"}
@@ -11946,11 +11946,11 @@
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# 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.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
@@ -12005,11 +12005,11 @@
ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
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.72,
with options \\"\$ac_cs_config\\"
Copyright (C) 2023 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
Index: unix/configure.ac
==================================================================
--- unix/configure.ac
+++ unix/configure.ac
@@ -1,11 +1,11 @@
#! /bin/bash -norc
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
m4_ifdef([SC_USE_CONFIG_HEADERS], [
AC_CONFIG_HEADERS([tclConfig.h:../unix/tclConfig.h.in])
@@ -21,14 +21,14 @@
/* override */ #undef PACKAGE_VERSION
/* override */ #undef PACKAGE_STRING
#endif /* _TCLCONFIG */])
])
-TCL_VERSION=9.0
+TCL_VERSION=9.1
TCL_MAJOR_VERSION=9
-TCL_MINOR_VERSION=0
-TCL_PATCH_LEVEL=".1"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VERSION=${TCL_VERSION}
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
EXTRA_BUILD_HTML=${EXTRA_BUILD_HTML:-"@:"}
Index: unix/dltest/Makefile.in
==================================================================
--- unix/dltest/Makefile.in
+++ unix/dltest/Makefile.in
@@ -25,17 +25,17 @@
CC_SWITCHES = $(CFLAGS) -I${SRC_DIR}/../../generic \
${SHLIB_CFLAGS} -DUSE_TCL_STUBS ${AC_FLAGS}
all: embtest tcl9pkga${SHLIB_SUFFIX} tcl9pkgb${SHLIB_SUFFIX} tcl9pkgc${SHLIB_SUFFIX} \
tcl9pkgd${SHLIB_SUFFIX} tcl9pkge${SHLIB_SUFFIX} tcl9pkgt${SHLIB_SUFFIX} tcl9pkgua${SHLIB_SUFFIX} \
- tcl9pkgooa${SHLIB_SUFFIX} pkga${SHLIB_SUFFIX} pkgb${SHLIB_SUFFIX} pkgc${SHLIB_SUFFIX} pkgt${SHLIB_SUFFIX}
+ tcl9pkgooa${SHLIB_SUFFIX}
@if test -n "$(DLTEST_SUFFIX)"; then $(MAKE) dltest_suffix; fi
@touch ../dltest.marker
dltest_suffix: tcl9pkga${DLTEST_SUFFIX} tcl9pkgb${DLTEST_SUFFIX} tcl9pkgc${DLTEST_SUFFIX} \
tcl9pkgd${DLTEST_SUFFIX} tcl9pkge${DLTEST_SUFFIX} tcl9pkgt${DLTEST_SUFFIX} tcl9pkgua${DLTEST_SUFFIX} \
- tcl9pkgooa${DLTEST_SUFFIX} pkga${DLTEST_SUFFIX} pkgb${DLTEST_SUFFIX} pkgc${DLTEST_SUFFIX} pkgt${DLTEST_SUFFIX}
+ tcl9pkgooa${DLTEST_SUFFIX}
@touch ../dltest.marker
embtest.o: $(SRC_DIR)/embtest.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/embtest.c
@@ -52,22 +52,10 @@
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgc.c
pkgt.o: $(SRC_DIR)/pkgt.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgt.c
-tcl8pkga.o: $(SRC_DIR)/pkga.c
- $(CC) -o $@ -c $(CC_SWITCHES) -DTCL_MAJOR_VERSION=8 $(SRC_DIR)/pkga.c
-
-tcl8pkgb.o: $(SRC_DIR)/pkgb.c
- $(CC) -o $@ -c $(CC_SWITCHES) -DTCL_MAJOR_VERSION=8 $(SRC_DIR)/pkgb.c
-
-tcl8pkgc.o: $(SRC_DIR)/pkgc.c
- $(CC) -o $@ -c $(CC_SWITCHES) -DTCL_MAJOR_VERSION=8 $(SRC_DIR)/pkgc.c
-
-tcl8pkgt.o: $(SRC_DIR)/pkgt.c
- $(CC) -o $@ -c $(CC_SWITCHES) -DTCL_MAJOR_VERSION=8 $(SRC_DIR)/pkgt.c
-
pkgd.o: $(SRC_DIR)/pkgd.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgd.c
pkge.o: $(SRC_DIR)/pkge.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkge.c
@@ -94,22 +82,10 @@
${SHLIB_LD} -o $@ pkgc.o ${SHLIB_LD_LIBS}
tcl9pkgt${SHLIB_SUFFIX}: pkgt.o
${SHLIB_LD} -o $@ pkgt.o ${SHLIB_LD_LIBS}
-pkga${SHLIB_SUFFIX}: tcl8pkga.o
- ${SHLIB_LD} -o $@ tcl8pkga.o ${SHLIB_LD_LIBS}
-
-pkgb${SHLIB_SUFFIX}: tcl8pkgb.o
- ${SHLIB_LD} -o $@ tcl8pkgb.o ${SHLIB_LD_LIBS}
-
-pkgc${SHLIB_SUFFIX}: tcl8pkgc.o
- ${SHLIB_LD} -o $@ tcl8pkgc.o ${SHLIB_LD_LIBS}
-
-pkgt${SHLIB_SUFFIX}: tcl8pkgt.o
- ${SHLIB_LD} -o $@ tcl8pkgt.o ${SHLIB_LD_LIBS}
-
tcl9pkgd${SHLIB_SUFFIX}: pkgd.o
${SHLIB_LD} -o $@ pkgd.o ${SHLIB_LD_LIBS}
tcl9pkge${SHLIB_SUFFIX}: pkge.o
${SHLIB_LD} -o $@ pkge.o ${SHLIB_LD_LIBS}
@@ -133,22 +109,10 @@
${DLTEST_LD} -o $@ pkgc.o ${SHLIB_LD_LIBS}
tcl9pkgt${DLTEST_SUFFIX}: pkgt.o
${DLTEST_LD} -o $@ pkgt.o ${SHLIB_LD_LIBS}
-pkga${DLTEST_SUFFIX}: tcl8pkga.o
- ${DLTEST_LD} -o $@ tcl8pkga.o ${SHLIB_LD_LIBS}
-
-pkgb${DLTEST_SUFFIX}: tcl8pkgb.o
- ${DLTEST_LD} -o $@ tcl8pkgb.o ${SHLIB_LD_LIBS}
-
-pkgc${DLTEST_SUFFIX}: tcl8pkgc.o
- ${DLTEST_LD} -o $@ tcl8pkgc.o ${SHLIB_LD_LIBS}
-
-pkgt${DLTEST_SUFFIX}: tcl8pkgt.o
- ${DLTEST_LD} -o $@ tcl8pkgt.o ${SHLIB_LD_LIBS}
-
tcl9pkgd${DLTEST_SUFFIX}: pkgd.o
${DLTEST_LD} -o $@ pkgd.o ${SHLIB_LD_LIBS}
tcl9pkge${DLTEST_SUFFIX}: pkge.o
${DLTEST_LD} -o $@ pkge.o ${SHLIB_LD_LIBS}
Index: unix/dltest/pkga.c
==================================================================
--- unix/dltest/pkga.c
+++ unix/dltest/pkga.c
@@ -33,11 +33,11 @@
static int
Pkga_EqObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
const char *str1, *str2;
Tcl_Size len1, len2;
@@ -80,11 +80,11 @@
static int
Pkga_QuoteObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
(void)dummy;
if (objc != 2) {
@@ -124,10 +124,10 @@
}
code = Tcl_PkgProvide(interp, "pkga", "1.0");
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;
}
Index: unix/dltest/pkgb.c
==================================================================
--- unix/dltest/pkgb.c
+++ unix/dltest/pkgb.c
@@ -36,11 +36,11 @@
static int
Pkgb_SubObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int first, second;
(void)dummy;
@@ -78,11 +78,11 @@
static int
Pkgb_UnsafeObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
(void)objc;
(void)objv;
@@ -92,11 +92,11 @@
static int
Pkgb_DemoObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt numChars;
int result;
(void)dummy;
@@ -142,13 +142,13 @@
}
code = Tcl_PkgProvide(interp, "pkgb", "2.3");
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;
}
/*
*----------------------------------------------------------------------
@@ -179,8 +179,8 @@
}
code = Tcl_PkgProvide(interp, "pkgb", "2.3");
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;
}
Index: unix/dltest/pkgc.c
==================================================================
--- unix/dltest/pkgc.c
+++ unix/dltest/pkgc.c
@@ -33,11 +33,11 @@
static int
Pkgc_SubObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int first, second;
(void)dummy;
@@ -72,11 +72,11 @@
static int
Pkgc_UnsafeObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
(void)objc;
(void)objv;
@@ -114,12 +114,12 @@
}
code = Tcl_PkgProvide(interp, "pkgc", "1.7.2");
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;
}
/*
@@ -151,8 +151,8 @@
}
code = Tcl_PkgProvide(interp, "pkgc", "1.7.2");
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;
}
Index: unix/dltest/pkgd.c
==================================================================
--- unix/dltest/pkgd.c
+++ unix/dltest/pkgd.c
@@ -33,11 +33,11 @@
static int
Pkgd_SubObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int first, second;
(void)dummy;
@@ -72,11 +72,11 @@
static int
Pkgd_UnsafeObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
(void)objc;
(void)objv;
@@ -114,12 +114,12 @@
}
code = Tcl_PkgProvide(interp, "pkgd", "7.3");
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;
}
/*
@@ -151,8 +151,8 @@
}
code = Tcl_PkgProvide(interp, "pkgd", "7.3");
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;
}
Index: unix/dltest/pkgooa.c
==================================================================
--- unix/dltest/pkgooa.c
+++ unix/dltest/pkgooa.c
@@ -33,11 +33,11 @@
static int
Pkgooa_StubsOKObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
if (objc != 1) {
@@ -141,8 +141,8 @@
code = Tcl_PkgProvide(interp, "pkgooa", "1.0");
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;
}
Index: unix/dltest/pkgua.c
==================================================================
--- unix/dltest/pkgua.c
+++ unix/dltest/pkgua.c
@@ -120,11 +120,11 @@
static int
PkguaEqObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int result;
const char *str1, *str2;
Tcl_Size len1, len2;
@@ -167,11 +167,11 @@
static int
PkguaQuoteObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
(void)dummy;
if (objc != 2) {
@@ -225,14 +225,14 @@
Tcl_SetVar2(interp, "::pkgua_loaded", NULL, ".", TCL_APPEND_VALUE);
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;
}
/*
Index: unix/dltest/pkgπ.c
==================================================================
--- unix/dltest/pkgπ.c
+++ unix/dltest/pkgπ.c
@@ -33,11 +33,11 @@
static int
Pkg\u03C0_\u03A0ObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
(void)dummy;
if (objc != 1) {
@@ -78,8 +78,8 @@
}
code = Tcl_PkgProvide(interp, "pkgπ", "1.0");
if (code != TCL_OK) {
return code;
}
- Tcl_CreateObjCommand(interp, "π", Pkg\u03C0_\u03A0ObjCmd, NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "π", Pkg\u03C0_\u03A0ObjCmd, NULL, NULL);
return TCL_OK;
}
Index: unix/tcl.m4
==================================================================
--- unix/tcl.m4
+++ unix/tcl.m4
@@ -91,15 +91,15 @@
`ls -d ${exec_prefix}/lib 2>/dev/null` \
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tcl9.0 2>/dev/null` \
+ `ls -d /usr/lib/tcl9.1 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl9.1 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tcl9.1 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd $i; pwd)`"
break
fi
@@ -224,15 +224,15 @@
`ls -d ${exec_prefix}/lib 2>/dev/null` \
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tk9.0 2>/dev/null` \
+ `ls -d /usr/lib/tk9.1 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tk9.0 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tk9.0 2>/dev/null` \
+ `ls -d /usr/local/lib/tk9.1 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tk9.1 2>/dev/null` \
; do
if test -f "$i/tkConfig.sh" ; then
ac_cv_c_tkconfig="`(cd $i; pwd)`"
break
fi
Index: unix/tcl.spec
==================================================================
--- unix/tcl.spec
+++ unix/tcl.spec
@@ -2,11 +2,11 @@
%{!?directory:%define directory /usr/local}
Name: tcl
Summary: Tcl scripting language development environment
-Version: 9.0.1
+Version: 9.1a0
Release: 2
License: BSD
Group: Development/Languages
Source: http://prdownloads.sourceforge.net/tcl/tcl%{version}-src.tar.gz
URL: https://www.tcl-lang.org/
Index: unix/tclUnixPipe.c
==================================================================
--- unix/tclUnixPipe.c
+++ unix/tclUnixPipe.c
@@ -1369,11 +1369,11 @@
int
Tcl_PidObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_Channel chan;
PipeState *pipePtr;
size_t i;
Index: unix/tclUnixTest.c
==================================================================
--- unix/tclUnixTest.c
+++ unix/tclUnixTest.c
@@ -62,17 +62,17 @@
/*
* 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,23 +93,23 @@
int
TclplatformtestInit(
Tcl_Interp *interp) /* Interpreter to add commands to. */
{
- Tcl_CreateObjCommand(interp, "testchmod", TestchmodCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfilehandler", TestfilehandlerCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfilewait", TestfilewaitCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfindexecutable", TestfindexecutableCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testfork", TestforkCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testalarm", TestalarmCmd,
- NULL, NULL);
- Tcl_CreateObjCommand(interp, "testgotsig", TestgotsigCmd,
+ Tcl_CreateObjCommand2(interp, "testchmod", TestchmodCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfilehandler", TestfilehandlerCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfilewait", TestfilewaitCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfindexecutable", TestfindexecutableCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testfork", TestforkCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testalarm", TestalarmCmd,
+ NULL, NULL);
+ Tcl_CreateObjCommand2(interp, "testgotsig", TestgotsigCmd,
NULL, NULL);
return TCL_OK;
}
/*
@@ -131,11 +131,11 @@
static int
TestfilehandlerCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Pipe *pipePtr;
int i, mask, timeout;
static int initialized = 0;
@@ -345,11 +345,11 @@
static int
TestfilewaitCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
int mask, result, timeout;
Tcl_Channel channel;
int fd;
@@ -413,11 +413,11 @@
static int
TestfindexecutableCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_Obj *saveName;
if (objc != 2) {
@@ -455,11 +455,11 @@
static int
TestforkCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
pid_t pid;
if (objc != 1) {
@@ -501,11 +501,11 @@
static int
TestalarmCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
#ifdef SA_RESTART
unsigned int sec = 1;
struct sigaction action;
@@ -579,11 +579,11 @@
static int
TestgotsigCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- TCL_UNUSED(int) /*objc*/,
+ TCL_UNUSED(Tcl_Size) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *))
{
Tcl_AppendResult(interp, gotsig, (char *)NULL);
gotsig = "0";
return TCL_OK;
@@ -610,14 +610,15 @@
static int
TestchmodCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
- int i, mode;
+ Tcl_Size i;
+ int mode;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "mode file ?file ...?");
return TCL_ERROR;
}
Index: unix/tclXtTest.c
==================================================================
--- unix/tclXtTest.c
+++ unix/tclXtTest.c
@@ -13,11 +13,11 @@
# define USE_TCL_STUBS
#endif
#include
#include "tcl.h"
-static Tcl_ObjCmdProc TesteventloopCmd;
+static Tcl_ObjCmdProc2 TesteventloopCmd;
/*
* Functions defined in tclXtNotify.c for use by users of the Xt Notifier:
*/
@@ -50,11 +50,11 @@
if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
XtToolkitInitialize();
InitNotifier();
- Tcl_CreateObjCommand(interp, "testeventloop", TesteventloopCmd,
+ Tcl_CreateObjCommand2(interp, "testeventloop", TesteventloopCmd,
NULL, NULL);
return TCL_OK;
}
/*
@@ -77,11 +77,11 @@
static int
TesteventloopCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
Index: win/Makefile.in
==================================================================
--- win/Makefile.in
+++ win/Makefile.in
@@ -149,14 +149,12 @@
TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
TCL_DLL_FILE = @TCL_DLL_FILE@
TCL_LIB_FILE = @TCL_LIB_FILE@
DDE_DLL_FILE = tcl9dde$(DDEVER)${DLLSUFFIX}
-DDE_DLL_FILE8 = tcldde$(DDEVER)${DLLSUFFIX}
DDE_LIB_FILE = @LIBPREFIX@tcldde$(DDEVER)${DLLSUFFIX}${LIBSUFFIX}
REG_DLL_FILE = tcl9registry$(REGVER)${DLLSUFFIX}
-REG_DLL_FILE8 = tclregistry$(REGVER)${DLLSUFFIX}
REG_LIB_FILE = @LIBPREFIX@tclregistry$(REGVER)${DLLSUFFIX}${LIBSUFFIX}
TEST_DLL_FILE = tcltest$(VER)${DLLSUFFIX}
TEST_EXE_FILE = tcltest${EXESUFFIX}
TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${DLLSUFFIX}${LIBSUFFIX}
TEST_LOAD_PRMS = lappend ::auto_path {$(ROOT_DIR_WIN_NATIVE)/tests};\
@@ -532,11 +530,11 @@
tcltest: binaries $(TEST_EXE_FILE) $(TEST_DLL_FILE) $(CAT32) tcltest.cmd
binaries: $(TCL_STUB_LIB_FILE) @LIBRARIES@ winextensions ${TCL_ZIP_FILE} $(TCLSH)
-winextensions: ${DDE_DLL_FILE} ${REG_DLL_FILE} ${DDE_DLL_FILE8} ${REG_DLL_FILE8}
+winextensions: ${DDE_DLL_FILE} ${REG_DLL_FILE}
libraries:
doc:
@@ -611,18 +609,10 @@
${REG_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${REG_OBJS}
@MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
$(COPY) tclsh.exe.manifest ${REG_DLL_FILE}.manifest
-${DDE_DLL_FILE8}: ${TCL_STUB_LIB_FILE} tcl8WinDde.$(OBJEXT)
- @MAKE_DLL@ tcl8WinDde.$(OBJEXT) $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
- $(COPY) tclsh.exe.manifest ${DDE_DLL_FILE8}.manifest
-
-${REG_DLL_FILE8}: ${TCL_STUB_LIB_FILE} tcl8WinReg.$(OBJEXT)
- @MAKE_DLL@ -DTCL_MAJOR_VERSION=8 tcl8WinReg.$(OBJEXT) $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
- $(COPY) tclsh.exe.manifest ${REG_DLL_FILE8}.manifest
-
${TEST_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS}
@$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}
@MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
$(COPY) tclsh.exe.manifest ${TEST_DLL_FILE}.manifest
@@ -882,14 +872,10 @@
echo Installing $(DDE_DLL_FILE); \
$(COPY) $(DDE_DLL_FILE) "$(LIB_INSTALL_DIR)/dde${DDEDOTVER}"; \
$(COPY) $(ROOT_DIR)/library/dde/pkgIndex.tcl \
"$(LIB_INSTALL_DIR)/dde${DDEDOTVER}"; \
fi
- @if [ -f $(DDE_DLL_FILE8) ]; then \
- echo Installing $(DDE_DLL_FILE8); \
- $(COPY) $(DDE_DLL_FILE8) "$(LIB_INSTALL_DIR)/dde${DDEDOTVER}"; \
- fi
@if [ -f $(DDE_LIB_FILE) ]; then \
echo Installing $(DDE_LIB_FILE); \
$(COPY) $(DDE_LIB_FILE) "$(LIB_INSTALL_DIR)/dde${DDEDOTVER}"; \
fi
@if [ -f $(REG_DLL_FILE) ]; then \
@@ -896,14 +882,10 @@
echo Installing $(REG_DLL_FILE); \
$(COPY) $(REG_DLL_FILE) "$(LIB_INSTALL_DIR)/registry${REGDOTVER}"; \
$(COPY) $(ROOT_DIR)/library/registry/pkgIndex.tcl \
"$(LIB_INSTALL_DIR)/registry${REGDOTVER}"; \
fi
- @if [ -f $(REG_DLL_FILE8) ]; then \
- echo Installing $(REG_DLL_FILE8); \
- $(COPY) $(REG_DLL_FILE8) "$(LIB_INSTALL_DIR)/registry${REGDOTVER}"; \
- fi
@if [ -f $(REG_LIB_FILE) ]; then \
echo Installing $(REG_LIB_FILE); \
$(COPY) $(REG_LIB_FILE) "$(LIB_INSTALL_DIR)/registry${REGDOTVER}"; \
fi
Index: win/README
==================================================================
--- win/README
+++ win/README
@@ -1,6 +1,6 @@
-Tcl 9.0 for Windows
+Tcl 9.1 for Windows
1. Introduction
---------------
This is the directory where you configure and compile the Windows
@@ -14,11 +14,11 @@
2. Compiling Tcl
----------------
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
Visual Studio 2015 or newer
Index: win/configure
==================================================================
--- win/configure
+++ win/configure
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for tcl 9.0.
+# Generated by GNU Autoconf 2.72 for tcl 9.1.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
# Inc.
#
@@ -599,12 +599,12 @@
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=''
ac_unique_file="../generic/tcl.h"
# Factoring default headers for most tests.
@@ -1355,11 +1355,11 @@
#
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]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
@@ -1417,11 +1417,11 @@
_ACEOF
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
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
@@ -1514,11 +1514,11 @@
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.72
Copyright (C) 2023 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -1724,11 +1724,11 @@
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.72. Invocation command line was
$ $0$ac_configure_args_raw
_ACEOF
@@ -2406,14 +2406,14 @@
# The following define is needed when building with Cygwin since newer
# versions of autoconf incorrectly set SHELL to /bin/bash instead of
# /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=".1"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
TCL_DDE_MAJOR_VERSION=1
TCL_DDE_MINOR_VERSION=4
@@ -6542,11 +6542,11 @@
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# 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.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
@@ -6597,11 +6597,11 @@
ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
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.72,
with options \\"\$ac_cs_config\\"
Copyright (C) 2023 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
Index: win/configure.ac
==================================================================
--- win/configure.ac
+++ win/configure.ac
@@ -1,23 +1,23 @@
#! /bin/bash -norc
# This file is an input file used by the GNU "autoconf" program to
# 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])
# The following define is needed when building with Cygwin since newer
# versions of autoconf incorrectly set SHELL to /bin/bash instead of
# /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=".1"
+TCL_MINOR_VERSION=1
+TCL_PATCH_LEVEL="a0"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
TCL_DDE_MAJOR_VERSION=1
TCL_DDE_MINOR_VERSION=4
Index: win/tcl.m4
==================================================================
--- win/tcl.m4
+++ win/tcl.m4
@@ -983,17 +983,17 @@
# Defines the following vars:
# TCL_BIN_DIR Full path to the tcl build dir.
#------------------------------------------------------------------------
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)
fi
if test ! -f $TCL_BIN_DIR/Makefile; then
Index: win/tclWinPipe.c
==================================================================
--- win/tclWinPipe.c
+++ win/tclWinPipe.c
@@ -2750,11 +2750,11 @@
int
Tcl_PidObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const *objv) /* Argument strings. */
{
Tcl_Channel chan;
const Tcl_ChannelType *chanTypePtr;
PipeInfo *pipePtr;
Index: win/tclWinTest.c
==================================================================
--- win/tclWinTest.c
+++ win/tclWinTest.c
@@ -36,17 +36,17 @@
/*
* 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;
/*
*----------------------------------------------------------------------
*
* TclplatformtestInit --
@@ -69,17 +69,17 @@
{
/*
* 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;
}
/*
*----------------------------------------------------------------------
@@ -101,11 +101,11 @@
static int
TesteventloopCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size 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. */
@@ -177,11 +177,11 @@
static int
TestvolumetypeCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
#define VOL_BUF_SIZE 32
int found;
char volType[VOL_BUF_SIZE];
@@ -243,11 +243,11 @@
static int
TestwinclockCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Argument count */
+ Tcl_Size objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
{
static const FILETIME posixEpoch = { 0xD53E8000, 0x019DB1DE };
/* The Posix epoch, expressed as a Windows
* FILETIME */
@@ -292,11 +292,11 @@
static int
TestwinsleepCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
int ms;
if (objc != 2) {
@@ -335,11 +335,11 @@
static int
TestExceptionCmd(
TCL_UNUSED(void *),
Tcl_Interp* interp, /* Tcl interpreter */
- int objc, /* Argument count */
+ Tcl_Size objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
{
static const char *const cmds[] = {
"access_violation", "datatype_misalignment", "array_bounds",
"float_denormal", "float_divbyzero", "float_inexact",
@@ -631,14 +631,15 @@
static int
TestchmodCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Parameter count */
+ Tcl_Size objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
- int i, mode;
+ Tcl_Size i;
+ int mode;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "mode file ?file ...?");
return TCL_ERROR;
}