summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-08 07:11:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-08 07:11:30 (GMT)
commit46e32fe90e03154031044782bea5b767e15f4fdf (patch)
treedca405310a00622af28c637afc305fcb8e5e3468
parent87814db398ff1c64a7cc7491df43f75e9de160d7 (diff)
parent9d68b2dbd19c376370345b938be80f15aab880d4 (diff)
downloadtcl-46e32fe90e03154031044782bea5b767e15f4fdf.zip
tcl-46e32fe90e03154031044782bea5b767e15f4fdf.tar.gz
tcl-46e32fe90e03154031044782bea5b767e15f4fdf.tar.bz2
Merge 8.7. The changes in tclCmdIL.c fix the travis build.
-rw-r--r--generic/tclCmdIL.c16
-rw-r--r--generic/tclCompCmdsGR.c2
-rw-r--r--generic/tclCompCmdsSZ.c6
-rw-r--r--generic/tclIORChan.c8
-rw-r--r--generic/tclInt.h2
-rw-r--r--generic/tclZipfs.c8
6 files changed, 20 insertions, 22 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 9867dfc..67e871f 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -2724,15 +2724,13 @@ Tcl_LrangeObjCmd(
*----------------------------------------------------------------------
*/
-typedef int list_index_t;
-
static int
LremoveIndexCompare(
const void *el1Ptr,
const void *el2Ptr)
{
- list_index_t idx1 = *((const list_index_t *) el1Ptr);
- list_index_t idx2 = *((const list_index_t *) el2Ptr);
+ size_t idx1 = *((const size_t *) el1Ptr);
+ size_t idx2 = *((const size_t *) el2Ptr);
/*
* This will put the larger element first.
@@ -2748,8 +2746,8 @@ Tcl_LremoveObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, idxc;
- list_index_t listLen, *idxv, prevIdx, first, num;
+ int i, idxc, listLen, prevIdx, first, num;
+ size_t *idxv;
Tcl_Obj *listObj;
/*
@@ -2771,7 +2769,7 @@ Tcl_LremoveObjCmd(
Tcl_SetObjResult(interp, listObj);
return TCL_OK;
}
- idxv = Tcl_Alloc((objc - 2) * sizeof(list_index_t));
+ idxv = Tcl_Alloc((objc - 2) * sizeof(size_t));
for (i = 2; i < objc; i++) {
if (TclGetIntForIndexM(interp, objv[i], /*endValue*/ listLen - 1,
&idxv[i - 2]) != TCL_OK) {
@@ -2786,7 +2784,7 @@ Tcl_LremoveObjCmd(
*/
if (idxc > 1) {
- qsort(idxv, idxc, sizeof(list_index_t), LremoveIndexCompare);
+ qsort(idxv, idxc, sizeof(size_t), LremoveIndexCompare);
}
/*
@@ -2799,7 +2797,7 @@ Tcl_LremoveObjCmd(
num = 0;
first = listLen;
for (i = 0, prevIdx = -1 ; i < idxc ; i++) {
- list_index_t idx = idxv[i];
+ int idx = idxv[i];
/*
* Repeated index and sanity check.
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index 3e72854..f5aa295 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -434,7 +434,7 @@ TclCompileIfCmd(
jumpFalseDist += 3;
TclStoreInt4AtPtr(jumpFalseDist, (ifFalsePc + 1));
} else {
- Tcl_Panic("TclCompileIfCmd: unexpected opcode \"%u\" updating ifFalse jump", opCode);
+ Tcl_Panic("TclCompileIfCmd: unexpected opcode \"%d\" updating ifFalse jump", opCode);
}
}
}
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index 5829faa..58d926d 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -482,16 +482,16 @@ TclCompileStringInsertCmd(
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 3);
- if (idx == (int) TCL_INDEX_START) {
+ if (idx == (int)TCL_INDEX_START) {
/* Prepend the insertion string */
OP4( REVERSE, 2);
OP1( STR_CONCAT1, 2);
- } else if (idx == (int) TCL_INDEX_END) {
+ } else if (idx == (int)TCL_INDEX_END) {
/* Append the insertion string */
OP1( STR_CONCAT1, 2);
} else {
/* Prefix + insertion + suffix */
- if (idx < (int) TCL_INDEX_END) {
+ if (idx < (int)TCL_INDEX_END) {
/* See comments in compiler for [linsert]. */
idx++;
}
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index e426124..f356184 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -114,15 +114,15 @@ typedef struct {
int dead; /* Boolean signal that some operations
* should no longer be attempted. */
- Tcl_TimerToken readTimer; /*
+ Tcl_TimerToken readTimer; /*
A token for the timer that is scheduled in
order to call Tcl_NotifyChannel when the
- channel is readable
+ channel is readable
*/
- Tcl_TimerToken writeTimer; /*
+ Tcl_TimerToken writeTimer; /*
A token for the timer that is scheduled in
order to call Tcl_NotifyChannel when the
- channel is writable
+ channel is writable
*/
/*
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 1b4d898..0c884b3 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4497,7 +4497,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
(bignum).alloc = (bignumPayload >> 15) & 0x7fff; \
(bignum).used = bignumPayload & 0x7fff; \
} \
- } while (0)
+ } while (0)
/*
*----------------------------------------------------------------
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 0ba240e..ca15b38 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -1675,15 +1675,15 @@ TclZipfs_Mount(
return TCL_ERROR;
}
if (ZipFSOpenArchive(interp, zipname, 1, zf) != TCL_OK) {
- ckfree(zf);
+ Tcl_Free(zf);
return TCL_ERROR;
}
if (ZipFSCatalogFilesystem(interp, zf, mountPoint, passwd, zipname)
!= TCL_OK) {
- ckfree(zf);
+ Tcl_Free(zf);
return TCL_ERROR;
}
- ckfree(zf);
+ Tcl_Free(zf);
return TCL_OK;
}
@@ -1778,7 +1778,7 @@ TclZipfs_MountBuffer(
}
result = ZipFSCatalogFilesystem(interp, zf, mountPoint, NULL,
"Memory Buffer");
- ckfree(zf);
+ Tcl_Free(zf);
return result;
}