summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/CrtObjCmd.32
-rw-r--r--doc/CrtTrace.34
-rw-r--r--generic/tcl.decls69
-rw-r--r--generic/tcl.h7
-rw-r--r--generic/tclBasic.c160
-rw-r--r--generic/tclBinary.c81
-rw-r--r--generic/tclCmdAH.c4
-rw-r--r--generic/tclDecls.h241
-rw-r--r--generic/tclExecute.c8
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclInt.decls3
-rw-r--r--generic/tclInt.h1
-rw-r--r--generic/tclIntDecls.h11
-rw-r--r--generic/tclOO.c16
-rw-r--r--generic/tclOO.decls36
-rw-r--r--generic/tclOO.h20
-rw-r--r--generic/tclOOCall.c6
-rw-r--r--generic/tclOODecls.h44
-rw-r--r--generic/tclOODefineCmds.c6
-rw-r--r--generic/tclOOInt.h11
-rw-r--r--generic/tclOOIntDecls.h28
-rw-r--r--generic/tclOOMethod.c140
-rw-r--r--generic/tclOOStubInit.c3
-rw-r--r--generic/tclObj.c56
-rw-r--r--generic/tclProc.c49
-rw-r--r--generic/tclStringObj.c36
-rw-r--r--generic/tclStubInit.c100
-rw-r--r--generic/tclTest.c41
-rw-r--r--generic/tclTestObj.c13
-rw-r--r--generic/tclTrace.c51
-rw-r--r--generic/tclZipfs.c2
-rw-r--r--generic/tclZlib.c28
-rw-r--r--tests/binary.test8
-rw-r--r--unix/dltest/pkgooa.c2
-rw-r--r--unix/dltest/pkgt.c8
35 files changed, 228 insertions, 1069 deletions
diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3
index 1481e81..bb63937 100644
--- a/doc/CrtObjCmd.3
+++ b/doc/CrtObjCmd.3
@@ -187,7 +187,7 @@ except its \fIproc2\fR argument is of type \fBTcl_ObjCmdProc2\fR.
typedef int \fBTcl_ObjCmdProc2\fR(
ClientData \fIclientData\fR,
Tcl_Interp *\fIinterp\fR,
- ptrdiff_t \fIobjc\fR,
+ Tcl_Size \fIobjc\fR,
Tcl_Obj *const \fIobjv\fR[]);
.CE
.PP
diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3
index ba5a991..519f348 100644
--- a/doc/CrtTrace.3
+++ b/doc/CrtTrace.3
@@ -88,10 +88,10 @@ typedef int \fBTcl_CmdObjTraceProc\fR(
typedef int \fBTcl_CmdObjTraceProc2\fR(
\fBvoid *\fR \fIclientData\fR,
\fBTcl_Interp\fR* \fIinterp\fR,
- ptrdiff_t \fIlevel\fR,
+ Tcl_Size \fIlevel\fR,
const char *\fIcommand\fR,
\fBTcl_Command\fR \fIcommandToken\fR,
- ptrdiff_t \fIobjc\fR,
+ Tcl_Size \fIobjc\fR,
\fBTcl_Obj\fR *const \fIobjv\fR[]);
.CE
.PP
diff --git a/generic/tcl.decls b/generic/tcl.decls
index b5146fa..5cf0f34 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -2408,24 +2408,8 @@ declare 648 {
# TIP #568
declare 649 {
- unsigned char *TclGetBytesFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
- int *numBytesPtr)
-}
-declare 650 {
unsigned char *Tcl_GetBytesFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
- void *numBytesPtr)
-}
-
-# TIP #481
-declare 651 {
- char *TclGetStringFromObj(Tcl_Obj *objPtr, void *lengthPtr)
-}
-declare 652 {
- unsigned short *TclGetUnicodeFromObj(Tcl_Obj *objPtr, void *lengthPtr)
-}
-# Only available in Tcl 8.x, NULL in Tcl 9.0
-declare 653 {
- unsigned char *TclGetByteArrayFromObj(Tcl_Obj *objPtr, void *numBytesPtr)
+ Tcl_Size *numBytesPtr)
}
# TIP #575
@@ -2459,33 +2443,6 @@ declare 660 {
int Tcl_AsyncMarkFromSignal(Tcl_AsyncHandler async, int sigNumber)
}
-# TIP #616
-declare 661 {
- int TclListObjGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr,
- void *objcPtr, Tcl_Obj ***objvPtr)
-}
-declare 662 {
- int TclListObjLength(Tcl_Interp *interp, Tcl_Obj *listPtr,
- void *lengthPtr)
-}
-declare 663 {
- int TclDictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr, void *sizePtr)
-}
-declare 664 {
- int TclSplitList(Tcl_Interp *interp, const char *listStr, void *argcPtr,
- const char ***argvPtr)
-}
-declare 665 {
- void TclSplitPath(const char *path, void *argcPtr, const char ***argvPtr)
-}
-declare 666 {
- Tcl_Obj *TclFSSplitPath(Tcl_Obj *pathPtr, void *lenPtr)
-}
-declare 667 {
- int TclParseArgsObjv(Tcl_Interp *interp, const Tcl_ArgvInfo *argTable,
- void *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv)
-}
-
# TIP #617
declare 668 {
Tcl_Size Tcl_UniCharLen(const int *uniStr)
@@ -2514,35 +2471,13 @@ declare 675 {
int Tcl_GetBoolFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
int flags, char *charPtr)
}
-declare 676 {
- Tcl_Command Tcl_CreateObjCommand2(Tcl_Interp *interp,
- const char *cmdName,
- Tcl_ObjCmdProc2 *proc2, void *clientData,
- Tcl_CmdDeleteProc *deleteProc)
-}
-declare 677 {
- Tcl_Trace Tcl_CreateObjTrace2(Tcl_Interp *interp, Tcl_Size level, int flags,
- Tcl_CmdObjTraceProc2 *objProc2, void *clientData,
- Tcl_CmdObjTraceDeleteProc *delProc)
-}
-declare 678 {
- Tcl_Command Tcl_NRCreateCommand2(Tcl_Interp *interp,
- const char *cmdName, Tcl_ObjCmdProc2 *proc,
- Tcl_ObjCmdProc2 *nreProc2, void *clientData,
- Tcl_CmdDeleteProc *deleteProc)
-}
-declare 679 {
- int Tcl_NRCallObjProc2(Tcl_Interp *interp, Tcl_ObjCmdProc2 *objProc2,
- void *clientData, ptrdiff_t objc, Tcl_Obj *const objv[])
-}
-
# TIP #638.
declare 680 {
int Tcl_GetNumberFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
void **clientDataPtr, int *typePtr)
}
declare 681 {
- int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes, ptrdiff_t numBytes,
+ int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes, Tcl_Size numBytes,
void **clientDataPtr, int *typePtr)
}
diff --git a/generic/tcl.h b/generic/tcl.h
index cdcd909..d96b8aa 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -706,9 +706,7 @@ typedef void (Tcl_CmdTraceProc) (void *clientData, Tcl_Interp *interp,
typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp,
int level, const char *command, Tcl_Command commandInfo, int objc,
struct Tcl_Obj *const *objv);
-typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
- ptrdiff_t level, const char *command, Tcl_Command commandInfo, ptrdiff_t objc,
- struct Tcl_Obj *const *objv);
+#define Tcl_CmdObjTraceProc2 Tcl_CmdObjTraceProc
typedef void (Tcl_CmdObjTraceDeleteProc) (void *clientData);
typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
struct Tcl_Obj *dupPtr);
@@ -733,8 +731,7 @@ typedef int (Tcl_MathProc) (void *clientData, Tcl_Interp *interp,
typedef void (Tcl_NamespaceDeleteProc) (void *clientData);
typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp,
int objc, struct Tcl_Obj *const *objv);
-typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
- ptrdiff_t objc, struct Tcl_Obj *const *objv);
+#define Tcl_ObjCmdProc2 Tcl_ObjCmdProc
typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
typedef void (Tcl_PanicProc) (const char *format, ...);
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index f207a3e..0650673 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -2687,66 +2687,6 @@ Tcl_CreateCommand(
*----------------------------------------------------------------------
*/
-typedef struct {
- Tcl_ObjCmdProc2 *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;
-} CmdWrapperInfo;
-
-
-static int cmdWrapperProc(void *clientData,
- Tcl_Interp *interp,
- int objc,
- Tcl_Obj * const *objv)
-{
- CmdWrapperInfo *info = (CmdWrapperInfo *)clientData;
- if (objc < 0) {
- objc = -1;
- }
- return info->proc(info->clientData, interp, objc, objv);
-}
-
-static void cmdWrapperDeleteProc(void *clientData) {
- CmdWrapperInfo *info = (CmdWrapperInfo *)clientData;
-
- clientData = info->deleteData;
- Tcl_CmdDeleteProc *deleteProc = info->deleteProc;
- ckfree(info);
- if (deleteProc != NULL) {
- deleteProc(clientData);
- }
-}
-
-Tcl_Command
-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_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
- * this command is deleted. */
-)
-{
- CmdWrapperInfo *info = (CmdWrapperInfo *)ckalloc(sizeof(CmdWrapperInfo));
- info->proc = proc;
- info->clientData = clientData;
- info->deleteProc = deleteProc;
- info->deleteData = clientData;
-
- return Tcl_CreateObjCommand(interp, cmdName,
- (proc ? cmdWrapperProc : NULL),
- info, cmdWrapperDeleteProc);
-}
-
Tcl_Command
Tcl_CreateObjCommand(
Tcl_Interp *interp, /* Token for command interpreter (returned by
@@ -3380,14 +3320,8 @@ Tcl_SetCommandInfoFromToken(
}
cmdPtr->objClientData = infoPtr->objClientData;
}
- if (cmdPtr->deleteProc == cmdWrapperDeleteProc) {
- CmdWrapperInfo *info = (CmdWrapperInfo *)cmdPtr->deleteData;
- info->deleteProc = infoPtr->deleteProc;
- info->deleteData = infoPtr->deleteData;
- } else {
- cmdPtr->deleteProc = infoPtr->deleteProc;
- cmdPtr->deleteData = infoPtr->deleteData;
- }
+ cmdPtr->deleteProc = infoPtr->deleteProc;
+ cmdPtr->deleteData = infoPtr->deleteData;
return 1;
}
@@ -3464,14 +3398,8 @@ Tcl_GetCommandInfoFromToken(
infoPtr->objClientData = cmdPtr->objClientData;
infoPtr->proc = cmdPtr->proc;
infoPtr->clientData = cmdPtr->clientData;
- if (cmdPtr->deleteProc == cmdWrapperDeleteProc) {
- CmdWrapperInfo *info = (CmdWrapperInfo *)cmdPtr->deleteData;
- infoPtr->deleteProc = info->deleteProc;
- infoPtr->deleteData = info->deleteData;
- } else {
- infoPtr->deleteProc = cmdPtr->deleteProc;
- infoPtr->deleteData = cmdPtr->deleteData;
- }
+ infoPtr->deleteProc = cmdPtr->deleteProc;
+ infoPtr->deleteData = cmdPtr->deleteData;
infoPtr->namespacePtr = (Tcl_Namespace *) cmdPtr->nsPtr;
return 1;
}
@@ -9170,42 +9098,6 @@ Tcl_NRCallObjProc(
return TclNRRunCallbacks(interp, TCL_OK, rootPtr);
}
-int wrapperNRObjProc(
- void *clientData,
- Tcl_Interp *interp,
- int objc,
- Tcl_Obj *const objv[])
-{
- CmdWrapperInfo *info = (CmdWrapperInfo *)clientData;
- clientData = info->clientData;
- Tcl_ObjCmdProc2 *proc = info->proc;
- ckfree(info);
- return proc(clientData, interp, objc, objv);
-}
-
-int
-Tcl_NRCallObjProc2(
- Tcl_Interp *interp,
- Tcl_ObjCmdProc2 *objProc,
- void *clientData,
- ptrdiff_t objc,
- Tcl_Obj *const objv[])
-{
- if ((size_t)objc > INT_MAX) {
- Tcl_WrongNumArgs(interp, 1, objv, "?args?");
- return TCL_ERROR;
- }
-
- NRE_callback *rootPtr = TOP_CB(interp);
- CmdWrapperInfo *info = (CmdWrapperInfo *)ckalloc(sizeof(CmdWrapperInfo));
- info->clientData = clientData;
- info->proc = objProc;
-
- TclNRAddCallback(interp, Dispatch, wrapperNRObjProc, info,
- INT2PTR(objc), objv);
- return TclNRRunCallbacks(interp, TCL_OK, rootPtr);
-}
-
/*
*----------------------------------------------------------------------
*
@@ -9234,50 +9126,6 @@ Tcl_NRCallObjProc2(
*----------------------------------------------------------------------
*/
-static int cmdWrapperNreProc(
- void *clientData,
- Tcl_Interp *interp,
- int 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 *)ckalloc(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
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 183d545..6fde660 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -400,7 +400,7 @@ Tcl_SetByteArrayObj(
/*
*----------------------------------------------------------------------
*
- * Tcl_GetBytesFromObj/TclGetBytesFromObj --
+ * Tcl_GetBytesFromObj --
*
* Attempt to extract the value from objPtr in the representation
* of a byte sequence. On success return the extracted byte sequence.
@@ -415,7 +415,7 @@ Tcl_SetByteArrayObj(
*/
unsigned char *
-TclGetBytesFromObj(
+Tcl_GetBytesFromObj(
Tcl_Interp *interp, /* For error reporting */
Tcl_Obj *objPtr, /* Value to extract from */
int *numBytesPtr) /* If non-NULL, write the number of bytes
@@ -452,50 +452,11 @@ TclGetBytesFromObj(
}
return baPtr->bytes;
}
-#undef Tcl_GetBytesFromObj
-unsigned char *
-Tcl_GetBytesFromObj(
- Tcl_Interp *interp, /* For error reporting */
- Tcl_Obj *objPtr, /* Value to extract from */
- void *numBytesPtr) /* If non-NULL, write the number of bytes
- * in the array here */
-{
- ByteArray *baPtr;
- const Tcl_ObjInternalRep *irPtr = TclFetchInternalRep(objPtr, &properByteArrayType);
-
- if (irPtr == NULL) {
- SetByteArrayFromAny(NULL, objPtr);
- irPtr = TclFetchInternalRep(objPtr, &properByteArrayType);
- if (irPtr == NULL) {
- if (interp) {
- const char *nonbyte;
- int ucs4;
-
- irPtr = TclFetchInternalRep(objPtr, &tclByteArrayType);
- baPtr = GET_BYTEARRAY(irPtr);
- nonbyte = TclUtfAtIndex(Tcl_GetString(objPtr), baPtr->bad);
- TclUtfToUCS4(nonbyte, &ucs4);
-
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "expected byte sequence but character %d "
- "was '%1s' (U+%06X)", baPtr->bad, nonbyte, ucs4));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "BYTES", NULL);
- }
- return NULL;
- }
- }
- baPtr = GET_BYTEARRAY(irPtr);
-
- if (numBytesPtr != NULL) {
- *(ptrdiff_t *)numBytesPtr = baPtr->used;
- }
- return baPtr->bytes;
-}
/*
*----------------------------------------------------------------------
*
- * Tcl_GetByteArrayFromObj/TclGetByteArrayFromObj --
+ * Tcl_GetByteArrayFromObj --
*
* Attempt to get the array of bytes from the Tcl object. If the object
* is not already a ByteArray object, an attempt will be made to convert
@@ -519,7 +480,7 @@ Tcl_GetByteArrayFromObj(
{
ByteArray *baPtr;
const Tcl_ObjInternalRep *irPtr;
- unsigned char *result = TclGetBytesFromObj(NULL, objPtr, numBytesPtr);
+ unsigned char *result = Tcl_GetBytesFromObj(NULL, objPtr, numBytesPtr);
if (result) {
return result;
@@ -535,32 +496,6 @@ Tcl_GetByteArrayFromObj(
}
return (unsigned char *) baPtr->bytes;
}
-
-unsigned char *
-TclGetByteArrayFromObj(
- Tcl_Obj *objPtr, /* The ByteArray object. */
- void *numBytesPtr) /* If non-NULL, write the number of bytes
- * in the array here */
-{
- ByteArray *baPtr;
- const Tcl_ObjInternalRep *irPtr;
- unsigned char *result = Tcl_GetBytesFromObj(NULL, objPtr, numBytesPtr);
-
- if (result) {
- return result;
- }
-
- irPtr = TclFetchInternalRep(objPtr, &tclByteArrayType);
- assert(irPtr != NULL);
-
- baPtr = GET_BYTEARRAY(irPtr);
-
- if (numBytesPtr != NULL) {
- /* Make sure we return a value between 0 and UINT_MAX-1, or (ptrdiff_t)-1 */
- *(ptrdiff_t *)numBytesPtr = ((ptrdiff_t)(unsigned int)(baPtr->used + 1)) - 1;
- }
- return baPtr->bytes;
-}
/*
*----------------------------------------------------------------------
@@ -2665,7 +2600,7 @@ BinaryDecodeHex(
}
TclNewObj(resultObj);
- data = TclGetBytesFromObj(NULL, objv[objc - 1], &count);
+ data = Tcl_GetBytesFromObj(NULL, objv[objc - 1], &count);
if (data == NULL) {
pure = 0;
data = (unsigned char *) TclGetStringFromObj(objv[objc - 1], &count);
@@ -2797,7 +2732,7 @@ BinaryEncode64(
}
break;
case OPT_WRAPCHAR:
- wrapchar = (const char *)TclGetBytesFromObj(NULL,
+ wrapchar = (const char *)Tcl_GetBytesFromObj(NULL,
objv[i + 1], &wrapcharlen);
if (wrapchar == NULL) {
purewrap = 0;
@@ -3061,7 +2996,7 @@ BinaryDecodeUu(
}
TclNewObj(resultObj);
- data = TclGetBytesFromObj(NULL, objv[objc - 1], &count);
+ data = Tcl_GetBytesFromObj(NULL, objv[objc - 1], &count);
if (data == NULL) {
pure = 0;
data = (unsigned char *) TclGetStringFromObj(objv[objc - 1], &count);
@@ -3235,7 +3170,7 @@ BinaryDecode64(
}
TclNewObj(resultObj);
- data = TclGetBytesFromObj(NULL, objv[objc - 1], &count);
+ data = Tcl_GetBytesFromObj(NULL, objv[objc - 1], &count);
if (data == NULL) {
pure = 0;
data = (unsigned char *) TclGetStringFromObj(objv[objc - 1], &count);
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index ea5df68..429b673 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -679,7 +679,7 @@ EncodingConvertfromObjCmd(
bytesPtr = (char *) Tcl_GetByteArrayFromObj(data, &length);
} else
#endif
- bytesPtr = (char *) TclGetBytesFromObj(interp, data, &length);
+ bytesPtr = (char *) Tcl_GetBytesFromObj(interp, data, &length);
if (bytesPtr == NULL) {
return TCL_ERROR;
@@ -2197,7 +2197,7 @@ PathSplitCmd(
Tcl_WrongNumArgs(interp, 1, objv, "name");
return TCL_ERROR;
}
- res = Tcl_FSSplitPath(objv[1], (Tcl_Size *)NULL);
+ res = Tcl_FSSplitPath(objv[1], NULL);
if (res == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"could not read \"%s\": no such file or directory",
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index c19b2c0..6feb639 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1932,19 +1932,12 @@ EXTERN char * Tcl_UniCharToUtfDString(const int *uniStr,
EXTERN int * Tcl_UtfToUniCharDString(const char *src,
Tcl_Size length, Tcl_DString *dsPtr);
/* 649 */
-EXTERN unsigned char * TclGetBytesFromObj(Tcl_Interp *interp,
- Tcl_Obj *objPtr, int *numBytesPtr);
-/* 650 */
EXTERN unsigned char * Tcl_GetBytesFromObj(Tcl_Interp *interp,
- Tcl_Obj *objPtr, void *numBytesPtr);
-/* 651 */
-EXTERN char * TclGetStringFromObj(Tcl_Obj *objPtr, void *lengthPtr);
-/* 652 */
-EXTERN unsigned short * TclGetUnicodeFromObj(Tcl_Obj *objPtr,
- void *lengthPtr);
-/* 653 */
-EXTERN unsigned char * TclGetByteArrayFromObj(Tcl_Obj *objPtr,
- void *numBytesPtr);
+ Tcl_Obj *objPtr, Tcl_Size *numBytesPtr);
+/* Slot 650 is reserved */
+/* Slot 651 is reserved */
+/* Slot 652 is reserved */
+/* Slot 653 is reserved */
/* 654 */
EXTERN int Tcl_UtfCharComplete(const char *src, Tcl_Size length);
/* 655 */
@@ -1968,28 +1961,13 @@ EXTERN int Tcl_UtfToExternalDStringEx(Tcl_Interp *interp,
/* 660 */
EXTERN int Tcl_AsyncMarkFromSignal(Tcl_AsyncHandler async,
int sigNumber);
-/* 661 */
-EXTERN int TclListObjGetElements(Tcl_Interp *interp,
- Tcl_Obj *listPtr, void *objcPtr,
- Tcl_Obj ***objvPtr);
-/* 662 */
-EXTERN int TclListObjLength(Tcl_Interp *interp,
- Tcl_Obj *listPtr, void *lengthPtr);
-/* 663 */
-EXTERN int TclDictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr,
- void *sizePtr);
-/* 664 */
-EXTERN int TclSplitList(Tcl_Interp *interp, const char *listStr,
- void *argcPtr, const char ***argvPtr);
-/* 665 */
-EXTERN void TclSplitPath(const char *path, void *argcPtr,
- const char ***argvPtr);
-/* 666 */
-EXTERN Tcl_Obj * TclFSSplitPath(Tcl_Obj *pathPtr, void *lenPtr);
-/* 667 */
-EXTERN int TclParseArgsObjv(Tcl_Interp *interp,
- const Tcl_ArgvInfo *argTable, void *objcPtr,
- Tcl_Obj *const *objv, Tcl_Obj ***remObjv);
+/* Slot 661 is reserved */
+/* Slot 662 is reserved */
+/* Slot 663 is reserved */
+/* Slot 664 is reserved */
+/* Slot 665 is reserved */
+/* Slot 666 is reserved */
+/* Slot 667 is reserved */
/* 668 */
EXTERN Tcl_Size Tcl_UniCharLen(const int *uniStr);
/* 669 */
@@ -2009,33 +1987,17 @@ EXTERN int Tcl_GetBool(Tcl_Interp *interp, const char *src,
/* 675 */
EXTERN int Tcl_GetBoolFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, int flags, char *charPtr);
-/* 676 */
-EXTERN Tcl_Command Tcl_CreateObjCommand2(Tcl_Interp *interp,
- const char *cmdName, Tcl_ObjCmdProc2 *proc2,
- void *clientData,
- Tcl_CmdDeleteProc *deleteProc);
-/* 677 */
-EXTERN Tcl_Trace Tcl_CreateObjTrace2(Tcl_Interp *interp,
- Tcl_Size level, int flags,
- Tcl_CmdObjTraceProc2 *objProc2,
- void *clientData,
- Tcl_CmdObjTraceDeleteProc *delProc);
-/* 678 */
-EXTERN Tcl_Command Tcl_NRCreateCommand2(Tcl_Interp *interp,
- const char *cmdName, Tcl_ObjCmdProc2 *proc,
- Tcl_ObjCmdProc2 *nreProc2, void *clientData,
- Tcl_CmdDeleteProc *deleteProc);
-/* 679 */
-EXTERN int Tcl_NRCallObjProc2(Tcl_Interp *interp,
- Tcl_ObjCmdProc2 *objProc2, void *clientData,
- ptrdiff_t objc, Tcl_Obj *const objv[]);
+/* Slot 676 is reserved */
+/* Slot 677 is reserved */
+/* Slot 678 is reserved */
+/* Slot 679 is reserved */
/* 680 */
EXTERN int Tcl_GetNumberFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, void **clientDataPtr,
int *typePtr);
/* 681 */
EXTERN int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes,
- ptrdiff_t numBytes, void **clientDataPtr,
+ Tcl_Size numBytes, void **clientDataPtr,
int *typePtr);
/* 682 */
EXTERN int Tcl_RemoveChannelMode(Tcl_Interp *interp,
@@ -2735,11 +2697,11 @@ typedef struct TclStubs {
Tcl_Size (*tcl_UtfToUniChar) (const char *src, int *chPtr); /* 646 */
char * (*tcl_UniCharToUtfDString) (const int *uniStr, Tcl_Size uniLength, Tcl_DString *dsPtr); /* 647 */
int * (*tcl_UtfToUniCharDString) (const char *src, Tcl_Size length, Tcl_DString *dsPtr); /* 648 */
- unsigned char * (*tclGetBytesFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *numBytesPtr); /* 649 */
- unsigned char * (*tcl_GetBytesFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, void *numBytesPtr); /* 650 */
- char * (*tclGetStringFromObj) (Tcl_Obj *objPtr, void *lengthPtr); /* 651 */
- unsigned short * (*tclGetUnicodeFromObj) (Tcl_Obj *objPtr, void *lengthPtr); /* 652 */
- unsigned char * (*tclGetByteArrayFromObj) (Tcl_Obj *objPtr, void *numBytesPtr); /* 653 */
+ unsigned char * (*tcl_GetBytesFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *numBytesPtr); /* 649 */
+ void (*reserved650)(void);
+ void (*reserved651)(void);
+ void (*reserved652)(void);
+ void (*reserved653)(void);
int (*tcl_UtfCharComplete) (const char *src, Tcl_Size length); /* 654 */
const char * (*tcl_UtfNext) (const char *src); /* 655 */
const char * (*tcl_UtfPrev) (const char *src, const char *start); /* 656 */
@@ -2747,13 +2709,13 @@ typedef struct TclStubs {
int (*tcl_ExternalToUtfDStringEx) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr, Tcl_Size *errorLocationPtr); /* 658 */
int (*tcl_UtfToExternalDStringEx) (Tcl_Interp *interp, Tcl_Encoding encoding, const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr, Tcl_Size *errorLocationPtr); /* 659 */
int (*tcl_AsyncMarkFromSignal) (Tcl_AsyncHandler async, int sigNumber); /* 660 */
- int (*tclListObjGetElements) (Tcl_Interp *interp, Tcl_Obj *listPtr, void *objcPtr, Tcl_Obj ***objvPtr); /* 661 */
- int (*tclListObjLength) (Tcl_Interp *interp, Tcl_Obj *listPtr, void *lengthPtr); /* 662 */
- int (*tclDictObjSize) (Tcl_Interp *interp, Tcl_Obj *dictPtr, void *sizePtr); /* 663 */
- int (*tclSplitList) (Tcl_Interp *interp, const char *listStr, void *argcPtr, const char ***argvPtr); /* 664 */
- void (*tclSplitPath) (const char *path, void *argcPtr, const char ***argvPtr); /* 665 */
- Tcl_Obj * (*tclFSSplitPath) (Tcl_Obj *pathPtr, void *lenPtr); /* 666 */
- int (*tclParseArgsObjv) (Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, void *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv); /* 667 */
+ void (*reserved661)(void);
+ void (*reserved662)(void);
+ void (*reserved663)(void);
+ void (*reserved664)(void);
+ void (*reserved665)(void);
+ void (*reserved666)(void);
+ void (*reserved667)(void);
Tcl_Size (*tcl_UniCharLen) (const int *uniStr); /* 668 */
Tcl_Size (*tclNumUtfChars) (const char *src, Tcl_Size length); /* 669 */
Tcl_Size (*tclGetCharLength) (Tcl_Obj *objPtr); /* 670 */
@@ -2762,12 +2724,12 @@ typedef struct TclStubs {
int (*tclGetUniChar) (Tcl_Obj *objPtr, Tcl_Size index); /* 673 */
int (*tcl_GetBool) (Tcl_Interp *interp, const char *src, int flags, char *charPtr); /* 674 */
int (*tcl_GetBoolFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, char *charPtr); /* 675 */
- Tcl_Command (*tcl_CreateObjCommand2) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc2 *proc2, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 676 */
- Tcl_Trace (*tcl_CreateObjTrace2) (Tcl_Interp *interp, Tcl_Size level, int flags, Tcl_CmdObjTraceProc2 *objProc2, void *clientData, Tcl_CmdObjTraceDeleteProc *delProc); /* 677 */
- Tcl_Command (*tcl_NRCreateCommand2) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc2 *proc, Tcl_ObjCmdProc2 *nreProc2, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 678 */
- int (*tcl_NRCallObjProc2) (Tcl_Interp *interp, Tcl_ObjCmdProc2 *objProc2, void *clientData, ptrdiff_t objc, Tcl_Obj *const objv[]); /* 679 */
+ void (*reserved676)(void);
+ void (*reserved677)(void);
+ void (*reserved678)(void);
+ void (*reserved679)(void);
int (*tcl_GetNumberFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, void **clientDataPtr, int *typePtr); /* 680 */
- int (*tcl_GetNumber) (Tcl_Interp *interp, const char *bytes, ptrdiff_t numBytes, void **clientDataPtr, int *typePtr); /* 681 */
+ int (*tcl_GetNumber) (Tcl_Interp *interp, const char *bytes, Tcl_Size numBytes, void **clientDataPtr, int *typePtr); /* 681 */
int (*tcl_RemoveChannelMode) (Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 682 */
Tcl_Size (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */
int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */
@@ -4103,16 +4065,12 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_UniCharToUtfDString) /* 647 */
#define Tcl_UtfToUniCharDString \
(tclStubsPtr->tcl_UtfToUniCharDString) /* 648 */
-#define TclGetBytesFromObj \
- (tclStubsPtr->tclGetBytesFromObj) /* 649 */
#define Tcl_GetBytesFromObj \
- (tclStubsPtr->tcl_GetBytesFromObj) /* 650 */
-#define TclGetStringFromObj \
- (tclStubsPtr->tclGetStringFromObj) /* 651 */
-#define TclGetUnicodeFromObj \
- (tclStubsPtr->tclGetUnicodeFromObj) /* 652 */
-#define TclGetByteArrayFromObj \
- (tclStubsPtr->tclGetByteArrayFromObj) /* 653 */
+ (tclStubsPtr->tcl_GetBytesFromObj) /* 649 */
+/* Slot 650 is reserved */
+/* Slot 651 is reserved */
+/* Slot 652 is reserved */
+/* Slot 653 is reserved */
#define Tcl_UtfCharComplete \
(tclStubsPtr->tcl_UtfCharComplete) /* 654 */
#define Tcl_UtfNext \
@@ -4127,20 +4085,13 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_UtfToExternalDStringEx) /* 659 */
#define Tcl_AsyncMarkFromSignal \
(tclStubsPtr->tcl_AsyncMarkFromSignal) /* 660 */
-#define TclListObjGetElements \
- (tclStubsPtr->tclListObjGetElements) /* 661 */
-#define TclListObjLength \
- (tclStubsPtr->tclListObjLength) /* 662 */
-#define TclDictObjSize \
- (tclStubsPtr->tclDictObjSize) /* 663 */
-#define TclSplitList \
- (tclStubsPtr->tclSplitList) /* 664 */
-#define TclSplitPath \
- (tclStubsPtr->tclSplitPath) /* 665 */
-#define TclFSSplitPath \
- (tclStubsPtr->tclFSSplitPath) /* 666 */
-#define TclParseArgsObjv \
- (tclStubsPtr->tclParseArgsObjv) /* 667 */
+/* Slot 661 is reserved */
+/* Slot 662 is reserved */
+/* Slot 663 is reserved */
+/* Slot 664 is reserved */
+/* Slot 665 is reserved */
+/* Slot 666 is reserved */
+/* Slot 667 is reserved */
#define Tcl_UniCharLen \
(tclStubsPtr->tcl_UniCharLen) /* 668 */
#define TclNumUtfChars \
@@ -4157,14 +4108,10 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_GetBool) /* 674 */
#define Tcl_GetBoolFromObj \
(tclStubsPtr->tcl_GetBoolFromObj) /* 675 */
-#define Tcl_CreateObjCommand2 \
- (tclStubsPtr->tcl_CreateObjCommand2) /* 676 */
-#define Tcl_CreateObjTrace2 \
- (tclStubsPtr->tcl_CreateObjTrace2) /* 677 */
-#define Tcl_NRCreateCommand2 \
- (tclStubsPtr->tcl_NRCreateCommand2) /* 678 */
-#define Tcl_NRCallObjProc2 \
- (tclStubsPtr->tcl_NRCallObjProc2) /* 679 */
+/* Slot 676 is reserved */
+/* Slot 677 is reserved */
+/* Slot 678 is reserved */
+/* Slot 679 is reserved */
#define Tcl_GetNumberFromObj \
(tclStubsPtr->tcl_GetNumberFromObj) /* 680 */
#define Tcl_GetNumber \
@@ -4378,21 +4325,13 @@ extern const TclStubs *tclStubsPtr;
#undef Tcl_GetString
#undef Tcl_GetUnicode
#define Tcl_GetString(objPtr) \
- Tcl_GetStringFromObj(objPtr, (Tcl_Size *)NULL)
+ Tcl_GetStringFromObj(objPtr, NULL)
#define Tcl_GetUnicode(objPtr) \
- Tcl_GetUnicodeFromObj(objPtr, (Tcl_Size *)NULL)
-#undef Tcl_GetBytesFromObj
+ Tcl_GetUnicodeFromObj(objPtr, NULL)
#undef Tcl_GetIndexFromObjStruct
#undef Tcl_GetBooleanFromObj
#undef Tcl_GetBoolean
-#ifdef TCL_NO_DEPRECATED
-#undef Tcl_GetStringFromObj
-#undef Tcl_GetUnicodeFromObj
-#undef Tcl_GetByteArrayFromObj
-#endif
#if defined(USE_TCL_STUBS)
-#define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? tclStubsPtr->tclGetBytesFromObj(interp, objPtr, (int *)(sizePtr)) : tclStubsPtr->tcl_GetBytesFromObj(interp, objPtr, (sizePtr)))
#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) \
@@ -4401,17 +4340,7 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_GetBoolean(interp, src, boolPtr) \
(sizeof(*(boolPtr)) == sizeof(int) ? tclStubsPtr->tcl_GetBoolean(interp, src, (int *)(boolPtr)) : \
Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)))
-#ifdef TCL_NO_DEPRECATED
-#define Tcl_GetStringFromObj(objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? tclStubsPtr->tcl_GetStringFromObj(objPtr, (int *)(sizePtr)) : tclStubsPtr->tclGetStringFromObj(objPtr, (sizePtr)))
-#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? tclStubsPtr->tcl_GetByteArrayFromObj(objPtr, (int *)(sizePtr)) : tclStubsPtr->tclGetByteArrayFromObj(objPtr, (sizePtr)))
-#define Tcl_GetUnicodeFromObj(objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? tclStubsPtr->tcl_GetUnicodeFromObj(objPtr, (int *)(sizePtr)) : tclStubsPtr->tclGetUnicodeFromObj(objPtr, (sizePtr)))
-#endif
#else
-#define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? (TclGetBytesFromObj)(interp, objPtr, (int *)(sizePtr)) : (Tcl_GetBytesFromObj)(interp, objPtr, (sizePtr)))
#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) \
@@ -4420,14 +4349,6 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_GetBoolean(interp, src, boolPtr) \
(sizeof(*(boolPtr)) == sizeof(int) ? Tcl_GetBoolean(interp, src, (int *)(boolPtr)) : \
Tcl_GetBool(interp, src, (TCL_NULL_OK-2)&(int)sizeof((*(boolPtr))), (char *)(boolPtr)))
-#ifdef TCL_NO_DEPRECATED
-#define Tcl_GetStringFromObj(objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? (Tcl_GetStringFromObj)(objPtr, (int *)(sizePtr)) : (TclGetStringFromObj)(objPtr, (sizePtr)))
-#define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? (Tcl_GetByteArrayFromObj)(objPtr, (int *)(sizePtr)) : TclGetByteArrayFromObj(objPtr, (sizePtr)))
-#define Tcl_GetUnicodeFromObj(objPtr, sizePtr) \
- (sizeof(*(sizePtr)) <= sizeof(int) ? (Tcl_GetUnicodeFromObj)(objPtr, (int *)(sizePtr)) : TclGetUnicodeFromObj(objPtr, (sizePtr)))
-#endif
#endif
#undef Tcl_NewLongObj
@@ -4479,36 +4400,6 @@ extern const TclStubs *tclStubsPtr;
# define Tcl_WCharLen (sizeof(wchar_t) != sizeof(short) \
? (Tcl_Size (*)(wchar_t *))tclStubsPtr->tcl_UniCharLen \
: (Tcl_Size (*)(wchar_t *))Tcl_Char16Len)
-#ifdef TCL_NO_DEPRECATED
-# undef Tcl_ListObjGetElements
-# define Tcl_ListObjGetElements(interp, listPtr, objcPtr, objvPtr) (sizeof(*(objcPtr)) == sizeof(int) \
- ? tclStubsPtr->tcl_ListObjGetElements((interp), (listPtr), (int *)(void *)(objcPtr), (objvPtr)) \
- : tclStubsPtr->tclListObjGetElements((interp), (listPtr), (objcPtr), (objvPtr)))
-# undef Tcl_ListObjLength
-# define Tcl_ListObjLength(interp, listPtr, lengthPtr) (sizeof(*(lengthPtr)) == sizeof(int) \
- ? tclStubsPtr->tcl_ListObjLength((interp), (listPtr), (int *)(void *)(lengthPtr)) \
- : tclStubsPtr->tclListObjLength((interp), (listPtr), (lengthPtr)))
-# undef Tcl_DictObjSize
-# define Tcl_DictObjSize(interp, dictPtr, sizePtr) (sizeof(*(sizePtr)) == sizeof(int) \
- ? tclStubsPtr->tcl_DictObjSize((interp), (dictPtr), (int *)(void *)(sizePtr)) \
- : tclStubsPtr->tclDictObjSize((interp), (dictPtr), (sizePtr)))
-# undef Tcl_SplitList
-# define Tcl_SplitList(interp, listStr, argcPtr, argvPtr) (sizeof(*(argcPtr)) == sizeof(int) \
- ? tclStubsPtr->tcl_SplitList((interp), (listStr), (int *)(void *)(argcPtr), (argvPtr)) \
- : tclStubsPtr->tclSplitList((interp), (listStr), (argcPtr), (argvPtr)))
-# undef Tcl_SplitPath
-# define Tcl_SplitPath(path, argcPtr, argvPtr) (sizeof(*(argcPtr)) == sizeof(int) \
- ? tclStubsPtr->tcl_SplitPath((path), (int *)(void *)(argcPtr), (argvPtr)) \
- : tclStubsPtr->tclSplitPath((path), (argcPtr), (argvPtr)))
-# undef Tcl_FSSplitPath
-# define Tcl_FSSplitPath(pathPtr, lenPtr) (sizeof(*(lenPtr)) == sizeof(int) \
- ? tclStubsPtr->tcl_FSSplitPath((pathPtr), (int *)(void *)(lenPtr)) \
- : tclStubsPtr->tclFSSplitPath((pathPtr), (lenPtr)))
-# undef Tcl_ParseArgsObjv
-# define Tcl_ParseArgsObjv(interp, argTable, objcPtr, objv, remObjv) (sizeof(*(objcPtr)) == sizeof(int) \
- ? tclStubsPtr->tcl_ParseArgsObjv((interp), (argTable), (int *)(void *)(objcPtr), (objv), (remObjv)) \
- : tclStubsPtr->tclParseArgsObjv((interp), (argTable), (objcPtr), (objv), (remObjv)))
-#endif /* TCL_NO_DEPRECATED */
#else /* !defined(USE_TCL_STUBS) */
# define Tcl_WCharToUtfDString (sizeof(wchar_t) != sizeof(short) \
? (char *(*)(const wchar_t *, Tcl_Size, Tcl_DString *))Tcl_UniCharToUtfDString \
@@ -4522,29 +4413,6 @@ extern const TclStubs *tclStubsPtr;
# define Tcl_WCharLen (sizeof(wchar_t) != sizeof(short) \
? (Tcl_Size (*)(wchar_t *))Tcl_UniCharLen \
: (Tcl_Size (*)(wchar_t *))Tcl_Char16Len)
-#ifdef TCL_NO_DEPRECATED
-# define Tcl_ListObjGetElements(interp, listPtr, objcPtr, objvPtr) (sizeof(*(objcPtr)) == sizeof(int) \
- ? (Tcl_ListObjGetElements)((interp), (listPtr), (int *)(void *)(objcPtr), (objvPtr)) \
- : TclListObjGetElements((interp), (listPtr), (objcPtr), (objvPtr)))
-# define Tcl_ListObjLength(interp, listPtr, lengthPtr) (sizeof(*(lengthPtr)) == sizeof(int) \
- ? (Tcl_ListObjLength)((interp), (listPtr), (int *)(void *)(lengthPtr)) \
- : TclListObjLength((interp), (listPtr), (lengthPtr)))
-# define Tcl_DictObjSize(interp, dictPtr, sizePtr) (sizeof(*(sizePtr)) == sizeof(int) \
- ? (Tcl_DictObjSize)((interp), (dictPtr), (int *)(void *)(sizePtr)) \
- : TclDictObjSize((interp), (dictPtr), (sizePtr)))
-# define Tcl_SplitList(interp, listStr, argcPtr, argvPtr) (sizeof(*(argcPtr)) == sizeof(int) \
- ? (Tcl_SplitList)((interp), (listStr), (int *)(void *)(argcPtr), (argvPtr)) \
- : TclSplitList((interp), (listStr), (argcPtr), (argvPtr)))
-# define Tcl_SplitPath(path, argcPtr, argvPtr) (sizeof(*(argcPtr)) == sizeof(int) \
- ? (Tcl_SplitPath)((path), (int *)(void *)(argcPtr), (argvPtr)) \
- : TclSplitPath((path), (argcPtr), (argvPtr)))
-# define Tcl_FSSplitPath(pathPtr, lenPtr) (sizeof(*(lenPtr)) == sizeof(int) \
- ? (Tcl_FSSplitPath)((pathPtr), (int *)(void *)(lenPtr)) \
- : TclFSSplitPath((pathPtr), (lenPtr)))
-# define Tcl_ParseArgsObjv(interp, argTable, objcPtr, objv, remObjv) (sizeof(*(objcPtr)) == sizeof(int) \
- ? (Tcl_ParseArgsObjv)((interp), (argTable), (int *)(void *)(objcPtr), (objv), (remObjv)) \
- : TclParseArgsObjv((interp), (argTable), (objcPtr), (objv), (remObjv)))
-#endif /* TCL_NO_DEPRECATED */
#endif /* defined(USE_TCL_STUBS) */
/*
@@ -4581,6 +4449,11 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_GetSlave Tcl_GetChild
#define Tcl_GetMaster Tcl_GetParent
+#define Tcl_NRCallObjProc2 Tcl_NRCallObjProc
+#define Tcl_CreateObjCommand2 Tcl_CreateObjCommand
+#define Tcl_CreateObjTrace2 Tcl_CreateObjTrace
+#define Tcl_NRCreateCommand2 Tcl_NRCreateCommand
+
/* TIP #660 */
#define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 139d063..d76c287 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -4788,11 +4788,7 @@ TEBCresume(
Method *const mPtr =
contextPtr->callPtr->chain[newDepth].mPtr;
- if (mPtr->typePtr->version < TCL_OO_METHOD_VERSION_2) {
- return mPtr->typePtr->callProc(mPtr->clientData, interp,
- (Tcl_ObjectContext) contextPtr, opnd, objv);
- }
- return ((Tcl_MethodCallProc2 *)(void *)(mPtr->typePtr->callProc))(mPtr->clientData, interp,
+ return mPtr->typePtr->callProc(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, opnd, objv);
}
@@ -5480,7 +5476,7 @@ TEBCresume(
TclNewObj(objResultPtr);
} else if (TclIsPureByteArray(valuePtr)) {
objResultPtr = Tcl_NewByteArrayObj(
- TclGetByteArrayFromObj(valuePtr, (Tcl_Size *)NULL)+index, 1);
+ Tcl_GetByteArrayFromObj(valuePtr, NULL)+index, 1);
} else if (valuePtr->bytes && length == valuePtr->length) {
objResultPtr = Tcl_NewStringObj((const char *)
valuePtr->bytes+index, 1);
diff --git a/generic/tclIO.c b/generic/tclIO.c
index af9a42d..1527dc0 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -6033,7 +6033,7 @@ DoReadChars(
&& (statePtr->inEofChar == '\0');
if (appendFlag) {
- if (binaryMode && (NULL == TclGetBytesFromObj(NULL, objPtr, NULL))) {
+ if (binaryMode && (NULL == Tcl_GetBytesFromObj(NULL, objPtr, NULL))) {
binaryMode = 0;
}
} else {
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index c164006..f4028dd 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -115,9 +115,6 @@ declare 41 {
declare 42 {
const char *TclpGetUserHome(const char *name, Tcl_DString *bufferPtr)
}
-declare 43 {
- Tcl_ObjCmdProc2 *TclGetObjInterpProc2(void)
-}
declare 44 {
int TclGuessPackageName(const char *fileName, Tcl_DString *bufPtr)
}
diff --git a/generic/tclInt.h b/generic/tclInt.h
index e873538..73896e7 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4551,7 +4551,6 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
#define TclGetString(objPtr) \
((objPtr)->bytes? (objPtr)->bytes : Tcl_GetString(objPtr))
-#undef TclGetStringFromObj
#define TclGetStringFromObj(objPtr, lenPtr) \
((objPtr)->bytes \
? (*(lenPtr) = (objPtr)->length, (objPtr)->bytes) \
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index c6250e0..ed02d99 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -156,8 +156,7 @@ EXTERN Tcl_Command TclGetOriginalCommand(Tcl_Command command);
/* 42 */
EXTERN const char * TclpGetUserHome(const char *name,
Tcl_DString *bufferPtr);
-/* 43 */
-EXTERN Tcl_ObjCmdProc2 * TclGetObjInterpProc2(void);
+/* Slot 43 is reserved */
/* 44 */
EXTERN int TclGuessPackageName(const char *fileName,
Tcl_DString *bufPtr);
@@ -715,7 +714,7 @@ typedef struct TclIntStubs {
int (*tclGetOpenMode) (Tcl_Interp *interp, const char *str, int *seekFlagPtr); /* 40 */
Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */
const char * (*tclpGetUserHome) (const char *name, Tcl_DString *bufferPtr); /* 42 */
- Tcl_ObjCmdProc2 * (*tclGetObjInterpProc2) (void); /* 43 */
+ void (*reserved43)(void);
int (*tclGuessPackageName) (const char *fileName, Tcl_DString *bufPtr); /* 44 */
int (*tclHideUnsafeCommands) (Tcl_Interp *interp); /* 45 */
int (*tclInExit) (void); /* 46 */
@@ -1016,8 +1015,7 @@ extern const TclIntStubs *tclIntStubsPtr;
(tclIntStubsPtr->tclGetOriginalCommand) /* 41 */
#define TclpGetUserHome \
(tclIntStubsPtr->tclpGetUserHome) /* 42 */
-#define TclGetObjInterpProc2 \
- (tclIntStubsPtr->tclGetObjInterpProc2) /* 43 */
+/* Slot 43 is reserved */
#define TclGuessPackageName \
(tclIntStubsPtr->tclGuessPackageName) /* 44 */
#define TclHideUnsafeCommands \
@@ -1425,7 +1423,8 @@ extern const TclIntStubs *tclIntStubsPtr;
#undef TclSetPreInitScript
#undef TclObjInterpProc
#define TclObjInterpProc TclGetObjInterpProc()
-#define TclObjInterpProc2 TclGetObjInterpProc2()
+#define TclObjInterpProc2 TclObjInterpProc
+
#ifndef TCL_NO_DEPRECATED
# define TclSetPreInitScript Tcl_SetPreInitScript
# define TclGuessPackageName(fileName, pkgName) ((void)fileName,(void)pkgName,0)
diff --git a/generic/tclOO.c b/generic/tclOO.c
index e88ee96..8c722dc 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -392,9 +392,9 @@ InitFoundation(
*/
TclNewLiteralStringObj(namePtr, "new");
- TclNewInstanceMethod(interp, (Tcl_Object) fPtr->classCls->thisPtr,
+ Tcl_NewInstanceMethod(interp, (Tcl_Object) fPtr->classCls->thisPtr,
namePtr /* keeps ref */, 0 /* private */, NULL, NULL);
- fPtr->classCls->constructorPtr = (Method *) TclNewMethod(interp,
+ fPtr->classCls->constructorPtr = (Method *) Tcl_NewMethod(interp,
(Tcl_Class) fPtr->classCls, NULL, 0, &classConstructor, NULL);
/*
@@ -2293,7 +2293,7 @@ CloneObjectMethod(
Tcl_Obj *namePtr)
{
if (mPtr->typePtr == NULL) {
- TclNewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
+ Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
mPtr->flags & PUBLIC_METHOD, NULL, NULL);
} else if (mPtr->typePtr->cloneProc) {
ClientData newClientData;
@@ -2302,10 +2302,10 @@ CloneObjectMethod(
&newClientData) != TCL_OK) {
return TCL_ERROR;
}
- TclNewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
+ Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, newClientData);
} else {
- TclNewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
+ Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, namePtr,
mPtr->flags & PUBLIC_METHOD, mPtr->typePtr, mPtr->clientData);
}
return TCL_OK;
@@ -2322,7 +2322,7 @@ CloneClassMethod(
Method *m2Ptr;
if (mPtr->typePtr == NULL) {
- m2Ptr = (Method *) TclNewMethod(interp, (Tcl_Class) clsPtr,
+ m2Ptr = (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr,
namePtr, mPtr->flags & PUBLIC_METHOD, NULL, NULL);
} else if (mPtr->typePtr->cloneProc) {
ClientData newClientData;
@@ -2331,11 +2331,11 @@ CloneClassMethod(
&newClientData) != TCL_OK) {
return TCL_ERROR;
}
- m2Ptr = (Method *) TclNewMethod(interp, (Tcl_Class) clsPtr,
+ m2Ptr = (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr,
namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->typePtr,
newClientData);
} else {
- m2Ptr = (Method *) TclNewMethod(interp, (Tcl_Class) clsPtr,
+ m2Ptr = (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr,
namePtr, mPtr->flags & PUBLIC_METHOD, mPtr->typePtr,
mPtr->clientData);
}
diff --git a/generic/tclOO.decls b/generic/tclOO.decls
index c933872..14cdf27 100644
--- a/generic/tclOO.decls
+++ b/generic/tclOO.decls
@@ -68,8 +68,8 @@ declare 12 {
}
declare 13 {
Tcl_Object Tcl_NewObjectInstance(Tcl_Interp *interp, Tcl_Class cls,
- const char *nameStr, const char *nsNameStr, int objc,
- Tcl_Obj *const *objv, int skip)
+ const char *nameStr, const char *nsNameStr, Tcl_Size objc,
+ Tcl_Obj *const *objv, Tcl_Size skip)
}
declare 14 {
int Tcl_ObjectDeleted(Tcl_Object object)
@@ -84,7 +84,7 @@ declare 17 {
Tcl_Object Tcl_ObjectContextObject(Tcl_ObjectContext context)
}
declare 18 {
- int Tcl_ObjectContextSkippedArgs(Tcl_ObjectContext context)
+ Tcl_Size Tcl_ObjectContextSkippedArgs(Tcl_ObjectContext context)
}
declare 19 {
void *Tcl_ClassGetMetadata(Tcl_Class clazz,
@@ -104,8 +104,8 @@ declare 22 {
}
declare 23 {
int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp,
- Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv,
- int skip)
+ Tcl_ObjectContext context, Tcl_Size objc, Tcl_Obj *const *objv,
+ Tcl_Size skip)
}
declare 24 {
Tcl_ObjectMapMethodNameProc *Tcl_ObjectGetMethodNameMapper(
@@ -135,20 +135,6 @@ declare 30 {
declare 31 {
Tcl_Obj *Tcl_GetObjectClassName(Tcl_Interp *interp, Tcl_Object object)
}
-declare 32 {
- int Tcl_MethodIsType2(Tcl_Method method, const Tcl_MethodType2 *typePtr,
- void **clientDataPtr)
-}
-declare 33 {
- Tcl_Method Tcl_NewInstanceMethod2(Tcl_Interp *interp, Tcl_Object object,
- Tcl_Obj *nameObj, int flags, const Tcl_MethodType2 *typePtr,
- void *clientData)
-}
-declare 34 {
- Tcl_Method Tcl_NewMethod2(Tcl_Interp *interp, Tcl_Class cls,
- Tcl_Obj *nameObj, int flags, const Tcl_MethodType2 *typePtr,
- void *clientData)
-}
######################################################################
# Private API, exposed to support advanced OO systems that plug in on top of
@@ -184,7 +170,7 @@ declare 4 {
ProcedureMethod **pmPtrPtr)
}
declare 5 {
- int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp, int objc,
+ int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const *objv, int publicOnly, Class *startCls)
}
declare 6 {
@@ -214,24 +200,24 @@ declare 10 {
}
declare 11 {
int TclOOInvokeObject(Tcl_Interp *interp, Tcl_Object object,
- Tcl_Class startCls, int publicPrivate, int objc,
+ Tcl_Class startCls, int publicPrivate, Tcl_Size objc,
Tcl_Obj *const *objv)
}
declare 12 {
- void TclOOObjectSetFilters(Object *oPtr, int numFilters,
+ void TclOOObjectSetFilters(Object *oPtr, Tcl_Size numFilters,
Tcl_Obj *const *filters)
}
declare 13 {
void TclOOClassSetFilters(Tcl_Interp *interp, Class *classPtr,
- int numFilters, Tcl_Obj *const *filters)
+ Tcl_Size numFilters, Tcl_Obj *const *filters)
}
declare 14 {
- void TclOOObjectSetMixins(Object *oPtr, int numMixins,
+ void TclOOObjectSetMixins(Object *oPtr, Tcl_Size numMixins,
Class *const *mixins)
}
declare 15 {
void TclOOClassSetMixins(Tcl_Interp *interp, Class *classPtr,
- int numMixins, Class *const *mixins)
+ Tcl_Size numMixins, Class *const *mixins)
}
return
diff --git a/generic/tclOO.h b/generic/tclOO.h
index 775bd32..19d93f9 100644
--- a/generic/tclOO.h
+++ b/generic/tclOO.h
@@ -62,8 +62,7 @@ typedef struct Tcl_ObjectContext_ *Tcl_ObjectContext;
typedef int (Tcl_MethodCallProc)(void *clientData, Tcl_Interp *interp,
Tcl_ObjectContext objectContext, int objc, Tcl_Obj *const *objv);
-typedef int (Tcl_MethodCallProc2)(void *clientData, Tcl_Interp *interp,
- Tcl_ObjectContext objectContext, ptrdiff_t objc, Tcl_Obj *const *objv);
+#define Tcl_MethodCallProc2 Tcl_MethodCallProc
typedef void (Tcl_MethodDeleteProc)(void *clientData);
typedef int (Tcl_CloneProc)(Tcl_Interp *interp, void *oldClientData,
void **newClientData);
@@ -94,22 +93,7 @@ typedef struct {
* be copied directly. */
} Tcl_MethodType;
-typedef struct {
- 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
- * debugging purposes. */
- Tcl_MethodCallProc2 *callProc;
- /* How to invoke this method. */
- Tcl_MethodDeleteProc *deleteProc;
- /* How to delete this method's type-specific
- * data, or NULL if the type-specific data
- * 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;
+#define Tcl_MethodType2 Tcl_MethodType
/*
* The correct value for the version field of the Tcl_MethodType structure.
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 52de1b8..85ca995 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -371,11 +371,7 @@ TclOOInvokeContext(
* Run the method implementation.
*/
- if (mPtr->typePtr->version < TCL_OO_METHOD_VERSION_2) {
- return (mPtr->typePtr->callProc)(mPtr->clientData, interp,
- (Tcl_ObjectContext) contextPtr, objc, objv);
- }
- return ((Tcl_MethodCallProc2 *)(void *)(mPtr->typePtr->callProc))(mPtr->clientData, interp,
+ return (mPtr->typePtr->callProc)(mPtr->clientData, interp,
(Tcl_ObjectContext) contextPtr, objc, objv);
}
diff --git a/generic/tclOODecls.h b/generic/tclOODecls.h
index 13e07ec..188f86f 100644
--- a/generic/tclOODecls.h
+++ b/generic/tclOODecls.h
@@ -69,8 +69,8 @@ TCLAPI Tcl_Method Tcl_NewMethod(Tcl_Interp *interp, Tcl_Class cls,
/* 13 */
TCLAPI Tcl_Object Tcl_NewObjectInstance(Tcl_Interp *interp,
Tcl_Class cls, const char *nameStr,
- const char *nsNameStr, int objc,
- Tcl_Obj *const *objv, int skip);
+ const char *nsNameStr, Tcl_Size objc,
+ Tcl_Obj *const *objv, Tcl_Size skip);
/* 14 */
TCLAPI int Tcl_ObjectDeleted(Tcl_Object object);
/* 15 */
@@ -81,7 +81,7 @@ TCLAPI Tcl_Method Tcl_ObjectContextMethod(Tcl_ObjectContext context);
/* 17 */
TCLAPI Tcl_Object Tcl_ObjectContextObject(Tcl_ObjectContext context);
/* 18 */
-TCLAPI int Tcl_ObjectContextSkippedArgs(
+TCLAPI Tcl_Size Tcl_ObjectContextSkippedArgs(
Tcl_ObjectContext context);
/* 19 */
TCLAPI void * Tcl_ClassGetMetadata(Tcl_Class clazz,
@@ -99,8 +99,8 @@ TCLAPI void Tcl_ObjectSetMetadata(Tcl_Object object,
void *metadata);
/* 23 */
TCLAPI int Tcl_ObjectContextInvokeNext(Tcl_Interp *interp,
- Tcl_ObjectContext context, int objc,
- Tcl_Obj *const *objv, int skip);
+ Tcl_ObjectContext context, Tcl_Size objc,
+ Tcl_Obj *const *objv, Tcl_Size skip);
/* 24 */
TCLAPI Tcl_ObjectMapMethodNameProc * Tcl_ObjectGetMethodNameMapper(
Tcl_Object object);
@@ -123,20 +123,6 @@ TCLAPI Tcl_Class Tcl_GetClassOfObject(Tcl_Object object);
/* 31 */
TCLAPI Tcl_Obj * Tcl_GetObjectClassName(Tcl_Interp *interp,
Tcl_Object object);
-/* 32 */
-TCLAPI int Tcl_MethodIsType2(Tcl_Method method,
- const Tcl_MethodType2 *typePtr,
- void **clientDataPtr);
-/* 33 */
-TCLAPI Tcl_Method Tcl_NewInstanceMethod2(Tcl_Interp *interp,
- Tcl_Object object, Tcl_Obj *nameObj,
- int flags, const Tcl_MethodType2 *typePtr,
- void *clientData);
-/* 34 */
-TCLAPI Tcl_Method Tcl_NewMethod2(Tcl_Interp *interp, Tcl_Class cls,
- Tcl_Obj *nameObj, int flags,
- const Tcl_MethodType2 *typePtr,
- void *clientData);
typedef struct {
const struct TclOOIntStubs *tclOOIntStubs;
@@ -159,17 +145,17 @@ typedef struct TclOOStubs {
Tcl_Obj * (*tcl_MethodName) (Tcl_Method method); /* 10 */
Tcl_Method (*tcl_NewInstanceMethod) (Tcl_Interp *interp, Tcl_Object object, Tcl_Obj *nameObj, int flags, const Tcl_MethodType *typePtr, void *clientData); /* 11 */
Tcl_Method (*tcl_NewMethod) (Tcl_Interp *interp, Tcl_Class cls, Tcl_Obj *nameObj, int flags, const Tcl_MethodType *typePtr, void *clientData); /* 12 */
- Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp *interp, Tcl_Class cls, const char *nameStr, const char *nsNameStr, int objc, Tcl_Obj *const *objv, int skip); /* 13 */
+ Tcl_Object (*tcl_NewObjectInstance) (Tcl_Interp *interp, Tcl_Class cls, const char *nameStr, const char *nsNameStr, Tcl_Size objc, Tcl_Obj *const *objv, Tcl_Size skip); /* 13 */
int (*tcl_ObjectDeleted) (Tcl_Object object); /* 14 */
int (*tcl_ObjectContextIsFiltering) (Tcl_ObjectContext context); /* 15 */
Tcl_Method (*tcl_ObjectContextMethod) (Tcl_ObjectContext context); /* 16 */
Tcl_Object (*tcl_ObjectContextObject) (Tcl_ObjectContext context); /* 17 */
- int (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */
+ Tcl_Size (*tcl_ObjectContextSkippedArgs) (Tcl_ObjectContext context); /* 18 */
void * (*tcl_ClassGetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType *typePtr); /* 19 */
void (*tcl_ClassSetMetadata) (Tcl_Class clazz, const Tcl_ObjectMetadataType *typePtr, void *metadata); /* 20 */
void * (*tcl_ObjectGetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType *typePtr); /* 21 */
void (*tcl_ObjectSetMetadata) (Tcl_Object object, const Tcl_ObjectMetadataType *typePtr, void *metadata); /* 22 */
- int (*tcl_ObjectContextInvokeNext) (Tcl_Interp *interp, Tcl_ObjectContext context, int objc, Tcl_Obj *const *objv, int skip); /* 23 */
+ int (*tcl_ObjectContextInvokeNext) (Tcl_Interp *interp, Tcl_ObjectContext context, Tcl_Size objc, Tcl_Obj *const *objv, Tcl_Size skip); /* 23 */
Tcl_ObjectMapMethodNameProc * (*tcl_ObjectGetMethodNameMapper) (Tcl_Object object); /* 24 */
void (*tcl_ObjectSetMethodNameMapper) (Tcl_Object object, Tcl_ObjectMapMethodNameProc *mapMethodNameProc); /* 25 */
void (*tcl_ClassSetConstructor) (Tcl_Interp *interp, Tcl_Class clazz, Tcl_Method method); /* 26 */
@@ -178,9 +164,6 @@ typedef struct TclOOStubs {
int (*tcl_MethodIsPrivate) (Tcl_Method method); /* 29 */
Tcl_Class (*tcl_GetClassOfObject) (Tcl_Object object); /* 30 */
Tcl_Obj * (*tcl_GetObjectClassName) (Tcl_Interp *interp, Tcl_Object object); /* 31 */
- int (*tcl_MethodIsType2) (Tcl_Method method, const Tcl_MethodType2 *typePtr, void **clientDataPtr); /* 32 */
- Tcl_Method (*tcl_NewInstanceMethod2) (Tcl_Interp *interp, Tcl_Object object, Tcl_Obj *nameObj, int flags, const Tcl_MethodType2 *typePtr, void *clientData); /* 33 */
- Tcl_Method (*tcl_NewMethod2) (Tcl_Interp *interp, Tcl_Class cls, Tcl_Obj *nameObj, int flags, const Tcl_MethodType2 *typePtr, void *clientData); /* 34 */
} TclOOStubs;
extern const TclOOStubs *tclOOStubsPtr;
@@ -259,15 +242,14 @@ extern const TclOOStubs *tclOOStubsPtr;
(tclOOStubsPtr->tcl_GetClassOfObject) /* 30 */
#define Tcl_GetObjectClassName \
(tclOOStubsPtr->tcl_GetObjectClassName) /* 31 */
-#define Tcl_MethodIsType2 \
- (tclOOStubsPtr->tcl_MethodIsType2) /* 32 */
-#define Tcl_NewInstanceMethod2 \
- (tclOOStubsPtr->tcl_NewInstanceMethod2) /* 33 */
-#define Tcl_NewMethod2 \
- (tclOOStubsPtr->tcl_NewMethod2) /* 34 */
#endif /* defined(USE_TCLOO_STUBS) */
/* !END!: Do not edit above this line. */
+#define Tcl_MethodIsType2 Tcl_MethodIsType
+#define Tcl_NewInstanceMethod2 Tcl_NewInstanceMethod
+#define Tcl_NewMethod2 Tcl_NewMethod
+
+
#endif /* _TCLOODECLS */
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index 490fc0e..3b849ea 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -2303,12 +2303,12 @@ TclOODefineSlots(
if (slotObject == NULL) {
continue;
}
- TclNewInstanceMethod(fPtr->interp, slotObject, getName, 0,
+ Tcl_NewInstanceMethod(fPtr->interp, slotObject, getName, 0,
&slotInfoPtr->getterType, NULL);
- TclNewInstanceMethod(fPtr->interp, slotObject, setName, 0,
+ Tcl_NewInstanceMethod(fPtr->interp, slotObject, setName, 0,
&slotInfoPtr->setterType, NULL);
if (slotInfoPtr->resolverType.callProc) {
- TclNewInstanceMethod(fPtr->interp, slotObject, resolveName, 0,
+ Tcl_NewInstanceMethod(fPtr->interp, slotObject, resolveName, 0,
&slotInfoPtr->resolverType, NULL);
}
}
diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h
index 851623d..9ff8e54 100644
--- a/generic/tclOOInt.h
+++ b/generic/tclOOInt.h
@@ -518,17 +518,6 @@ MODULE_SCOPE void TclOOAddToMixinSubs(Class *subPtr, Class *mixinPtr);
MODULE_SCOPE void TclOOAddToSubclasses(Class *subPtr, Class *superPtr);
MODULE_SCOPE Class * TclOOAllocClass(Tcl_Interp *interp,
Object *useThisObj);
-MODULE_SCOPE int TclMethodIsType(Tcl_Method method,
- const Tcl_MethodType *typePtr,
- void **clientDataPtr);
-MODULE_SCOPE Tcl_Method TclNewInstanceMethod(Tcl_Interp *interp,
- Tcl_Object object, Tcl_Obj *nameObj,
- int flags, const Tcl_MethodType *typePtr,
- void *clientData);
-MODULE_SCOPE Tcl_Method TclNewMethod(Tcl_Interp *interp, Tcl_Class cls,
- Tcl_Obj *nameObj, int flags,
- const Tcl_MethodType *typePtr,
- void *clientData);
MODULE_SCOPE int TclNRNewObjectInstance(Tcl_Interp *interp,
Tcl_Class cls, const char *nameStr,
const char *nsNameStr, int objc,
diff --git a/generic/tclOOIntDecls.h b/generic/tclOOIntDecls.h
index 6a5cfd3..730a73a 100644
--- a/generic/tclOOIntDecls.h
+++ b/generic/tclOOIntDecls.h
@@ -42,7 +42,7 @@ TCLAPI Method * TclOONewProcMethod(Tcl_Interp *interp, Class *clsPtr,
ProcedureMethod **pmPtrPtr);
/* 5 */
TCLAPI int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp,
- int objc, Tcl_Obj *const *objv,
+ Tcl_Size objc, Tcl_Obj *const *objv,
int publicOnly, Class *startCls);
/* 6 */
TCLAPI int TclOOIsReachable(Class *targetPtr, Class *startPtr);
@@ -75,21 +75,21 @@ TCLAPI Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp,
/* 11 */
TCLAPI int TclOOInvokeObject(Tcl_Interp *interp,
Tcl_Object object, Tcl_Class startCls,
- int publicPrivate, int objc,
+ int publicPrivate, Tcl_Size objc,
Tcl_Obj *const *objv);
/* 12 */
-TCLAPI void TclOOObjectSetFilters(Object *oPtr, int numFilters,
- Tcl_Obj *const *filters);
+TCLAPI void TclOOObjectSetFilters(Object *oPtr,
+ Tcl_Size numFilters, Tcl_Obj *const *filters);
/* 13 */
TCLAPI void TclOOClassSetFilters(Tcl_Interp *interp,
- Class *classPtr, int numFilters,
+ Class *classPtr, Tcl_Size numFilters,
Tcl_Obj *const *filters);
/* 14 */
-TCLAPI void TclOOObjectSetMixins(Object *oPtr, int numMixins,
- Class *const *mixins);
+TCLAPI void TclOOObjectSetMixins(Object *oPtr,
+ Tcl_Size numMixins, Class *const *mixins);
/* 15 */
TCLAPI void TclOOClassSetMixins(Tcl_Interp *interp,
- Class *classPtr, int numMixins,
+ Class *classPtr, Tcl_Size numMixins,
Class *const *mixins);
typedef struct TclOOIntStubs {
@@ -101,17 +101,17 @@ typedef struct TclOOIntStubs {
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 */
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, int objc, Tcl_Obj *const *objv, int publicOnly, Class *startCls); /* 5 */
+ 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 */
Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 8 */
Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc *preCallPtr, TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, void *clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 9 */
Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc *preCallPtr, TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, void *clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 10 */
- int (*tclOOInvokeObject) (Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const *objv); /* 11 */
- void (*tclOOObjectSetFilters) (Object *oPtr, int numFilters, Tcl_Obj *const *filters); /* 12 */
- void (*tclOOClassSetFilters) (Tcl_Interp *interp, Class *classPtr, int numFilters, Tcl_Obj *const *filters); /* 13 */
- void (*tclOOObjectSetMixins) (Object *oPtr, int numMixins, Class *const *mixins); /* 14 */
- void (*tclOOClassSetMixins) (Tcl_Interp *interp, Class *classPtr, int numMixins, Class *const *mixins); /* 15 */
+ int (*tclOOInvokeObject) (Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, Tcl_Size objc, Tcl_Obj *const *objv); /* 11 */
+ void (*tclOOObjectSetFilters) (Object *oPtr, Tcl_Size numFilters, Tcl_Obj *const *filters); /* 12 */
+ void (*tclOOClassSetFilters) (Tcl_Interp *interp, Class *classPtr, Tcl_Size numFilters, Tcl_Obj *const *filters); /* 13 */
+ void (*tclOOObjectSetMixins) (Object *oPtr, Tcl_Size numMixins, Class *const *mixins); /* 14 */
+ void (*tclOOClassSetMixins) (Tcl_Interp *interp, Class *classPtr, Tcl_Size numMixins, Class *const *mixins); /* 15 */
} TclOOIntStubs;
extern const TclOOIntStubs *tclOOIntStubsPtr;
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 2386c15..feaeb23 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -126,7 +126,7 @@ static const Tcl_MethodType fwdMethodType = {
*/
Tcl_Method
-TclNewInstanceMethod(
+Tcl_NewInstanceMethod(
TCL_UNUSED(Tcl_Interp *),
Tcl_Object object, /* The object that has the method attached to
* it. */
@@ -187,50 +187,6 @@ TclNewInstanceMethod(
oPtr->epoch++;
return (Tcl_Method) mPtr;
}
-Tcl_Method
-Tcl_NewInstanceMethod(
- TCL_UNUSED(Tcl_Interp *),
- Tcl_Object object, /* The object that has the method attached to
- * 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,
- /* 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. */
-{
- if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
- Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_1", "Tcl_NewInstanceMethod");
- }
- return TclNewInstanceMethod(NULL, object, nameObj, flags,
- (const Tcl_MethodType *)typePtr, clientData);
-}
-Tcl_Method
-Tcl_NewInstanceMethod2(
- TCL_UNUSED(Tcl_Interp *),
- Tcl_Object object, /* The object that has the method attached to
- * 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_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. */
-{
- if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
- Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_2", "Tcl_NewInstanceMethod2");
- }
- return TclNewInstanceMethod(NULL, object, nameObj, flags,
- (const Tcl_MethodType *)typePtr, clientData);
-}
/*
* ----------------------------------------------------------------------
@@ -243,7 +199,7 @@ Tcl_NewInstanceMethod2(
*/
Tcl_Method
-TclNewMethod(
+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.,
@@ -299,48 +255,6 @@ TclNewMethod(
return (Tcl_Method) mPtr;
}
-
-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.,
- * for constructors or destructors); if so, up
- * to caller to manage storage. */
- int flags, /* Whether this is a public method. */
- const Tcl_MethodType *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. */
-{
- if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
- Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_1", "Tcl_NewMethod");
- }
- return TclNewMethod(NULL, cls, nameObj, flags, typePtr, clientData);
-}
-
-Tcl_Method
-Tcl_NewMethod2(
- 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.,
- * for constructors or destructors); if so, up
- * to caller to manage storage. */
- int flags, /* Whether this is a public method. */
- 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. */
-{
- if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
- Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_2", "Tcl_NewMethod2");
- }
- return TclNewMethod(NULL, cls, nameObj, flags, (const Tcl_MethodType *)typePtr, clientData);
-}
/*
* ----------------------------------------------------------------------
@@ -390,7 +304,7 @@ TclOONewBasicMethod(
Tcl_Obj *namePtr = Tcl_NewStringObj(dcm->name, -1);
Tcl_IncrRefCount(namePtr);
- TclNewMethod(interp, (Tcl_Class) clsPtr, namePtr,
+ Tcl_NewMethod(interp, (Tcl_Class) clsPtr, namePtr,
(dcm->isPublic ? PUBLIC_METHOD : 0), &dcm->definition, NULL);
Tcl_DecrRefCount(namePtr);
}
@@ -615,7 +529,7 @@ TclOOMakeProcInstanceMethod(
}
}
- return TclNewInstanceMethod(interp, (Tcl_Object) oPtr, nameObj, flags,
+ return Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr, nameObj, flags,
typePtr, clientData);
}
@@ -728,7 +642,7 @@ TclOOMakeProcMethod(
}
}
- return TclNewMethod(interp, (Tcl_Class) clsPtr, nameObj, flags, typePtr,
+ return Tcl_NewMethod(interp, (Tcl_Class) clsPtr, nameObj, flags, typePtr,
clientData);
}
@@ -1488,7 +1402,7 @@ TclOONewForwardInstanceMethod(
fmPtr = (ForwardMethod *)ckalloc(sizeof(ForwardMethod));
fmPtr->prefixObj = prefixObj;
Tcl_IncrRefCount(prefixObj);
- return (Method *) TclNewInstanceMethod(interp, (Tcl_Object) oPtr,
+ return (Method *) Tcl_NewInstanceMethod(interp, (Tcl_Object) oPtr,
nameObj, flags, &fwdMethodType, fmPtr);
}
@@ -1527,7 +1441,7 @@ TclOONewForwardMethod(
fmPtr = (ForwardMethod *)ckalloc(sizeof(ForwardMethod));
fmPtr->prefixObj = prefixObj;
Tcl_IncrRefCount(prefixObj);
- return (Method *) TclNewMethod(interp, (Tcl_Class) clsPtr, nameObj,
+ return (Method *) Tcl_NewMethod(interp, (Tcl_Class) clsPtr, nameObj,
flags, &fwdMethodType, fmPtr);
}
@@ -1758,23 +1672,6 @@ Tcl_MethodName(
}
int
-TclMethodIsType(
- Tcl_Method method,
- const Tcl_MethodType *typePtr,
- void **clientDataPtr)
-{
- Method *mPtr = (Method *) method;
-
- if (mPtr->typePtr == typePtr) {
- if (clientDataPtr != NULL) {
- *clientDataPtr = mPtr->clientData;
- }
- return 1;
- }
- return 0;
-}
-
-int
Tcl_MethodIsType(
Tcl_Method method,
const Tcl_MethodType *typePtr,
@@ -1782,9 +1679,6 @@ Tcl_MethodIsType(
{
Method *mPtr = (Method *) method;
- if (typePtr->version > TCL_OO_METHOD_VERSION_1) {
- Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_1", "Tcl_MethodIsType");
- }
if (mPtr->typePtr == typePtr) {
if (clientDataPtr != NULL) {
*clientDataPtr = mPtr->clientData;
@@ -1795,26 +1689,6 @@ Tcl_MethodIsType(
}
int
-Tcl_MethodIsType2(
- Tcl_Method method,
- const Tcl_MethodType2 *typePtr,
- void **clientDataPtr)
-{
- Method *mPtr = (Method *) method;
-
- if (typePtr->version < TCL_OO_METHOD_VERSION_2) {
- Tcl_Panic("%s: Wrong version in typePtr->version, should be TCL_OO_METHOD_VERSION_2", "Tcl_MethodIsType2");
- }
- if (mPtr->typePtr == (const Tcl_MethodType *)typePtr) {
- if (clientDataPtr != NULL) {
- *clientDataPtr = mPtr->clientData;
- }
- return 1;
- }
- return 0;
-}
-
-int
Tcl_MethodIsPublic(
Tcl_Method method)
{
diff --git a/generic/tclOOStubInit.c b/generic/tclOOStubInit.c
index 7b653cb..b9034f0 100644
--- a/generic/tclOOStubInit.c
+++ b/generic/tclOOStubInit.c
@@ -76,9 +76,6 @@ const TclOOStubs tclOOStubs = {
Tcl_MethodIsPrivate, /* 29 */
Tcl_GetClassOfObject, /* 30 */
Tcl_GetObjectClassName, /* 31 */
- Tcl_MethodIsType2, /* 32 */
- Tcl_NewInstanceMethod2, /* 33 */
- Tcl_NewMethod2, /* 34 */
};
/* !END!: Do not edit above this line. */
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d440f9f..08465c2f 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -1664,7 +1664,7 @@ Tcl_GetString(
/*
*----------------------------------------------------------------------
*
- * Tcl_GetStringFromObj/TclGetStringFromObj --
+ * Tcl_GetStringFromObj --
*
* Returns the string representation's byte array pointer and length for
* an object.
@@ -1684,7 +1684,6 @@ Tcl_GetString(
*----------------------------------------------------------------------
*/
-#undef Tcl_GetStringFromObj
char *
Tcl_GetStringFromObj(
Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
@@ -1723,47 +1722,6 @@ Tcl_GetStringFromObj(
}
return objPtr->bytes;
}
-
-#undef TclGetStringFromObj
-char *
-TclGetStringFromObj(
- Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
- * be returned. */
- void *lengthPtr) /* If non-NULL, the location where the string
- * rep's byte array length should * be stored.
- * If NULL, no length is stored. */
-{
- if (objPtr->bytes == NULL) {
- /*
- * Note we do not check for objPtr->typePtr == NULL. An invariant
- * of a properly maintained Tcl_Obj is that at least one of
- * objPtr->bytes and objPtr->typePtr must not be NULL. If broken
- * extensions fail to maintain that invariant, we can crash here.
- */
-
- if (objPtr->typePtr->updateStringProc == NULL) {
- /*
- * Those Tcl_ObjTypes which choose not to define an
- * updateStringProc must be written in such a way that
- * (objPtr->bytes) never becomes NULL.
- */
- Tcl_Panic("UpdateStringProc should not be invoked for type %s",
- objPtr->typePtr->name);
- }
- objPtr->typePtr->updateStringProc(objPtr);
- if (objPtr->bytes == NULL || objPtr->length < 0
- || objPtr->bytes[objPtr->length] != '\0') {
- Tcl_Panic("UpdateStringProc for type '%s' "
- "failed to create a valid string rep",
- objPtr->typePtr->name);
- }
- }
- if (lengthPtr != NULL) {
- *(ptrdiff_t *)lengthPtr = ((ptrdiff_t)(unsigned)(objPtr->length + 1)) - 1;
- }
- return objPtr->bytes;
-}
-
/*
*----------------------------------------------------------------------
@@ -4045,7 +4003,7 @@ int
Tcl_GetNumber(
Tcl_Interp *interp,
const char *bytes,
- ptrdiff_t numBytes,
+ int numBytes,
void **clientDataPtr,
int *typePtr)
{
@@ -4060,15 +4018,7 @@ Tcl_GetNumber(
numBytes = 0;
}
if (numBytes < 0) {
- numBytes = (ptrdiff_t)strlen(bytes);
- }
- if (numBytes > INT_MAX) {
- if (interp) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "max size for a Tcl value (%d bytes) exceeded", INT_MAX));
- Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
- }
- return TCL_ERROR;
+ numBytes = (int)strlen(bytes);
}
objPtr->bytes = (char *) bytes;
diff --git a/generic/tclProc.c b/generic/tclProc.c
index a107341..4bf1593 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -1683,43 +1683,6 @@ TclNRInterpProc(
}
return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError);
}
-
-static int
-NRInterpProc2(
- void *clientData, /* Record describing procedure to be
- * interpreted. */
- Tcl_Interp *interp, /* Interpreter in which procedure was
- * invoked. */
- ptrdiff_t objc, /* Count of number of arguments to this
- * procedure. */
- Tcl_Obj *const objv[]) /* Argument value objects. */
-{
- int result = TclPushProcCallFrame(clientData, interp, objc, objv,
- /*isLambda*/ 0);
-
- if (result != TCL_OK) {
- return TCL_ERROR;
- }
- return TclNRInterpProcCore(interp, objv[0], 1, &MakeProcError);
-}
-
-static int
-ObjInterpProc2(
- void *clientData, /* Record describing procedure to be
- * interpreted. */
- Tcl_Interp *interp, /* Interpreter in which procedure was
- * invoked. */
- ptrdiff_t 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, NRInterpProc2, clientData, objc, objv);
-}
-
/*
*----------------------------------------------------------------------
@@ -2312,15 +2275,15 @@ TclUpdateReturnInfo(
/*
*----------------------------------------------------------------------
*
- * TclGetObjInterpProc/TclGetObjInterpProc2 --
+ * TclGetObjInterpProc --
*
- * Returns a pointer to the TclObjInterpProc/ObjInterpProc2 functions;
+ * Returns a pointer to the TclObjInterpProc 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.
*
* Results:
- * Returns the internal address of the TclObjInterpProc/ObjInterpProc2
+ * Returns the internal address of the TclObjInterpProc
* functions.
*
* Side effects:
@@ -2334,12 +2297,6 @@ TclGetObjInterpProc(void)
{
return TclObjInterpProc;
}
-
-Tcl_ObjCmdProc2 *
-TclGetObjInterpProc2(void)
-{
- return ObjInterpProc2;
-}
/*
*----------------------------------------------------------------------
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 490ddf9..749b43a 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -911,7 +911,6 @@ TclGetUniChar(
*----------------------------------------------------------------------
*/
-#undef Tcl_GetUnicodeFromObj
#ifndef TCL_NO_DEPRECATED
#undef Tcl_GetUnicode
unsigned short *
@@ -919,14 +918,14 @@ Tcl_GetUnicode(
Tcl_Obj *objPtr) /* The object to find the Unicode string
* for. */
{
- return TclGetUnicodeFromObj(objPtr, NULL);
+ return Tcl_GetUnicodeFromObj(objPtr, NULL);
}
#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
*
- * Tcl_GetUnicodeFromObj/TclGetUnicodeFromObj --
+ * Tcl_GetUnicodeFromObj --
*
* Get the Unicode form of the String object with length. If the object
* is not already a String object, it will be converted to one. If the
@@ -986,31 +985,6 @@ Tcl_GetUnicodeFromObj(
return stringPtr->unicode;
}
#endif
-
-#if !defined(TCL_NO_DEPRECATED)
-unsigned short *
-TclGetUnicodeFromObj(
- Tcl_Obj *objPtr, /* The object to find the unicode string
- * for. */
- void *lengthPtr) /* If non-NULL, the location where the string
- * rep's unichar length should be stored. If
- * NULL, no length is stored. */
-{
- String *stringPtr;
-
-#if TCL_UTF_MAX > 3
- SetUTF16StringFromAny(NULL, objPtr);
-#else
- SetStringFromAny(NULL, objPtr);
-#endif
- stringPtr = GET_STRING(objPtr);
-
- if (lengthPtr != NULL) {
- *(ptrdiff_t *)lengthPtr = stringPtr->numChars;
- }
- return stringPtr->unicode;
-}
-#endif
/*
*----------------------------------------------------------------------
@@ -1845,7 +1819,7 @@ Tcl_AppendObjToObj(
*/
TclAppendBytesToByteArray(objPtr,
- TclGetByteArrayFromObj(appendObjPtr, NULL), lengthSrc);
+ Tcl_GetByteArrayFromObj(appendObjPtr, NULL), lengthSrc);
return;
}
@@ -3423,7 +3397,7 @@ TclStringRepeat(
done *= 2;
}
TclAppendBytesToByteArray(objResultPtr,
- TclGetByteArrayFromObj(objResultPtr, NULL),
+ Tcl_GetByteArrayFromObj(objResultPtr, NULL),
(count - done) * length);
} else if (unichar) {
/*
@@ -4322,7 +4296,7 @@ TclStringReverse(
if (!inPlace || Tcl_IsShared(objPtr)) {
objPtr = Tcl_NewByteArrayObj(NULL, numBytes);
}
- ReverseBytes(TclGetByteArrayFromObj(objPtr, NULL), from, numBytes);
+ ReverseBytes(Tcl_GetByteArrayFromObj(objPtr, NULL), from, numBytes);
return objPtr;
}
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index aea0b8d..470290c 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -99,7 +99,6 @@ static void uniCodePanic(void) {
}
# define Tcl_GetUnicode (unsigned short *(*)(Tcl_Obj *))(void *)uniCodePanic
# define Tcl_GetUnicodeFromObj (unsigned short *(*)(Tcl_Obj *, int *))(void *)uniCodePanic
-# define TclGetUnicodeFromObj (unsigned short *(*)(Tcl_Obj *, void *))(void *)uniCodePanic
# define Tcl_NewUnicodeObj (Tcl_Obj *(*)(const unsigned short *, int))(void *)uniCodePanic
# define Tcl_SetUnicodeObj (void(*)(Tcl_Obj *, const unsigned short *, int))(void *)uniCodePanic
# define Tcl_AppendUnicodeToObj (void(*)(Tcl_Obj *, const unsigned short *, int))(void *)uniCodePanic
@@ -139,71 +138,6 @@ static const char *TclUtfPrev(const char *src, const char *start) {
return Tcl_UtfPrev(src, start);
}
-int TclListObjGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr,
- void *objcPtr, Tcl_Obj ***objvPtr) {
- int n, result = Tcl_ListObjGetElements(interp, listPtr, &n, objvPtr);
- if ((result == TCL_OK) && objcPtr) {
- *(ptrdiff_t *)objcPtr = n;
- }
- return result;
-}
-int TclListObjLength(Tcl_Interp *interp, Tcl_Obj *listPtr,
- void *lengthPtr) {
- int n;
- int result = Tcl_ListObjLength(interp, listPtr, &n);
- if ((result == TCL_OK) && lengthPtr) {
- *(ptrdiff_t *)lengthPtr = n;
- }
- return result;
-}
-int TclDictObjSize(Tcl_Interp *interp, Tcl_Obj *dictPtr,
- void *sizePtr) {
- int n, result = Tcl_DictObjSize(interp, dictPtr, &n);
- if ((result == TCL_OK) && sizePtr) {
- *(ptrdiff_t *)sizePtr = n;
- }
- return result;
-}
-int TclSplitList(Tcl_Interp *interp, const char *listStr, void *argcPtr,
- const char ***argvPtr) {
- int n;
- int result = Tcl_SplitList(interp, listStr, &n, argvPtr);
- if ((result == TCL_OK) && argcPtr) {
- *(ptrdiff_t *)argcPtr = n;
- }
- return result;
-}
-void TclSplitPath(const char *path, void *argcPtr, const char ***argvPtr) {
- int n;
- Tcl_SplitPath(path, &n, argvPtr);
- if (argcPtr) {
- *(ptrdiff_t *)argcPtr = n;
- }
-}
-Tcl_Obj *TclFSSplitPath(Tcl_Obj *pathPtr, void *lenPtr) {
- int n;
- Tcl_Obj *result = Tcl_FSSplitPath(pathPtr, &n);
- if (result && lenPtr) {
- *(ptrdiff_t *)lenPtr = n;
- }
- return result;
-}
-int TclParseArgsObjv(Tcl_Interp *interp,
- const Tcl_ArgvInfo *argTable, void *objcPtr, Tcl_Obj *const *objv,
- Tcl_Obj ***remObjv) {
- int n, result;
- if (*(ptrdiff_t *)objcPtr > INT_MAX) {
- if (interp) {
- Tcl_AppendResult(interp, "Tcl_ParseArgsObjv cannot handle *objcPtr > INT_MAX", NULL);
- }
- return TCL_ERROR;
- }
- n = *(ptrdiff_t *)objcPtr;
- result = Tcl_ParseArgsObjv(interp, argTable, &n, objv, remObjv);
- *(ptrdiff_t *)objcPtr = n;
- return result;
-}
-
#define TclBN_mp_add mp_add
#define TclBN_mp_and mp_and
#define TclBN_mp_clamp mp_clamp
@@ -913,7 +847,7 @@ static const TclIntStubs tclIntStubs = {
TclGetOpenMode, /* 40 */
TclGetOriginalCommand, /* 41 */
TclpGetUserHome, /* 42 */
- TclGetObjInterpProc2, /* 43 */
+ 0, /* 43 */
TclGuessPackageName, /* 44 */
TclHideUnsafeCommands, /* 45 */
TclInExit, /* 46 */
@@ -2022,11 +1956,11 @@ const TclStubs tclStubs = {
Tcl_UtfToUniChar, /* 646 */
Tcl_UniCharToUtfDString, /* 647 */
Tcl_UtfToUniCharDString, /* 648 */
- TclGetBytesFromObj, /* 649 */
- Tcl_GetBytesFromObj, /* 650 */
- TclGetStringFromObj, /* 651 */
- TclGetUnicodeFromObj, /* 652 */
- TclGetByteArrayFromObj, /* 653 */
+ Tcl_GetBytesFromObj, /* 649 */
+ 0, /* 650 */
+ 0, /* 651 */
+ 0, /* 652 */
+ 0, /* 653 */
Tcl_UtfCharComplete, /* 654 */
Tcl_UtfNext, /* 655 */
Tcl_UtfPrev, /* 656 */
@@ -2034,13 +1968,13 @@ const TclStubs tclStubs = {
Tcl_ExternalToUtfDStringEx, /* 658 */
Tcl_UtfToExternalDStringEx, /* 659 */
Tcl_AsyncMarkFromSignal, /* 660 */
- TclListObjGetElements, /* 661 */
- TclListObjLength, /* 662 */
- TclDictObjSize, /* 663 */
- TclSplitList, /* 664 */
- TclSplitPath, /* 665 */
- TclFSSplitPath, /* 666 */
- TclParseArgsObjv, /* 667 */
+ 0, /* 661 */
+ 0, /* 662 */
+ 0, /* 663 */
+ 0, /* 664 */
+ 0, /* 665 */
+ 0, /* 666 */
+ 0, /* 667 */
Tcl_UniCharLen, /* 668 */
TclNumUtfChars, /* 669 */
TclGetCharLength, /* 670 */
@@ -2049,10 +1983,10 @@ const TclStubs tclStubs = {
TclGetUniChar, /* 673 */
Tcl_GetBool, /* 674 */
Tcl_GetBoolFromObj, /* 675 */
- Tcl_CreateObjCommand2, /* 676 */
- Tcl_CreateObjTrace2, /* 677 */
- Tcl_NRCreateCommand2, /* 678 */
- Tcl_NRCallObjProc2, /* 679 */
+ 0, /* 676 */
+ 0, /* 677 */
+ 0, /* 678 */
+ 0, /* 679 */
Tcl_GetNumberFromObj, /* 680 */
Tcl_GetNumber, /* 681 */
Tcl_RemoveChannelMode, /* 682 */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index ef9997a..dcf21b7 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -236,10 +236,7 @@ static Tcl_ResolveCompiledVarProc InterpCompiledVarResolver;
static void MainLoop(void);
static Tcl_CmdProc NoopCmd;
static Tcl_ObjCmdProc NoopObjCmd;
-static int ObjTraceProc(void *clientData,
- Tcl_Interp *interp, int level, const char *command,
- Tcl_Command commandToken, int objc,
- Tcl_Obj *const objv[]);
+static Tcl_CmdObjTraceProc2 ObjTraceProc;
static void ObjTraceDeleteProc(void *clientData);
static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr);
static void SpecialFree(char *blockPtr);
@@ -315,7 +312,7 @@ static Tcl_CmdProc TestsetplatformCmd;
static Tcl_CmdProc TeststaticlibraryCmd;
static Tcl_CmdProc TesttranslatefilenameCmd;
static Tcl_CmdProc TestupvarCmd;
-static Tcl_ObjCmdProc TestWrongNumArgsObjCmd;
+static Tcl_ObjCmdProc2 TestWrongNumArgsObjCmd;
static Tcl_ObjCmdProc TestGetIndexFromObjStructObjCmd;
static Tcl_CmdProc TestChannelCmd;
static Tcl_CmdProc TestChannelEventCmd;
@@ -600,7 +597,7 @@ Tcltest_Init(
Tcl_CreateObjCommand(interp, "testbytestring", TestbytestringObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "teststringbytes", TeststringbytesObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testutf16string", Testutf16stringObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "testwrongnumargs", TestWrongNumArgsObjCmd,
+ Tcl_CreateObjCommand2(interp, "testwrongnumargs", TestWrongNumArgsObjCmd,
NULL, NULL);
Tcl_CreateObjCommand(interp, "testfilesystem", TestFilesystemObjCmd,
NULL, NULL);
@@ -1170,6 +1167,8 @@ TestcmdinfoObjCmd(
Tcl_AppendResult(interp, " stringProc", NULL);
} else if (info.isNativeObjectProc == 1) {
Tcl_AppendResult(interp, " nativeObjectProc", NULL);
+ } else if (info.isNativeObjectProc == 2) {
+ Tcl_AppendResult(interp, " nativeObjectProc2", NULL);
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf("Invalid isNativeObjectProc value %d",
info.isNativeObjectProc));
@@ -1302,7 +1301,7 @@ TestcmdtokenCmd(
return TCL_ERROR;
}
if (strcmp(argv[1], "create") == 0) {
- refPtr = (TestCommandTokenRef *)Tcl_Alloc(sizeof(TestCommandTokenRef));
+ refPtr = (TestCommandTokenRef *)ckalloc(sizeof(TestCommandTokenRef));
refPtr->token = Tcl_CreateCommand(interp, argv[2], CmdProc0,
refPtr, CmdDelProc0);
refPtr->id = nextCommandTokenRefId;
@@ -1426,7 +1425,7 @@ TestcmdtraceCmd(
static int deleteCalled;
deleteCalled = 0;
- cmdTrace = Tcl_CreateObjTrace(interp, 50000,
+ cmdTrace = Tcl_CreateObjTrace2(interp, 50000,
TCL_ALLOW_INLINE_COMPILATION, ObjTraceProc,
&deleteCalled, ObjTraceDeleteProc);
result = Tcl_EvalEx(interp, argv[2], TCL_INDEX_NONE, 0);
@@ -1509,10 +1508,10 @@ static int
ObjTraceProc(
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]);
@@ -2026,7 +2025,7 @@ TestdstringCmd(
static void SpecialFree(
char *blockPtr /* Block to free. */
) {
- ckfree(blockPtr - 16);
+ ckfree((char *)blockPtr - 16);
}
/*
@@ -4594,7 +4593,7 @@ TestregexpObjCmd(
Tcl_Obj *newPtr, *varPtr, *valuePtr;
varPtr = objv[i];
- ii = ((cflags&REG_EXPECT) && i == objc-1) ? TCL_INDEX_NONE : i;
+ ii = ((cflags&REG_EXPECT) && i == objc-1) ? TCL_INDEX_NONE : (Tcl_Size)i;
if (indices) {
Tcl_Obj *objs[2];
@@ -5727,7 +5726,10 @@ TestbytestringObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
- Tcl_Size n = 0;
+ struct {
+ Tcl_Size n;
+ int m; /* This variable should not be overwritten */
+ } x = {0, 1};
const char *p;
if (objc != 2) {
@@ -5735,11 +5737,15 @@ TestbytestringObjCmd(
return TCL_ERROR;
}
- p = (const char *)Tcl_GetBytesFromObj(interp, objv[1], &n);
+ p = (const char *)Tcl_GetBytesFromObj(interp, objv[1], &x.n);
if (p == NULL) {
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, Tcl_NewStringObj(p, n));
+ if (x.m != 1) {
+ Tcl_AppendResult(interp, "Tcl_GetBytesFromObj() overwrites variable", NULL);
+ return TCL_ERROR;
+ }
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(p, x.n));
return TCL_OK;
}
@@ -7917,7 +7923,7 @@ TestHashSystemHashCmd(
Tcl_SetHashValue(hPtr, INT2PTR(i+42));
}
- if (hash.numEntries != limit) {
+ if (hash.numEntries != (Tcl_Size)limit) {
Tcl_AppendResult(interp, "unexpected maximal size", NULL);
Tcl_DeleteHashTable(&hash);
return TCL_ERROR;
@@ -8656,7 +8662,7 @@ MyCompiledVarFetch(
}
hPtr = Tcl_CreateHashEntry((Tcl_HashTable *) &iPtr->globalNsPtr->varTable,
- (char *) resVarInfo->nameObj, &isNewVar);
+ (char *)resVarInfo->nameObj, &isNewVar);
if (hPtr) {
var = (Tcl_Var) TclVarHashGetValue(hPtr);
} else {
@@ -8825,4 +8831,3 @@ int TestApplyLambdaObjCmd (
* indent-tabs-mode: nil
* End:
*/
-
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index 0080938..123bea7 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -101,7 +101,7 @@ TclObjTest_Init(
*/
Tcl_Obj **varPtr;
- varPtr = (Tcl_Obj **) ckalloc(NUMBER_OF_OBJECT_VARS *sizeof(varPtr[0]));
+ varPtr = (Tcl_Obj **)ckalloc(NUMBER_OF_OBJECT_VARS *sizeof(varPtr[0]));
if (!varPtr) {
return TCL_ERROR;
}
@@ -984,6 +984,7 @@ TestlistobjCmd(
TCL_INDEX_NONE));
/* Keep looping since we are also looping for leaks */
}
+ Tcl_DecrRefCount(objP);
}
break;
@@ -1063,15 +1064,15 @@ TestobjCmd(
const Tcl_ObjType *targetType;
Tcl_Obj **varPtr;
const char *subcommands[] = {
- "freeallvars", "bug3598580", "types",
- "objtype", "newobj", "set",
+ "freeallvars", "bug3598580",
+ "types", "objtype", "newobj", "set",
"assign", "convert", "duplicate",
"invalidateStringRep", "refcount", "type",
NULL
};
enum testobjCmdIndex {
- TESTOBJ_FREEALLVARS, TESTOBJ_BUG3598580, TESTOBJ_TYPES,
- TESTOBJ_OBJTYPE, TESTOBJ_NEWOBJ, TESTOBJ_SET,
+ TESTOBJ_FREEALLVARS, TESTOBJ_BUG3598580,
+ TESTOBJ_TYPES, TESTOBJ_OBJTYPE, TESTOBJ_NEWOBJ, TESTOBJ_SET,
TESTOBJ_ASSIGN, TESTOBJ_CONVERT, TESTOBJ_DUPLICATE,
TESTOBJ_INVALIDATESTRINGREP, TESTOBJ_REFCOUNT, TESTOBJ_TYPE,
} cmdIndex;
@@ -1535,7 +1536,7 @@ TeststringobjCmd(
Tcl_SetObjResult(interp, varPtr[varIndex]);
break;
case 13: /* newunicode*/
- unicode = (unsigned short *) ckalloc(((unsigned)objc - 3) * sizeof(unsigned short));
+ unicode = (unsigned short *)ckalloc(((unsigned)objc - 3) * sizeof(unsigned short));
for (i = 0; i < (objc - 3); ++i) {
int val;
if (Tcl_GetIntFromObj(interp, objv[i + 3], &val) != TCL_OK) {
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 0b1606a..586c4e9 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -2137,57 +2137,6 @@ TraceVarProc(
*----------------------------------------------------------------------
*/
-typedef struct {
- Tcl_CmdObjTraceProc2 *proc;
- Tcl_CmdObjTraceDeleteProc *delProc;
- void *clientData;
-} TraceWrapperInfo;
-
-static int traceWrapperProc(
- void *clientData,
- Tcl_Interp *interp,
- Tcl_Size level,
- const char *command,
- Tcl_Command commandInfo,
- Tcl_Size objc,
- Tcl_Obj *const objv[])
-{
- TraceWrapperInfo *info = (TraceWrapperInfo *)clientData;
- if (objc < 0) {
- objc = -1; /* Signal Tcl_CmdObjTraceProc that objc is out of range */
- }
- return info->proc(info->clientData, interp, level, command, commandInfo, objc, objv);
-}
-
-static void traceWrapperDelProc(void *clientData)
-{
- TraceWrapperInfo *info = (TraceWrapperInfo *)clientData;
- clientData = info->clientData;
- if (info->delProc) {
- info->delProc(clientData);
- }
- ckfree(info);
-}
-
-Tcl_Trace
-Tcl_CreateObjTrace2(
- Tcl_Interp *interp, /* Tcl interpreter */
- Tcl_Size level, /* Maximum nesting level */
- int flags, /* Flags, see above */
- Tcl_CmdObjTraceProc2 *proc, /* Trace callback */
- void *clientData, /* Client data for the callback */
- Tcl_CmdObjTraceDeleteProc *delProc)
- /* Function to call when trace is deleted */
-{
- TraceWrapperInfo *info = (TraceWrapperInfo *)ckalloc(sizeof(TraceWrapperInfo));
- info->proc = proc;
- info->delProc = delProc;
- info->clientData = clientData;
- return Tcl_CreateObjTrace(interp, level, flags,
- (proc ? traceWrapperProc : NULL),
- info, traceWrapperDelProc);
-}
-
Tcl_Trace
Tcl_CreateObjTrace(
Tcl_Interp *interp, /* Tcl interpreter */
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index cfb0cf7..0f65e04 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -2313,7 +2313,7 @@ ZipFSMountBufferObjCmd(
return TCL_OK;
}
- data = TclGetBytesFromObj(interp, objv[2], &length);
+ data = Tcl_GetBytesFromObj(interp, objv[2], &length);
if (data == NULL) {
return TCL_ERROR;
}
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 1d64877..5b7d790 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -1183,8 +1183,8 @@ Tcl_ZlibStreamSetCompressionDictionary(
{
ZlibStreamHandle *zshPtr = (ZlibStreamHandle *) zshandle;
- if (compressionDictionaryObj && (NULL == TclGetBytesFromObj(NULL,
- compressionDictionaryObj, (int *)NULL))) {
+ if (compressionDictionaryObj && (NULL == Tcl_GetBytesFromObj(NULL,
+ compressionDictionaryObj, NULL))) {
/* Missing or invalid compression dictionary */
compressionDictionaryObj = NULL;
}
@@ -1239,7 +1239,7 @@ Tcl_ZlibStreamPut(
return TCL_ERROR;
}
- bytes = TclGetBytesFromObj(zshPtr->interp, data, &size);
+ bytes = Tcl_GetBytesFromObj(zshPtr->interp, data, &size);
if (bytes == NULL) {
return TCL_ERROR;
}
@@ -1370,7 +1370,7 @@ Tcl_ZlibStreamGet(
return TCL_OK;
}
- if (NULL == TclGetBytesFromObj(zshPtr->interp, data, &existing)) {
+ if (NULL == Tcl_GetBytesFromObj(zshPtr->interp, data, &existing)) {
return TCL_ERROR;
}
@@ -1625,7 +1625,7 @@ Tcl_ZlibDeflate(
* to the deflate command.
*/
- inData = TclGetBytesFromObj(interp, data, &inLen);
+ inData = Tcl_GetBytesFromObj(interp, data, &inLen);
if (inData == NULL) {
return TCL_ERROR;
}
@@ -1775,7 +1775,7 @@ Tcl_ZlibInflate(
return TCL_ERROR;
}
- inData = TclGetBytesFromObj(interp, data, &inLen);
+ inData = Tcl_GetBytesFromObj(interp, data, &inLen);
if (inData == NULL) {
return TCL_ERROR;
}
@@ -2012,7 +2012,7 @@ ZlibCmd(
Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?");
return TCL_ERROR;
}
- data = TclGetBytesFromObj(interp, objv[2], &dlen);
+ data = Tcl_GetBytesFromObj(interp, objv[2], &dlen);
if (data == NULL) {
return TCL_ERROR;
}
@@ -2032,7 +2032,7 @@ ZlibCmd(
Tcl_WrongNumArgs(interp, 2, objv, "data ?startValue?");
return TCL_ERROR;
}
- data = TclGetBytesFromObj(interp, objv[2], &dlen);
+ data = Tcl_GetBytesFromObj(interp, objv[2], &dlen);
if (data == NULL) {
return TCL_ERROR;
}
@@ -2376,7 +2376,7 @@ ZlibStreamSubcmd(
}
if (compDictObj) {
- if (NULL == TclGetBytesFromObj(interp, compDictObj, NULL)) {
+ if (NULL == Tcl_GetBytesFromObj(interp, compDictObj, NULL)) {
return TCL_ERROR;
}
}
@@ -2559,7 +2559,7 @@ ZlibPushSubcmd(
}
}
- if (compDictObj && (NULL == TclGetBytesFromObj(interp, compDictObj, NULL))) {
+ if (compDictObj && (NULL == Tcl_GetBytesFromObj(interp, compDictObj, NULL))) {
return TCL_ERROR;
}
@@ -2808,7 +2808,7 @@ ZlibStreamAddCmd(
if (compDictObj != NULL) {
int len;
- if (NULL == TclGetBytesFromObj(interp, compDictObj, &len)) {
+ if (NULL == Tcl_GetBytesFromObj(interp, compDictObj, &len)) {
return TCL_ERROR;
}
@@ -2915,7 +2915,7 @@ ZlibStreamPutCmd(
if (compDictObj != NULL) {
int len;
- if (NULL == TclGetBytesFromObj(interp, compDictObj, &len)) {
+ if (NULL == Tcl_GetBytesFromObj(interp, compDictObj, &len)) {
return TCL_ERROR;
}
if (len == 0) {
@@ -3354,7 +3354,7 @@ ZlibTransformSetOption( /* not used */
TclNewStringObj(compDictObj, value, strlen(value));
Tcl_IncrRefCount(compDictObj);
- if (NULL == TclGetBytesFromObj(interp, compDictObj, NULL)) {
+ if (NULL == Tcl_GetBytesFromObj(interp, compDictObj, NULL)) {
Tcl_DecrRefCount(compDictObj);
return TCL_ERROR;
}
@@ -3745,7 +3745,7 @@ ZlibStackChannelTransform(
if (compDictObj != NULL) {
cd->compDictObj = Tcl_DuplicateObj(compDictObj);
Tcl_IncrRefCount(cd->compDictObj);
- TclGetByteArrayFromObj(cd->compDictObj, NULL);
+ Tcl_GetByteArrayFromObj(cd->compDictObj, NULL);
}
if (format == TCL_ZLIB_FORMAT_RAW) {
diff --git a/tests/binary.test b/tests/binary.test
index 2782a9d..9a309e0 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -3015,16 +3015,16 @@ test binary-79.2 {Tcl_SetByteArrayLength} testsetbytearraylength {
testsetbytearraylength [string cat Ł B C] 1
} A
-test binary-80.1 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
+test binary-80.1 {Tcl_GetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
testbytestring "乎"
} -result "expected byte sequence but character 0 was '乎' (U+004E4E)"
-test binary-80.2 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
+test binary-80.2 {Tcl_GetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
testbytestring [testbytestring "\x00\xA0\xA0\xA0\xE4\xB9\x8E"]
} -result "expected byte sequence but character 4 was '乎' (U+004E4E)"
-test binary-80.3 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
+test binary-80.3 {Tcl_GetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
testbytestring [testbytestring "\xC0\x80\xA0\xA0\xA0\xE4\xB9\x8E"]
} -result "expected byte sequence but character 4 was '乎' (U+004E4E)"
-test binary-80.4 {TclGetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
+test binary-80.4 {Tcl_GetBytesFromObj} -constraints testbytestring -returnCodes 1 -body {
testbytestring [testbytestring "\xC0\x80\xA0\xA0\xA0\xF0\x9F\x98\x81"]
} -result "expected byte sequence but character 4 was '\U01F601' (U+01F601)"
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index e75a2c3..7f28bf2 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -94,6 +94,7 @@ static TclOOStubs stubsCopy = {
#ifdef Tcl_GetObjectClassName
,NULL
#endif
+#if TCL_MAJOR_VERSION > 8
#ifdef Tcl_MethodIsType2
,NULL
#endif
@@ -103,6 +104,7 @@ static TclOOStubs stubsCopy = {
#ifdef Tcl_NewMethod2
,NULL
#endif
+#endif
};
DLLEXPORT int
diff --git a/unix/dltest/pkgt.c b/unix/dltest/pkgt.c
index 0c4b3d7..522f4db 100644
--- a/unix/dltest/pkgt.c
+++ b/unix/dltest/pkgt.c
@@ -16,10 +16,10 @@
static int TraceProc2 (
void *clientData,
Tcl_Interp *interp,
- ptrdiff_t level,
+ Tcl_Size level,
const char *command,
Tcl_Command commandInfo,
- ptrdiff_t objc,
+ Tcl_Size objc,
struct Tcl_Obj *const *objv)
{
(void)clientData;
@@ -55,12 +55,12 @@ static int
Pkgt_EqObjCmd2(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- ptrdiff_t objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt result;
const char *str1, *str2;
- ptrdiff_t len1, len2;
+ Tcl_Size len1, len2;
(void)dummy;
if (objc != 3) {