summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-30 21:56:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-30 21:56:52 (GMT)
commit39dd8d296c04b5b6394f5945ec8e87e57eadb9be (patch)
tree5a1a50e08815f388ccdda87ebd51ca80ede926c0 /generic
parent23d477b0ba6aef225047cc38475e599ac0d91cc8 (diff)
parent07494d77f3ba8812de8babbca7cf0a519b2932c6 (diff)
downloadtk-39dd8d296c04b5b6394f5945ec8e87e57eadb9be.zip
tk-39dd8d296c04b5b6394f5945ec8e87e57eadb9be.tar.gz
tk-39dd8d296c04b5b6394f5945ec8e87e57eadb9be.tar.bz2
Merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCanvas.c8
-rw-r--r--generic/tkText.c26
-rw-r--r--generic/ttk/ttkTreeview.c2
3 files changed, 18 insertions, 18 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 9a310d0..1c70055 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -613,7 +613,7 @@ DefaultRotateImplementation(
if (ItemCoords(canvasPtr, itemPtr, 0, NULL) == TCL_OK &&
Tcl_ListObjGetElements(NULL, Tcl_GetObjResult(interp),
&objc, &objv) == TCL_OK) {
- coordv = (double *) Tcl_Alloc(sizeof(double) * objc);
+ coordv = (double *) ckalloc(sizeof(double) * objc);
for (i=0 ; i<objc ; i++) {
if (Tcl_GetDoubleFromObj(NULL, objv[i], &coordv[i]) != TCL_OK) {
ok = 0;
@@ -639,7 +639,7 @@ DefaultRotateImplementation(
* Write the coordinates back into the item.
*/
- newObjv = (Tcl_Obj **) Tcl_Alloc(sizeof(Tcl_Obj *) * objc);
+ newObjv = (Tcl_Obj **) ckalloc(sizeof(Tcl_Obj *) * objc);
for (i=0 ; i<objc ; i++) {
newObjv[i] = Tcl_NewDoubleObj(coordv[i]);
Tcl_IncrRefCount(newObjv[i]);
@@ -648,9 +648,9 @@ DefaultRotateImplementation(
for (i=0 ; i<objc ; i++) {
Tcl_DecrRefCount(newObjv[i]);
}
- Tcl_Free((char *) newObjv);
+ ckfree((char *) newObjv);
}
- Tcl_Free((char *) coordv);
+ ckfree((char *) coordv);
}
/*
diff --git a/generic/tkText.c b/generic/tkText.c
index 7782521..f810010 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -5958,7 +5958,7 @@ SearchCore(
* begin.
*/
- matchOffset = -1;
+ matchOffset = TCL_INDEX_NONE;
if (searchSpecPtr->exact) {
int maxExtraLines = 0;
@@ -6230,7 +6230,7 @@ SearchCore(
if (!match ||
((info.extendStart == info.matches[0].start)
- && ((TkSizeT) info.matches[0].end == (TkSizeT) lastOffset - firstOffset))) {
+ && (info.matches[0].end == (TkSizeT) (lastOffset - firstOffset)))) {
int extraLines = 0;
TkSizeT prevFullLine;
@@ -6248,7 +6248,7 @@ SearchCore(
lastNonOverlap = lastTotal;
}
- if ((TkSizeT) info.extendStart == TCL_AUTO_LENGTH) {
+ if (info.extendStart == TCL_INDEX_NONE) {
/*
* No multi-line match is possible.
*/
@@ -6345,9 +6345,9 @@ SearchCore(
*/
if ((match &&
- firstOffset + (TkSizeT) info.matches[0].end != (TkSizeT) lastTotal &&
- firstOffset + (TkSizeT) info.matches[0].end + 1 < prevFullLine + 1)
- || (TkSizeT) info.extendStart == TCL_AUTO_LENGTH) {
+ firstOffset + info.matches[0].end != (TkSizeT) lastTotal &&
+ firstOffset + info.matches[0].end + 1 < prevFullLine + 1)
+ || info.extendStart == TCL_INDEX_NONE) {
break;
}
@@ -6358,10 +6358,10 @@ SearchCore(
* that line.
*/
- if (match && ((TkSizeT) info.matches[0].start + 1 >= (TkSizeT) lastOffset + 1)) {
+ if (match && (info.matches[0].start + 1 >= (TkSizeT) lastOffset + 1)) {
break;
}
- if (match && ((firstOffset + (TkSizeT) info.matches[0].end)
+ if (match && ((firstOffset + info.matches[0].end)
>= prevFullLine)) {
if (extraLines > 0) {
extraLinesSearched = extraLines - 1;
@@ -6497,11 +6497,11 @@ SearchCore(
* previous match.
*/
- if (matchOffset == TCL_AUTO_LENGTH ||
+ if (matchOffset == TCL_INDEX_NONE ||
((searchSpecPtr->all || searchSpecPtr->backwards)
- && (((TkSizeT)firstOffset + 1< matchOffset + 1)
- || ((firstOffset + (TkSizeT) info.matches[0].end
- - (TkSizeT) info.matches[0].start)
+ && (((TkSizeT)firstOffset + 1 < matchOffset + 1)
+ || ((firstOffset + info.matches[0].end
+ - info.matches[0].start)
> matchOffset + matchLength)))) {
matchOffset = firstOffset;
@@ -6665,7 +6665,7 @@ SearchCore(
* we are done.
*/
- if ((lastBackwardsLineMatch == -1) && (matchOffset != TCL_AUTO_LENGTH)
+ if ((lastBackwardsLineMatch == -1) && (matchOffset != TCL_INDEX_NONE)
&& !searchSpecPtr->all) {
searchSpecPtr->foundMatchProc(lineNum, searchSpecPtr, lineInfo,
theLine, matchOffset, matchLength);
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index cf7abe1..5b5375c 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1064,7 +1064,7 @@ static void TreeviewCleanup(void *recordPtr)
TreeviewFreeColumns(tv);
if (tv->tree.displayColumns)
- Tcl_Free((ClientData)tv->tree.displayColumns);
+ ckfree((ClientData)tv->tree.displayColumns);
foreachHashEntry(&tv->tree.items, FreeItemCB);
Tcl_DeleteHashTable(&tv->tree.items);