summaryrefslogtreecommitdiffstats
path: root/generic/tkUndo.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/tkUndo.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/tkUndo.c')
-rw-r--r--generic/tkUndo.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tkUndo.c b/generic/tkUndo.c
index 1150cef..2c56c05 100644
--- a/generic/tkUndo.c
+++ b/generic/tkUndo.c
@@ -96,7 +96,7 @@ TkUndoInsertSeparator(
TkUndoAtom *separator;
if (*stack!=NULL && (*stack)->type!=TK_UNDO_SEPARATOR) {
- separator = (TkUndoAtom *) ckalloc(sizeof(TkUndoAtom));
+ separator = ckalloc(sizeof(TkUndoAtom));
separator->type = TK_UNDO_SEPARATOR;
TkUndoPushStack(stack,separator);
return 1;
@@ -137,7 +137,7 @@ TkUndoClearStack(
if (sub->action != NULL) {
Tcl_DecrRefCount(sub->action);
}
- ckfree((char *)sub);
+ ckfree(sub);
sub = next;
}
@@ -148,11 +148,11 @@ TkUndoClearStack(
if (sub->action != NULL) {
Tcl_DecrRefCount(sub->action);
}
- ckfree((char *)sub);
+ ckfree(sub);
sub = next;
}
}
- ckfree((char *)elem);
+ ckfree(elem);
}
*stack = NULL;
}
@@ -183,7 +183,7 @@ TkUndoPushAction(
{
TkUndoAtom *atom;
- atom = (TkUndoAtom *) ckalloc(sizeof(TkUndoAtom));
+ atom = ckalloc(sizeof(TkUndoAtom));
atom->type = TK_UNDO_ACTION;
atom->apply = apply;
atom->revert = revert;
@@ -239,7 +239,7 @@ TkUndoMakeCmdSubAtom(
Tcl_Panic("NULL command and actionScript in TkUndoMakeCmdSubAtom");
}
- atom = (TkUndoSubAtom *) ckalloc(sizeof(TkUndoSubAtom));
+ atom = ckalloc(sizeof(TkUndoSubAtom));
atom->command = command;
atom->funcPtr = NULL;
atom->clientData = NULL;
@@ -301,7 +301,7 @@ TkUndoMakeSubAtom(
Tcl_Panic("NULL funcPtr in TkUndoMakeSubAtom");
}
- atom = (TkUndoSubAtom *) ckalloc(sizeof(TkUndoSubAtom));
+ atom = ckalloc(sizeof(TkUndoSubAtom));
atom->command = NULL;
atom->funcPtr = funcPtr;
atom->clientData = clientData;
@@ -343,7 +343,7 @@ TkUndoInitStack(
{
TkUndoRedoStack *stack; /* An Undo/Redo stack */
- stack = (TkUndoRedoStack *) ckalloc(sizeof(TkUndoRedoStack));
+ stack = ckalloc(sizeof(TkUndoRedoStack));
stack->undoStack = NULL;
stack->redoStack = NULL;
stack->interp = interp;
@@ -406,7 +406,7 @@ TkUndoSetDepth(
if (sub->action != NULL) {
Tcl_DecrRefCount(sub->action);
}
- ckfree((char *)sub);
+ ckfree(sub);
sub = next;
}
sub = elem->revert;
@@ -416,12 +416,12 @@ TkUndoSetDepth(
if (sub->action != NULL) {
Tcl_DecrRefCount(sub->action);
}
- ckfree((char *)sub);
+ ckfree(sub);
sub = next;
}
}
elem = elem->next;
- ckfree((char *) prevelem);
+ ckfree(prevelem);
}
stack->depth = stack->maxdepth;
}
@@ -474,7 +474,7 @@ TkUndoFreeStack(
TkUndoRedoStack *stack) /* An Undo/Redo stack */
{
TkUndoClearStacks(stack);
- ckfree((char *) stack);
+ ckfree(stack);
}
/*
@@ -543,7 +543,7 @@ TkUndoRevert(
}
if (elem->type == TK_UNDO_SEPARATOR) {
- ckfree((char *) elem);
+ ckfree(elem);
elem = TkUndoPopStack(&stack->undoStack);
}
@@ -605,7 +605,7 @@ TkUndoApply(
}
if (elem->type == TK_UNDO_SEPARATOR) {
- ckfree((char *) elem);
+ ckfree(elem);
elem = TkUndoPopStack(&stack->redoStack);
}