summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-12 17:45:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-12 17:45:37 (GMT)
commite0b895874d5fa39f6d4134b407e930b80ee3ecd7 (patch)
tree08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /generic/tkTextIndex.c
parent77d7867fd5b20233f0fa9163bd8a44d2ac274b0e (diff)
downloadtk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.zip
tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.tar.gz
tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.tar.bz2
Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to be
using useful casts internally.
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index e192962..aaabb88 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -92,10 +92,10 @@ FreeTextIndexInternalRep(
* The text widget has been deleted and we need to free it now.
*/
- ckfree((char *) indexPtr->textPtr);
+ ckfree(indexPtr->textPtr);
}
}
- ckfree((char *) indexPtr);
+ ckfree(indexPtr);
indexObjPtr->typePtr = NULL;
}
@@ -107,7 +107,7 @@ DupTextIndexInternalRep(
int epoch;
TkTextIndex *dupIndexPtr, *indexPtr;
- dupIndexPtr = (TkTextIndex *) ckalloc(sizeof(TkTextIndex));
+ dupIndexPtr = ckalloc(sizeof(TkTextIndex));
indexPtr = GET_TEXTINDEX(srcPtr);
epoch = GET_INDEXEPOCH(srcPtr);
@@ -140,7 +140,7 @@ UpdateStringOfTextIndex(
len = TkTextPrintIndex(indexPtr->textPtr, indexPtr, buffer);
- objPtr->bytes = ckalloc((unsigned) len + 1);
+ objPtr->bytes = ckalloc(len + 1);
strcpy(objPtr->bytes, buffer);
objPtr->length = len;
}
@@ -187,7 +187,7 @@ MakeObjIndex(
* position. */
const TkTextIndex *origPtr) /* Pointer to index. */
{
- TkTextIndex *indexPtr = (TkTextIndex *) ckalloc(sizeof(TkTextIndex));
+ TkTextIndex *indexPtr = ckalloc(sizeof(TkTextIndex));
indexPtr->tree = origPtr->tree;
indexPtr->linePtr = origPtr->linePtr;
@@ -1486,7 +1486,7 @@ TkTextIndexForwChars(
return;
}
if (checkElided) {
- infoPtr = (TkTextElideInfo *) ckalloc(sizeof(TkTextElideInfo));
+ infoPtr = ckalloc(sizeof(TkTextElideInfo));
elide = TkTextIsElided(textPtr, srcPtr, infoPtr);
}
@@ -1614,7 +1614,7 @@ TkTextIndexForwChars(
forwardCharDone:
if (infoPtr != NULL) {
TkTextFreeElideInfo(infoPtr);
- ckfree((char *) infoPtr);
+ ckfree(infoPtr);
}
}
@@ -1670,7 +1670,7 @@ TkTextIndexCount(
seg2Ptr = TkTextIndexToSeg(indexPtr2, &maxBytes);
if (checkElided) {
- infoPtr = (TkTextElideInfo *) ckalloc(sizeof(TkTextElideInfo));
+ infoPtr = ckalloc(sizeof(TkTextElideInfo));
elide = TkTextIsElided(textPtr, indexPtr1, infoPtr);
}
@@ -1810,7 +1810,7 @@ TkTextIndexCount(
countDone:
if (infoPtr != NULL) {
TkTextFreeElideInfo(infoPtr);
- ckfree((char *) infoPtr);
+ ckfree(infoPtr);
}
return count;
}
@@ -1928,7 +1928,7 @@ TkTextIndexBackChars(
return;
}
if (checkElided) {
- infoPtr = (TkTextElideInfo *) ckalloc(sizeof(TkTextElideInfo));
+ infoPtr = ckalloc(sizeof(TkTextElideInfo));
elide = TkTextIsElided(textPtr, srcPtr, infoPtr);
}
@@ -2094,7 +2094,7 @@ TkTextIndexBackChars(
backwardCharDone:
if (infoPtr != NULL) {
TkTextFreeElideInfo(infoPtr);
- ckfree((char *) infoPtr);
+ ckfree(infoPtr);
}
}