summaryrefslogtreecommitdiffstats
path: root/carbon/tkMacOSXMenu.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 /carbon/tkMacOSXMenu.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 'carbon/tkMacOSXMenu.c')
-rw-r--r--carbon/tkMacOSXMenu.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/carbon/tkMacOSXMenu.c b/carbon/tkMacOSXMenu.c
index aaf8ea9..a31daf8 100644
--- a/carbon/tkMacOSXMenu.c
+++ b/carbon/tkMacOSXMenu.c
@@ -702,7 +702,7 @@ TkpNewMenu(
return TCL_ERROR;
}
- menuPtr->platformData = (TkMenuPlatformData) ckalloc(sizeof(MacMenu));
+ menuPtr->platformData = ckalloc(sizeof(MacMenu));
((MacMenu *) menuPtr->platformData)->menuHdl = macMenuHdl;
#ifdef USE_TK_MDEF
@@ -791,7 +791,7 @@ TkpDestroyMenu(
DeleteMenu(menuID);
TkMacOSXFreeMenuID(menuID);
DisposeMenu(macMenuHdl);
- ckfree((char *) menuPtr->platformData);
+ ckfree(menuPtr->platformData);
menuPtr->platformData = NULL;
}
}
@@ -853,7 +853,7 @@ TkpDestroyMenuEntry(
{
TkMenu *menuPtr = mePtr->menuPtr;
- ckfree((char *) mePtr->platformEntryData);
+ ckfree(mePtr->platformEntryData);
if ((menuPtr->platformData != NULL)
&& !(menuPtr->menuFlags & MENU_RECONFIGURE_PENDING)) {
menuPtr->menuFlags |= MENU_RECONFIGURE_PENDING;
@@ -1625,8 +1625,7 @@ int
TkpMenuNewEntry(
TkMenuEntry *mePtr) /* The menu we are adding an entry to */
{
- EntryGeometry *geometryPtr = (EntryGeometry *)
- ckalloc(sizeof(EntryGeometry));
+ EntryGeometry *geometryPtr = ckalloc(sizeof(EntryGeometry));
TkMenu *menuPtr = mePtr->menuPtr;
geometryPtr->accelTextStart = 0;
@@ -1822,8 +1821,7 @@ DrawMenuBarWhenIdle(
TkMacOSXGetNewMenuID(appleMenuPtr->interp, appleMenuPtr, 0,
&appleID);
macMenuHdl = NewMenu(appleID, "\p\024");
- appleMenuPtr->platformData = (TkMenuPlatformData)
- ckalloc(sizeof(MacMenu));
+ appleMenuPtr->platformData = ckalloc(sizeof(MacMenu));
((MacMenu *)appleMenuPtr->platformData)->menuHdl
= macMenuHdl;
appleMenuPtr->menuFlags |= MENU_APPLE_MENU;
@@ -2148,11 +2146,11 @@ TkpSetWindowMenuBar(
} else {
windowListPtr = listPtr->nextPtr;
}
- ckfree((char *) listPtr);
+ ckfree(listPtr);
}
if (menuPtr != NULL) {
- listPtr = (TopLevelMenubarList *) ckalloc(sizeof(TopLevelMenubarList));
+ listPtr = ckalloc(sizeof(TopLevelMenubarList));
listPtr->nextPtr = windowListPtr;
windowListPtr = listPtr;
listPtr->tkwin = tkwin;
@@ -2265,7 +2263,6 @@ TkMacOSXDispatchMenuEvent(
result = TCL_OK;
} else {
struct MenuCommandHandlerData *data =
- (struct MenuCommandHandlerData *)
ckalloc(sizeof(struct MenuCommandHandlerData));
Tcl_Preserve(menuPtr->interp);