summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 3ae8d43..5cf15ce 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1296,11 +1296,11 @@ TclRegisterCommandTypeName(
int isNew;
hPtr = Tcl_CreateHashEntry(&commandTypeTable,
- (void *) implementationProc, &isNew);
+ implementationProc, &isNew);
Tcl_SetHashValue(hPtr, (void *) nameStr);
} else {
hPtr = Tcl_FindHashEntry(&commandTypeTable,
- (void *) implementationProc);
+ implementationProc);
if (hPtr != NULL) {
Tcl_DeleteHashEntry(hPtr);
}
@@ -1643,7 +1643,7 @@ Tcl_DeleteAssocData(
*----------------------------------------------------------------------
*/
-ClientData
+void *
Tcl_GetAssocData(
Tcl_Interp *interp, /* Interpreter associated with. */
const char *name, /* Name of association. */
@@ -1811,7 +1811,7 @@ DeleteInterpProc(
*/
Tcl_MutexLock(&cancelLock);
- hPtr = Tcl_FindHashEntry(&cancelTable, (char *) iPtr);
+ hPtr = Tcl_FindHashEntry(&cancelTable, iPtr);
if (hPtr != NULL) {
CancelInfo *cancelInfo = (CancelInfo *)Tcl_GetHashValue(hPtr);
@@ -4132,7 +4132,7 @@ Tcl_CancelEval(
goto done;
}
- hPtr = Tcl_FindHashEntry(&cancelTable, (char *) interp);
+ hPtr = Tcl_FindHashEntry(&cancelTable, interp);
if (hPtr == NULL) {
/*
* No CancelInfo record for this interpreter.
@@ -4215,7 +4215,7 @@ int
Tcl_EvalObjv(
Tcl_Interp *interp, /* Interpreter in which to evaluate the
* command. Also used for error reporting. */
- int objc, /* Number of words in command. */
+ size_t objc, /* Number of words in command. */
Tcl_Obj *const objv[], /* An array of pointers to objects that are
* the words that make up the command. */
int flags) /* Collection of OR-ed bits that control the
@@ -4565,7 +4565,7 @@ TEOV_PushExceptionHandlers(
*/
TclNRAddCallback(interp, TEOV_Error, INT2PTR(objc),
- (ClientData) objv, NULL, NULL);
+ objv, NULL, NULL);
}
if (iPtr->numLevels == 1) {
@@ -4671,7 +4671,7 @@ TEOV_NotFound(
{
Command * cmdPtr;
Interp *iPtr = (Interp *) interp;
- int i, newObjc, handlerObjc;
+ size_t i, newObjc, handlerObjc;
Tcl_Obj **newObjv, **handlerObjv;
CallFrame *varFramePtr = iPtr->varFramePtr;
Namespace *currNsPtr = NULL;/* Used to check for and invoke any registered
@@ -5146,7 +5146,7 @@ TclEvalEx(
parsePtr->commandStart - outerScript);
gotParse = 1;
- if (parsePtr->numWords > 0) {
+ if ((int)parsePtr->numWords > 0) {
/*
* TIP #280. Track lines within the words of the current
* command. We use a separate pointer into the table of
@@ -5209,7 +5209,7 @@ TclEvalEx(
objv[objectsUsed] = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objv[objectsUsed]);
if (tokenPtr->type == TCL_TOKEN_EXPAND_WORD) {
- int numElements;
+ size_t numElements;
code = TclListObjLength(interp, objv[objectsUsed],
&numElements);
@@ -5260,7 +5260,7 @@ TclEvalEx(
objectsUsed = 0;
while (wordIdx--) {
if (expand[wordIdx]) {
- int numElements;
+ size_t numElements;
Tcl_Obj **elements, *temp = copy[wordIdx];
TclListObjGetElements(NULL, temp, &numElements,
@@ -5302,7 +5302,7 @@ TclEvalEx(
eeFramePtr->len = parsePtr->commandSize;
if (parsePtr->term ==
- parsePtr->commandStart + parsePtr->commandSize - 1) {
+ parsePtr->commandStart + (int)parsePtr->commandSize - 1) {
eeFramePtr->len--;
}
@@ -5353,7 +5353,7 @@ TclEvalEx(
* executed command.
*/
- next = parsePtr->commandStart + parsePtr->commandSize;
+ next = parsePtr->commandStart + (int)parsePtr->commandSize;
bytesLeft -= next - p;
p = next;
TclAdvanceLines(&line, parsePtr->commandStart, p);
@@ -5379,7 +5379,7 @@ TclEvalEx(
}
}
if ((code == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) {
- commandLength = parsePtr->commandSize;
+ commandLength = (int)parsePtr->commandSize;
if (parsePtr->term == parsePtr->commandStart + commandLength - 1) {
/*
* The terminator character (such as ; or ]) of the command where
@@ -5624,7 +5624,7 @@ TclArgumentRelease(
for (i = 1; i < objc; i++) {
CFWord *cfwPtr;
Tcl_HashEntry *hPtr =
- Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) objv[i]);
+ Tcl_FindHashEntry(iPtr->lineLAPtr, objv[i]);
if (!hPtr) {
continue;
@@ -5676,7 +5676,7 @@ TclArgumentBCEnter(
CFWordBC *lastPtr = NULL;
Interp *iPtr = (Interp *) interp;
Tcl_HashEntry *hePtr =
- Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr);
+ Tcl_FindHashEntry(iPtr->lineBCPtr, codePtr);
if (!hePtr) {
return;
@@ -5782,7 +5782,7 @@ TclArgumentBCRelease(
while (cfwPtr) {
CFWordBC *nextPtr = cfwPtr->nextPtr;
Tcl_HashEntry *hPtr =
- Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) cfwPtr->obj);
+ Tcl_FindHashEntry(iPtr->lineLABCPtr, cfwPtr->obj);
CFWordBC *xPtr = (CFWordBC *)Tcl_GetHashValue(hPtr);
if (xPtr != cfwPtr) {
@@ -5847,7 +5847,7 @@ TclArgumentGet(
* stack. That is nearest.
*/
- hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) obj);
+ hPtr = Tcl_FindHashEntry(iPtr->lineLAPtr, obj);
if (hPtr) {
CFWord *cfwPtr = (CFWord *)Tcl_GetHashValue(hPtr);
@@ -5861,7 +5861,7 @@ TclArgumentGet(
* that stack.
*/
- hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, (char *) obj);
+ hPtr = Tcl_FindHashEntry(iPtr->lineLABCPtr, obj);
if (hPtr) {
CFWordBC *cfwPtr = (CFWordBC *)Tcl_GetHashValue(hPtr);
@@ -5957,7 +5957,7 @@ TclNREvalObjEx(
if (TclListObjIsCanonical(objPtr)) {
CmdFrame *eoFramePtr = NULL;
- int objc;
+ size_t objc;
Tcl_Obj *listPtr, **objv;
/*
@@ -6756,17 +6756,17 @@ Tcl_VarEval(
*----------------------------------------------------------------------
*/
-int
+size_t
Tcl_SetRecursionLimit(
Tcl_Interp *interp, /* Interpreter whose nesting limit is to be
* set. */
- int depth) /* New value for maximimum depth. */
+ size_t depth) /* New value for maximimum depth. */
{
Interp *iPtr = (Interp *) interp;
- int old;
+ size_t old;
old = iPtr->maxNestingDepth;
- if (depth > 0) {
+ if (depth + 1 > 1) {
iPtr->maxNestingDepth = depth;
}
return old;
@@ -8319,7 +8319,7 @@ Tcl_NRCallObjProc(
Tcl_Interp *interp,
Tcl_ObjCmdProc *objProc,
void *clientData,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[])
{
NRE_callback *rootPtr = TOP_CB(interp);
@@ -8419,7 +8419,7 @@ int
Tcl_NREvalObjv(
Tcl_Interp *interp, /* Interpreter in which to evaluate the
* command. Also used for error reporting. */
- int objc, /* Number of words in command. */
+ size_t objc, /* Number of words in command. */
Tcl_Obj *const objv[], /* An array of pointers to objects that are
* the words that make up the command. */
int flags) /* Collection of OR-ed bits that control the
@@ -8434,7 +8434,7 @@ int
Tcl_NRCmdSwap(
Tcl_Interp *interp,
Tcl_Command cmd,
- int objc,
+ size_t objc,
Tcl_Obj *const objv[],
int flags)
{
@@ -8626,7 +8626,7 @@ TclNRTailcallEval(
Interp *iPtr = (Interp *) interp;
Tcl_Obj *listPtr = (Tcl_Obj *)data[0], *nsObjPtr;
Tcl_Namespace *nsPtr;
- int objc;
+ size_t objc;
Tcl_Obj **objv;
TclListObjGetElements(interp, listPtr, &objc, &objv);
@@ -9049,7 +9049,7 @@ TclNREvalList(
Tcl_Interp *interp,
TCL_UNUSED(int) /*result*/)
{
- int objc;
+ size_t objc;
Tcl_Obj **objv;
Tcl_Obj *listPtr = (Tcl_Obj *)data[0];
@@ -9311,7 +9311,7 @@ InjectHandler(
Tcl_Obj *listPtr = (Tcl_Obj *)data[1];
size_t nargs = PTR2INT(data[2]);
void *isProbe = data[3];
- int objc;
+ size_t objc;
Tcl_Obj **objv;
if (!isProbe) {