summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-01-10 17:40:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-01-10 17:40:34 (GMT)
commit31f988f9c8583f704998b8c21a66fbefa136651b (patch)
treeb5313a900cccc45a2ebfc9197f597fd39b74645f /generic
parent341619118a2ea2f6da6062f2069842d22d2bbb8f (diff)
parent2d27c96b7eebdceae93e88adf3ca88ebbc6efab5 (diff)
downloadtcl-31f988f9c8583f704998b8c21a66fbefa136651b.zip
tcl-31f988f9c8583f704998b8c21a66fbefa136651b.tar.gz
tcl-31f988f9c8583f704998b8c21a66fbefa136651b.tar.bz2
merge 8.7
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls2
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclCompile.c2
-rw-r--r--generic/tclDecls.h4
-rw-r--r--generic/tclExecute.c43
-rw-r--r--generic/tclInterp.c11
-rw-r--r--generic/tclLink.c8
-rw-r--r--generic/tclMain.c2
-rw-r--r--generic/tclResult.c32
-rw-r--r--generic/tclStrToD.c26
-rw-r--r--generic/tclStringObj.c4
-rw-r--r--generic/tclTest.c28
12 files changed, 100 insertions, 64 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 8555ac2..528938d 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -2221,7 +2221,7 @@ declare 606 {
# TIP#307 (move results between interpreters) dkf
declare 607 {
- void Tcl_TransferResult(Tcl_Interp *sourceInterp, int result,
+ void Tcl_TransferResult(Tcl_Interp *sourceInterp, int code,
Tcl_Interp *targetInterp)
}
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index ac290b6..b216e05 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1866,8 +1866,10 @@ DeleteInterpProc(
* could have transferred ownership of the result string to Tcl.
*/
+#ifndef TCL_NO_DEPRECATED
Tcl_FreeResult(interp);
iPtr->result = NULL;
+#endif
Tcl_DecrRefCount(iPtr->objResultPtr);
iPtr->objResultPtr = NULL;
Tcl_DecrRefCount(iPtr->ecVar);
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 9c887e4..7afbc33 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -797,7 +797,7 @@ TclSetByteCodeFromAny(
#ifdef TCL_COMPILE_DEBUG
if (!traceInitialized) {
if (Tcl_LinkVar(interp, "tcl_traceCompile",
- (char *) &tclTraceCompile, TCL_LINK_INT) != TCL_OK) {
+ &tclTraceCompile, TCL_LINK_INT) != TCL_OK) {
Tcl_Panic("SetByteCodeFromAny: unable to create link for tcl_traceCompile variable");
}
traceInitialized = 1;
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 4f2d63f..ed1da85 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1792,7 +1792,7 @@ EXTERN int Tcl_GetErrorLine(Tcl_Interp *interp);
EXTERN void Tcl_SetErrorLine(Tcl_Interp *interp, int lineNum);
/* 607 */
EXTERN void Tcl_TransferResult(Tcl_Interp *sourceInterp,
- int result, Tcl_Interp *targetInterp);
+ int code, Tcl_Interp *targetInterp);
/* 608 */
EXTERN int Tcl_InterpActive(Tcl_Interp *interp);
/* 609 */
@@ -2555,7 +2555,7 @@ typedef struct TclStubs {
int (*tcl_ParseArgsObjv) (Tcl_Interp *interp, const Tcl_ArgvInfo *argTable, int *objcPtr, Tcl_Obj *const *objv, Tcl_Obj ***remObjv); /* 604 */
int (*tcl_GetErrorLine) (Tcl_Interp *interp); /* 605 */
void (*tcl_SetErrorLine) (Tcl_Interp *interp, int lineNum); /* 606 */
- void (*tcl_TransferResult) (Tcl_Interp *sourceInterp, int result, Tcl_Interp *targetInterp); /* 607 */
+ void (*tcl_TransferResult) (Tcl_Interp *sourceInterp, int code, Tcl_Interp *targetInterp); /* 607 */
int (*tcl_InterpActive) (Tcl_Interp *interp); /* 608 */
void (*tcl_BackgroundException) (Tcl_Interp *interp, int code); /* 609 */
int (*tcl_ZlibDeflate) (Tcl_Interp *interp, int format, Tcl_Obj *data, int level, Tcl_Obj *gzipHeaderDictObj); /* 610 */
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 72b9746..8bc83cc 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -794,12 +794,14 @@ InitByteCodeExecution(
* instruction tracing. */
{
#ifdef TCL_COMPILE_DEBUG
- if (Tcl_LinkVar(interp, "tcl_traceExec", (char *) &tclTraceExec,
+ if (Tcl_LinkVar(interp, "tcl_traceExec", &tclTraceExec,
TCL_LINK_INT) != TCL_OK) {
Tcl_Panic("InitByteCodeExecution: can't create link for tcl_traceExec variable");
}
#endif
-#ifdef TCL_COMPILE_STATS
+#ifndef TCL_COMPILE_STATS
+ (void)interp;
+#else
Tcl_CreateObjCommand(interp, "evalstats", EvalStatsCmd, NULL, NULL);
#endif /* TCL_COMPILE_STATS */
}
@@ -1345,11 +1347,12 @@ Tcl_ExprObj(
static int
CopyCallback(
ClientData data[],
- Tcl_Interp *interp,
+ Tcl_Interp *dummy,
int result)
{
Tcl_Obj **resultPtrPtr = data[0];
Tcl_Obj *resultPtr = data[1];
+ (void)dummy;
if (result == TCL_OK) {
*resultPtrPtr = resultPtr;
@@ -1543,6 +1546,8 @@ DupExprCodeInternalRep(
Tcl_Obj *srcPtr,
Tcl_Obj *copyPtr)
{
+ (void)srcPtr;
+ (void)copyPtr;
return;
}
@@ -2604,6 +2609,7 @@ TEBCresume(
TRACE(("%u => OK\n", opnd));
NEXT_INST_F(5, 0, 0);
}
+ break;
case INST_STR_CONCAT1:
@@ -2727,6 +2733,7 @@ TEBCresume(
Tcl_DecrRefCount(objPtr);
NEXT_INST_F(5, 0, 0);
}
+ break;
case INST_EXPR_STK: {
ByteCode *newCodePtr;
@@ -4025,6 +4032,7 @@ TEBCresume(
}
NEXT_INST_F(5, 0, 0);
}
+ break;
/*
* End of INST_UNSET instructions.
@@ -4242,6 +4250,7 @@ TEBCresume(
TRACE_APPEND(("link made\n"));
NEXT_INST_F(5, 1, 0);
}
+ break;
/*
* End of variable linking instructions.
@@ -4315,6 +4324,7 @@ TEBCresume(
#endif
NEXT_INST_F(jmpOffset[b], 1, 0);
}
+ break;
case INST_JUMP_TABLE: {
Tcl_HashEntry *hPtr;
@@ -4340,6 +4350,7 @@ TEBCresume(
NEXT_INST_F(5, 1, 0);
}
}
+ break;
/*
* These two instructions are now redundant: the complete logic of the LOR
@@ -4384,6 +4395,7 @@ TEBCresume(
TRACE(("%.20s %.20s => %d\n", O2S(valuePtr),O2S(value2Ptr),iResult));
NEXT_INST_F(1, 2, 1);
}
+ break;
/*
* -----------------------------------------------------------------
@@ -4402,6 +4414,7 @@ TEBCresume(
TRACE_WITH_OBJ(("=> "), objResultPtr);
NEXT_INST_F(1, 0, 1);
}
+ break;
case INST_COROUTINE_NAME: {
CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
@@ -4413,6 +4426,7 @@ TEBCresume(
TRACE_WITH_OBJ(("=> "), objResultPtr);
NEXT_INST_F(1, 0, 1);
}
+ break;
case INST_INFO_LEVEL_NUM:
TclNewIntObj(objResultPtr, iPtr->varFramePtr->level);
TRACE_WITH_OBJ(("=> "), objResultPtr);
@@ -5648,6 +5662,7 @@ TEBCresume(
JUMP_PEEPHOLE_F(match, 2, 2);
}
+ break;
/*
* End of string-related instructions.
@@ -5838,6 +5853,7 @@ TEBCresume(
wResult = w1 - w2*wResult;
goto wideResultOfArithmetic;
}
+ break;
case INST_RSHIFT:
if (w2 < 0) {
@@ -5886,6 +5902,7 @@ TEBCresume(
wResult = w1 >> ((int) w2);
goto wideResultOfArithmetic;
}
+ break;
case INST_LSHIFT:
if (w2 < 0) {
@@ -6322,6 +6339,7 @@ TEBCresume(
TRACE_APPEND(("numeric, same Tcl_Obj\n"));
NEXT_INST_F(1, 0, 0);
}
+ break;
/*
* End of numeric operator instructions.
@@ -6719,6 +6737,7 @@ TEBCresume(
Tcl_ListObjAppendElement(NULL, objPtr, OBJ_AT_TOS);
NEXT_INST_F(1, 1, 0);
}
+ break;
case INST_BEGIN_CATCH4:
/*
@@ -7428,6 +7447,7 @@ TEBCresume(
TRACE_APPEND(("OK\n"));
NEXT_INST_F(5, 2, 0);
}
+ break;
/*
* End of dictionary-related instructions.
@@ -7465,6 +7485,7 @@ TEBCresume(
TRACE_WITH_OBJ(("=> "), objResultPtr);
NEXT_INST_F(2, 0, 1);
}
+ break;
default:
Tcl_Panic("TclNRExecuteByteCode: unrecognized opCode %u", *pc);
@@ -8090,7 +8111,7 @@ ExecuteExtendedBinaryMathOp(
mp_init(&bigResult);
mp_init(&bigRemainder);
mp_div(&big1, &big2, &bigResult, &bigRemainder);
- if ((bigRemainder.used != 0) && (bigRemainder.sign != big2.sign)) {
+ if (!mp_iszero(&bigRemainder) && (bigRemainder.sign != big2.sign)) {
/*
* Convert to Tcl's integer division rules.
*/
@@ -8321,7 +8342,7 @@ ExecuteExtendedBinaryMathOp(
Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
negativeExponent = mp_isneg(&big2);
mp_mod_2d(&big2, 1, &big2);
- oddExponent = big2.used != 0;
+ oddExponent = !mp_iszero(&big2);
mp_clear(&big2);
}
@@ -8638,7 +8659,7 @@ ExecuteExtendedBinaryMathOp(
mp_mul(&big1, &big2, &bigResult);
break;
case INST_DIV:
- if (big2.used == 0) {
+ if (mp_iszero(&big2)) {
mp_clear(&big1);
mp_clear(&big2);
mp_clear(&bigResult);
@@ -8647,7 +8668,7 @@ ExecuteExtendedBinaryMathOp(
mp_init(&bigRemainder);
mp_div(&big1, &big2, &bigResult, &bigRemainder);
/* TODO: internals intrusion */
- if ((bigRemainder.used != 0)
+ if (!mp_iszero(&bigRemainder)
&& (bigRemainder.sign != big2.sign)) {
/*
* Convert to Tcl's integer division rules.
@@ -9056,12 +9077,12 @@ IllegalExprOperandType(
ClientData ptr;
int type;
const unsigned char opcode = *pc;
- const char *description, *operator = "unknown";
+ const char *description, *op = "unknown";
if (opcode == INST_EXPON) {
- operator = "**";
+ op = "**";
} else if (opcode <= INST_LNOT) {
- operator = operatorStrings[opcode - INST_LOR];
+ op = operatorStrings[opcode - INST_LOR];
}
if (GetNumberFromObj(NULL, opndPtr, &ptr, &type) != TCL_OK) {
@@ -9085,7 +9106,7 @@ IllegalExprOperandType(
}
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't use %s as operand of \"%s\"", description, operator));
+ "can't use %s as operand of \"%s\"", description, op));
Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", description, NULL);
}
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index bd786f3..7d1dd0d 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -525,7 +525,7 @@ TclInterpInit(
static void
InterpInfoDeleteProc(
- ClientData clientData, /* Ignored. */
+ ClientData dummy, /* Ignored. */
Tcl_Interp *interp) /* Interp being deleted. All commands for
* slave interps should already be deleted. */
{
@@ -533,6 +533,7 @@ InterpInfoDeleteProc(
Slave *slavePtr;
Master *masterPtr;
Target *targetPtr;
+ (void)dummy;
interpInfoPtr = (InterpInfo *) ((Interp *) interp)->interpInfo;
@@ -614,7 +615,7 @@ Tcl_InterpObjCmd(
static int
NRInterpCmd(
- ClientData clientData, /* Unused. */
+ ClientData dummy, /* Unused. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -638,6 +639,7 @@ NRInterpCmd(
OPT_INVOKEHID, OPT_LIMIT, OPT_MARKTRUSTED,OPT_RECLIMIT,
OPT_SLAVES, OPT_SHARE, OPT_TARGET, OPT_TRANSFER
};
+ (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "cmd ?arg ...?");
@@ -999,6 +1001,7 @@ NRInterpCmd(
return SlaveTimeLimitCmd(interp, slaveInterp, 4, objc, objv);
}
}
+ break;
case OPT_MARKTRUSTED:
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "path");
@@ -2707,6 +2710,7 @@ NRSlaveCmd(
return SlaveTimeLimitCmd(interp, slaveInterp, 3, objc, objv);
}
}
+ break;
case OPT_MARKTRUSTED:
if (objc != 2) {
Tcl_WrongNumArgs(interp, 2, objv, NULL);
@@ -4235,10 +4239,11 @@ DeleteScriptLimitCallback(
static void
CallScriptLimitCallback(
ClientData clientData,
- Tcl_Interp *interp) /* Interpreter which failed the limit */
+ Tcl_Interp *dummy) /* Interpreter which failed the limit */
{
ScriptLimitCallback *limitCBPtr = clientData;
int code;
+ (void)dummy;
if (Tcl_InterpDeleted(limitCBPtr->interp)) {
return;
diff --git a/generic/tclLink.c b/generic/tclLink.c
index 8fbe540..ecb7aa5 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.c
@@ -261,6 +261,14 @@ Tcl_LinkArray(
linkPtr = ckalloc(sizeof(Link));
linkPtr->type = type & ~TCL_LINK_READ_ONLY;
+#if !defined(TCL_NO_DEPRECATED) && (defined(TCL_WIDE_INT_IS_LONG) \
+ || defined(_WIN32) || defined(__CYGWIN__))
+ if (linkPtr->type == 11 /* legacy TCL_LINK_LONG */) {
+ linkPtr->type = TCL_LINK_LONG;
+ } else if (linkPtr->type == 12 /* legacy TCL_LINK_ULONG */) {
+ linkPtr->type = TCL_LINK_ULONG;
+ }
+#endif
linkPtr->numElems = size;
if (type & TCL_LINK_READ_ONLY) {
linkPtr->flags = LINK_READ_ONLY;
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 05d3787..0ed5de1 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -446,7 +446,7 @@ Tcl_MainEx(
* Get a new value for tty if anyone writes to ::tcl_interactive
*/
- Tcl_LinkVar(interp, "tcl_interactive", (char *) &is.tty, TCL_LINK_BOOLEAN);
+ Tcl_LinkVar(interp, "tcl_interactive", &is.tty, TCL_LINK_BOOLEAN);
is.input = Tcl_GetStdChannel(TCL_STDIN);
while ((is.input != NULL) && !Tcl_InterpDeleted(interp)) {
mainLoopProc = TclGetMainLoop();
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 3c856d3..5c2a81f 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -1690,22 +1690,14 @@ Tcl_SetReturnOptions(
*
* Tcl_TransferResult --
*
- * Copy the result (and error information) from one interp to another.
+ * Transfer the result (and error information) from one interp to another.
* Used when one interp has caused another interp to evaluate a script
* and then wants to transfer the results back to itself.
*
- * This routine copies the string reps of the result and error
- * information. It does not simply increment the refcounts of the result
- * and error information objects themselves. It is not legal to exchange
- * objects between interps, because an object may be kept alive by one
- * interp, but have an internal rep that is only valid while some other
- * interp is alive.
- *
* Results:
- * The target interp's result is set to a copy of the source interp's
- * result. The source's errorInfo field may be transferred to the
- * target's errorInfo field, and the source's errorCode field may be
- * transferred to the target's errorCode field.
+ * The result of targetInterp is set to the result read from sourceInterp.
+ * The return options dictionary of sourceInterp is transferred to
+ * targetInterp as appropriate for the return code value code.
*
* Side effects:
* None.
@@ -1715,14 +1707,16 @@ Tcl_SetReturnOptions(
void
Tcl_TransferResult(
- Tcl_Interp *sourceInterp, /* Interp whose result and error information
+ Tcl_Interp *sourceInterp, /* Interp whose result and return options
* should be moved to the target interp.
* After moving result, this interp's result
* is reset. */
- int result, /* TCL_OK if just the result should be copied,
- * TCL_ERROR if both the result and error
- * information should be copied. */
- Tcl_Interp *targetInterp) /* Interp where result and error information
+ int code, /* The return code value active in
+ * sourceInterp. Controls how the return options
+ * dictionary is retrieved from sourceInterp,
+ * same as in Tcl_GetReturnOptions, to then be
+ * transferred to targetInterp. */
+ Tcl_Interp *targetInterp) /* Interp where result and return options
* should be stored. If source and target are
* the same, nothing is done. */
{
@@ -1733,7 +1727,7 @@ Tcl_TransferResult(
return;
}
- if (result == TCL_OK && siPtr->returnOpts == NULL) {
+ if (code == TCL_OK && siPtr->returnOpts == NULL) {
/*
* Special optimization for the common case of normal command return
* code and no explicit return options.
@@ -1745,7 +1739,7 @@ Tcl_TransferResult(
}
} else {
Tcl_SetReturnOptions(targetInterp,
- Tcl_GetReturnOptions(sourceInterp, result));
+ Tcl_GetReturnOptions(sourceInterp, code));
tiPtr->flags &= ~(ERR_ALREADY_LOGGED);
}
Tcl_SetObjResult(targetInterp, Tcl_GetObjResult(sourceInterp));
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index 236fe59..8939fa0 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -15,8 +15,13 @@
#include "tclInt.h"
#include "tclTomMath.h"
+#include <float.h>
#include <math.h>
+#ifdef _WIN32
+#define copysign _copysign
+#endif
+
/*
* This code supports (at least hypothetically), IBM, Cray, VAX and IEEE-754
* floating point; of these, only IEEE-754 can represent NaN. IEEE-754 can be
@@ -1296,7 +1301,7 @@ TclParseNumber(
case DECIMAL:
significandOverflow = AccumulateDecimalDigit(0, numTrailZeros-1,
&significandWide, &significandBig, significandOverflow);
- if (!significandOverflow && (significandWide > MOST_BITS+signum)){
+ if (!significandOverflow && (significandWide > MOST_BITS+signum)) {
significandOverflow = 1;
mp_init_u64(&significandBig, significandWide);
}
@@ -1338,9 +1343,9 @@ TclParseNumber(
objPtr->typePtr = &tclDoubleType;
if (exponentSignum) {
- /*
+ /*
* At this point exponent>=0, so the following calculation
- * cannot underflow.
+ * cannot underflow.
*/
exponent = -exponent;
}
@@ -1366,7 +1371,7 @@ TclParseNumber(
}
}
- /*
+ /*
* The desired number is now significandWide * 10**exponent
* or significandBig * 10**exponent, depending on whether
* the significand has overflowed a wide int.
@@ -1393,7 +1398,7 @@ TclParseNumber(
#ifdef IEEE_FLOATING_POINT
case sNAN:
case sNANFINISH:
- objPtr->internalRep.doubleValue = MakeNaN(signum,significandWide);
+ objPtr->internalRep.doubleValue = MakeNaN(signum, significandWide);
objPtr->typePtr = &tclDoubleType;
break;
#endif
@@ -1889,7 +1894,7 @@ RefineApproximation(
/*
* Compute twoMv as 2*M*v, where v is the approximate value.
- * This is done by bit-whacking to calculate 2**(M2+1)*significand,
+ * This is done by bit-whacking to calculate 2**(M2+1)*significand,
* and then multiplying by 5**M5.
*/
@@ -1924,7 +1929,7 @@ RefineApproximation(
}
mp_mul_2d(&twoMd, M2+exponent+1, &twoMd);
- /*
+ /*
* Now let twoMd = twoMd - twoMv, the difference between the exact and
* approximate values.
*/
@@ -1992,7 +1997,7 @@ RefineApproximation(
}
}
- /*
+ /*
* Reduce the numerator and denominator of the corrector term so that
* they will fit in the floating point precision.
*/
@@ -4409,7 +4414,8 @@ TclInitDoubleConversion(void)
maxpow10_wide = (int)
floor(sizeof(Tcl_WideUInt) * CHAR_BIT * log(2.) / log(10.));
- pow10_wide = ckalloc((maxpow10_wide + 1) * sizeof(Tcl_WideUInt));
+ pow10_wide = (Tcl_WideUInt *)
+ ckalloc((maxpow10_wide + 1) * sizeof(Tcl_WideUInt));
u = 1;
for (i = 0; i < maxpow10_wide; ++i) {
pow10_wide[i] = u;
@@ -4737,7 +4743,7 @@ TclCeil(
mp_int d;
mp_init(&d);
mp_div_2d(a, -shift, &b, &d);
- exact = d.used == 0;
+ exact = mp_iszero(&d);
mp_clear(&d);
} else {
mp_copy(a, &b);
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index eed49b1..5512bc5 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -2270,7 +2270,7 @@ Tcl_AppendFormatToObj(
uw /= base;
}
#endif
- } else if (useBig && big.used) {
+ } else if (useBig && !mp_iszero(&big)) {
int leftover = (big.used * MP_DIGIT_BIT) % numBits;
mp_digit mask = (~(mp_digit)0) << (MP_DIGIT_BIT-leftover);
@@ -2309,7 +2309,7 @@ Tcl_AppendFormatToObj(
while (numDigits--) {
int digitOffset;
- if (useBig && big.used) {
+ if (useBig && !mp_iszero(&big)) {
if (index < big.used && (size_t) shift <
CHAR_BIT*sizeof(Tcl_WideUInt) - MP_DIGIT_BIT) {
bits |= ((Tcl_WideUInt) big.dp[index++]) << shift;
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 403b0a9..9270727 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2922,7 +2922,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "int", (char *) &intVar,
+ if (Tcl_LinkVar(interp, "int", &intVar,
TCL_LINK_INT | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2930,7 +2930,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "real", (char *) &realVar,
+ if (Tcl_LinkVar(interp, "real", &realVar,
TCL_LINK_DOUBLE | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2938,7 +2938,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "bool", (char *) &boolVar,
+ if (Tcl_LinkVar(interp, "bool", &boolVar,
TCL_LINK_BOOLEAN | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2946,7 +2946,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "string", (char *) &stringVar,
+ if (Tcl_LinkVar(interp, "string", &stringVar,
TCL_LINK_STRING | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2954,7 +2954,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "wide", (char *) &wideVar,
+ if (Tcl_LinkVar(interp, "wide", &wideVar,
TCL_LINK_WIDE_INT | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2962,7 +2962,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "char", (char *) &charVar,
+ if (Tcl_LinkVar(interp, "char", &charVar,
TCL_LINK_CHAR | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2970,7 +2970,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "uchar", (char *) &ucharVar,
+ if (Tcl_LinkVar(interp, "uchar", &ucharVar,
TCL_LINK_UCHAR | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2978,7 +2978,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "short", (char *) &shortVar,
+ if (Tcl_LinkVar(interp, "short", &shortVar,
TCL_LINK_SHORT | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2986,7 +2986,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "ushort", (char *) &ushortVar,
+ if (Tcl_LinkVar(interp, "ushort", &ushortVar,
TCL_LINK_USHORT | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -2994,7 +2994,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "uint", (char *) &uintVar,
+ if (Tcl_LinkVar(interp, "uint", &uintVar,
TCL_LINK_UINT | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -3002,7 +3002,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "long", (char *) &longVar,
+ if (Tcl_LinkVar(interp, "long", &longVar,
TCL_LINK_LONG | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -3010,7 +3010,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "ulong", (char *) &ulongVar,
+ if (Tcl_LinkVar(interp, "ulong", &ulongVar,
TCL_LINK_ULONG | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -3018,7 +3018,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "float", (char *) &floatVar,
+ if (Tcl_LinkVar(interp, "float", &floatVar,
TCL_LINK_FLOAT | flag) != TCL_OK) {
return TCL_ERROR;
}
@@ -3026,7 +3026,7 @@ TestlinkCmd(
return TCL_ERROR;
}
flag = (writable != 0) ? 0 : TCL_LINK_READ_ONLY;
- if (Tcl_LinkVar(interp, "uwide", (char *) &uwideVar,
+ if (Tcl_LinkVar(interp, "uwide", &uwideVar,
TCL_LINK_WIDE_UINT | flag) != TCL_OK) {
return TCL_ERROR;
}