summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-26 00:24:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-26 00:24:07 (GMT)
commit13e6c44129865089d8680474141354555450ae04 (patch)
treecd1af88f02192ab59b05cebb82e886341624241e
parent8e4cfc592771290d75f559ef2dea0836cc26e7fe (diff)
downloadtk-13e6c44129865089d8680474141354555450ae04.zip
tk-13e6c44129865089d8680474141354555450ae04.tar.gz
tk-13e6c44129865089d8680474141354555450ae04.tar.bz2
Use some more (void *)'s in FreeProc's, a step in the direction getting Tk to work with "novem"
-rw-r--r--generic/tkBind.c2
-rw-r--r--generic/tkBusy.c14
-rw-r--r--generic/tkCanvas.c2
-rw-r--r--generic/tkEntry.c8
-rw-r--r--generic/tkFrame.c10
-rw-r--r--generic/tkGrid.c8
-rw-r--r--generic/tkListbox.c8
-rw-r--r--generic/tkMain.c6
-rw-r--r--generic/tkMenu.c14
-rw-r--r--generic/tkPack.c8
-rw-r--r--generic/tkSquare.c8
-rw-r--r--generic/tkTextTag.c2
-rw-r--r--generic/tkWindow.c4
-rw-r--r--generic/ttk/ttkWidget.c4
-rw-r--r--unix/tkUnixSend.c2
15 files changed, 50 insertions, 50 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 77d302f..ff308ed 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -2643,7 +2643,7 @@ DeleteVirtualEvent(
eventPSPtr = FindSequence(interp, &vetPtr->patternTable, NULL,
eventString, 0, 0, &eventMask);
if (eventPSPtr == NULL) {
- const char *string = Tcl_GetStringResult(interp);
+ const char *string = Tcl_GetString(Tcl_GetObjResult(interp));
return (string[0] != '\0') ? TCL_ERROR : TCL_OK;
}
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 7aeae74..65248a2 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -43,7 +43,7 @@ static void BusyCustodyProc(ClientData clientData,
static int ConfigureBusy(Tcl_Interp *interp, Busy *busyPtr,
int objc, Tcl_Obj *const objv[]);
static Busy * CreateBusy(Tcl_Interp *interp, Tk_Window tkRef);
-static void DestroyBusy(char *dataPtr);
+static void DestroyBusy(void *dataPtr);
static void DoConfigureNotify(Tk_FakeWin *winPtr);
static inline Tk_Window FirstChild(Tk_Window parent);
static Busy * GetBusy(Tcl_Interp *interp,
@@ -136,7 +136,7 @@ BusyCustodyProc(
busyPtr);
TkpHideBusyWindow(busyPtr);
busyPtr->tkBusy = NULL;
- Tcl_EventuallyFree(busyPtr, DestroyBusy);
+ Tcl_EventuallyFree(busyPtr, (Tcl_FreeProc *)DestroyBusy);
}
/*
@@ -262,7 +262,7 @@ RefWinEventProc(
* Arrange for the busy structure to be removed at a proper time.
*/
- Tcl_EventuallyFree(busyPtr, DestroyBusy);
+ Tcl_EventuallyFree(busyPtr, (Tcl_FreeProc *)DestroyBusy);
break;
case ConfigureNotify:
@@ -333,9 +333,9 @@ RefWinEventProc(
static void
DestroyBusy(
- char *data) /* Busy window structure record */
+ void *data) /* Busy window structure record */
{
- register Busy *busyPtr = (Busy *) data;
+ register Busy *busyPtr = data;
if (busyPtr->hashPtr != NULL) {
Tcl_DeleteHashEntry(busyPtr->hashPtr);
@@ -383,7 +383,7 @@ BusyEventProc(
if (eventPtr->type == DestroyNotify) {
busyPtr->tkBusy = NULL;
- Tcl_EventuallyFree(busyPtr, DestroyBusy);
+ Tcl_EventuallyFree(busyPtr, (Tcl_FreeProc *)DestroyBusy);
}
}
@@ -895,7 +895,7 @@ Tk_BusyObjCmd(
return TCL_ERROR;
}
TkpHideBusyWindow(busyPtr);
- Tcl_EventuallyFree(busyPtr, DestroyBusy);
+ Tcl_EventuallyFree(busyPtr, (Tcl_FreeProc *)DestroyBusy);
return TCL_OK;
case BUSY_HOLD:
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 07f1cfe..6972b18 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -1047,7 +1047,7 @@ CanvasWidgetCmd(
command = Tk_GetBinding(interp, canvasPtr->bindingTable,
object, Tcl_GetString(objv[3]));
if (command == NULL) {
- const char *string = Tcl_GetStringResult(interp);
+ const char *string = Tcl_GetString(Tcl_GetObjResult(interp));
/*
* Ignore missing binding errors. This is a special hack that
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 192101d..9d1595c 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -392,7 +392,7 @@ static const char *const selElementNames[] = {
static int ConfigureEntry(Tcl_Interp *interp, Entry *entryPtr,
int objc, Tcl_Obj *const objv[], int flags);
static void DeleteChars(Entry *entryPtr, int index, int count);
-static void DestroyEntry(char *memPtr);
+static void DestroyEntry(void *memPtr);
static void DisplayEntry(ClientData clientData);
static void EntryBlinkProc(ClientData clientData);
static void EntryCmdDeletedProc(ClientData clientData);
@@ -1010,9 +1010,9 @@ EntryWidgetObjCmd(
static void
DestroyEntry(
- char *memPtr) /* Info about entry widget. */
+ void *memPtr) /* Info about entry widget. */
{
- Entry *entryPtr = (Entry *) memPtr;
+ Entry *entryPtr = memPtr;
/*
* Free up all the stuff that requires special handling, then let
@@ -2429,7 +2429,7 @@ EntryEventProc(
if (entryPtr->flags & REDRAW_PENDING) {
Tcl_CancelIdleCall(DisplayEntry, clientData);
}
- Tcl_EventuallyFree(clientData, DestroyEntry);
+ Tcl_EventuallyFree(clientData, (Tcl_FreeProc *) DestroyEntry);
}
break;
case ConfigureNotify:
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 90b3e95..057b4b8 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -308,7 +308,7 @@ static int ConfigureFrame(Tcl_Interp *interp, Frame *framePtr,
static int CreateFrame(ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const argv[],
enum FrameType type, const char *appName);
-static void DestroyFrame(char *memPtr);
+static void DestroyFrame(void *memPtr);
static void DestroyFramePartly(Frame *framePtr);
static void DisplayFrame(ClientData clientData);
static void FrameCmdDeletedProc(ClientData clientData);
@@ -834,10 +834,10 @@ FrameWidgetObjCmd(
static void
DestroyFrame(
- char *memPtr) /* Info about frame widget. */
+ void *memPtr) /* Info about frame widget. */
{
- register Frame *framePtr = (Frame *) memPtr;
- register Labelframe *labelframePtr = (Labelframe *) memPtr;
+ register Frame *framePtr = memPtr;
+ register Labelframe *labelframePtr = memPtr;
if (framePtr->type == TYPE_LABELFRAME) {
Tk_FreeTextLayout(labelframePtr->textLayout);
@@ -1656,7 +1656,7 @@ FrameEventProc(
Tcl_CancelIdleCall(DisplayFrame, framePtr);
}
Tcl_CancelIdleCall(MapFrame, framePtr);
- Tcl_EventuallyFree(framePtr, DestroyFrame);
+ Tcl_EventuallyFree(framePtr, (Tcl_FreeProc *) DestroyFrame);
} else if (eventPtr->type == FocusIn) {
if (eventPtr->xfocus.detail != NotifyInferior) {
framePtr->flags |= GOT_FOCUS;
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index f8e18fd..3e40875 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -262,7 +262,7 @@ static int CheckSlotData(Gridder *masterPtr, int slot,
int slotType, int checkOnly);
static int ConfigureSlaves(Tcl_Interp *interp, Tk_Window tkwin,
int objc, Tcl_Obj *const objv[]);
-static void DestroyGrid(char *memPtr);
+static void DestroyGrid(void *memPtr);
static Gridder * GetGrid(Tk_Window tkwin);
static int GridAnchorCommand(Tk_Window tkwin, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
@@ -2807,9 +2807,9 @@ Unlink(
static void
DestroyGrid(
- char *memPtr) /* Info about window that is now dead. */
+ void *memPtr) /* Info about window that is now dead. */
{
- register Gridder *gridPtr = (Gridder *) memPtr;
+ register Gridder *gridPtr = memPtr;
if (gridPtr->masterDataPtr != NULL) {
if (gridPtr->masterDataPtr->rowPtr != NULL) {
@@ -2886,7 +2886,7 @@ GridStructureProc(
Tcl_CancelIdleCall(ArrangeGrid, gridPtr);
}
gridPtr->tkwin = NULL;
- Tcl_EventuallyFree(gridPtr, DestroyGrid);
+ Tcl_EventuallyFree(gridPtr, (Tcl_FreeProc *)DestroyGrid);
} else if (eventPtr->type == MapNotify) {
if ((gridPtr->slavePtr != NULL)
&& !(gridPtr->flags & REQUESTED_RELAYOUT)) {
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 178147d..aad0163 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -392,7 +392,7 @@ static int ConfigureListboxItem(Tcl_Interp *interp,
Tcl_Obj *const objv[], int index);
static int ListboxDeleteSubCmd(Listbox *listPtr,
int first, int last);
-static void DestroyListbox(char *memPtr);
+static void DestroyListbox(void *memPtr);
static void DestroyListboxOptionTables(ClientData clientData,
Tcl_Interp *interp);
static void DisplayListbox(ClientData clientData);
@@ -1428,9 +1428,9 @@ ListboxGetItemAttributes(
static void
DestroyListbox(
- char *memPtr) /* Info about listbox widget. */
+ void *memPtr) /* Info about listbox widget. */
{
- register Listbox *listPtr = (Listbox *) memPtr;
+ register Listbox *listPtr = memPtr;
Tcl_HashEntry *entry;
Tcl_HashSearch search;
@@ -2601,7 +2601,7 @@ ListboxEventProc(
if (listPtr->flags & REDRAW_PENDING) {
Tcl_CancelIdleCall(DisplayListbox, clientData);
}
- Tcl_EventuallyFree(clientData, DestroyListbox);
+ Tcl_EventuallyFree(clientData, (Tcl_FreeProc *) DestroyListbox);
}
} else if (eventPtr->type == ConfigureNotify) {
int vertSpace;
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 86f955a..5bfc684 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -318,7 +318,7 @@ Tk_MainEx(
*/
if (appInitProc(interp) != TCL_OK) {
- TkpDisplayWarning(Tcl_GetStringResult(interp),
+ TkpDisplayWarning(Tcl_GetString(Tcl_GetObjResult(interp)),
"application-specific initialization failed");
}
@@ -451,7 +451,7 @@ StdinProc(
Tcl_CreateChannelHandler(isPtr->input, TCL_READABLE, StdinProc, isPtr);
}
Tcl_DStringFree(&isPtr->command);
- if (Tcl_GetStringResult(interp)[0] != '\0') {
+ if (Tcl_GetString(Tcl_GetObjResult(interp))[0] != '\0') {
if ((code != TCL_OK) || (isPtr->tty)) {
chan = Tcl_GetStdChannel((code != TCL_OK) ? TCL_STDERR : TCL_STDOUT);
if (chan) {
@@ -514,7 +514,7 @@ Prompt(
if (code != TCL_OK) {
Tcl_AddErrorInfo(interp,
"\n (script that generates prompt)");
- if (Tcl_GetStringResult(interp)[0] != '\0') {
+ if (Tcl_GetString(Tcl_GetObjResult(interp))[0] != '\0') {
chan = Tcl_GetStdChannel(TCL_STDERR);
if (chan != NULL) {
Tcl_WriteObj(chan, Tcl_GetObjResult(interp));
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 63da41a..c303c2f 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -338,7 +338,7 @@ static void DeleteMenuCloneEntries(TkMenu *menuPtr,
static void DestroyMenuHashTable(ClientData clientData,
Tcl_Interp *interp);
static void DestroyMenuInstance(TkMenu *menuPtr);
-static void DestroyMenuEntry(char *memPtr);
+static void DestroyMenuEntry(void *memPtr);
static int GetIndexFromCoords(Tcl_Interp *interp,
TkMenu *menuPtr, const char *string,
int *indexPtr);
@@ -1225,7 +1225,7 @@ DestroyMenuInstance(
* for menu entries (i+1)...numEntries.
*/
- DestroyMenuEntry((char *) menuPtr->entries[i]);
+ DestroyMenuEntry(menuPtr->entries[i]);
menuPtr->numEntries = i;
}
if (menuPtr->entries != NULL) {
@@ -1423,9 +1423,9 @@ UnhookCascadeEntry(
static void
DestroyMenuEntry(
- char *memPtr) /* Pointer to entry to be freed. */
+ void *memPtr) /* Pointer to entry to be freed. */
{
- register TkMenuEntry *mePtr = (TkMenuEntry *) memPtr;
+ register TkMenuEntry *mePtr = memPtr;
TkMenu *menuPtr = mePtr->menuPtr;
if (menuPtr->postedCascade == mePtr) {
@@ -1662,7 +1662,7 @@ ConfigureMenu(
&& (menuListPtr->entries[0]->type == TEAROFF_ENTRY)) {
int i;
- Tcl_EventuallyFree(menuListPtr->entries[0], DestroyMenuEntry);
+ Tcl_EventuallyFree(menuListPtr->entries[0], (Tcl_FreeProc *) DestroyMenuEntry);
for (i = 0; i < menuListPtr->numEntries - 1; i++) {
menuListPtr->entries[i] = menuListPtr->entries[i + 1];
@@ -2430,7 +2430,7 @@ MenuAddOrInsert(
errorMenuPtr != NULL;
errorMenuPtr = errorMenuPtr->nextInstancePtr) {
Tcl_EventuallyFree(errorMenuPtr->entries[index],
- DestroyMenuEntry);
+ (Tcl_FreeProc *) DestroyMenuEntry);
for (i = index; i < errorMenuPtr->numEntries - 1; i++) {
errorMenuPtr->entries[i] = errorMenuPtr->entries[i + 1];
errorMenuPtr->entries[i]->index = i;
@@ -3540,7 +3540,7 @@ DeleteMenuCloneEntries(
for (menuListPtr = menuPtr->masterMenuPtr; menuListPtr != NULL;
menuListPtr = menuListPtr->nextInstancePtr) {
for (i = last; i >= first; i--) {
- Tcl_EventuallyFree(menuListPtr->entries[i], DestroyMenuEntry);
+ Tcl_EventuallyFree(menuListPtr->entries[i], (Tcl_FreeProc *) DestroyMenuEntry);
}
for (i = last + 1; i < menuListPtr->numEntries; i++) {
j = i - numDeleted;
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 928e793..8428f09 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -120,7 +120,7 @@ static const Tk_GeomMgr packerType = {
static void ArrangePacking(ClientData clientData);
static int ConfigureSlaves(Tcl_Interp *interp, Tk_Window tkwin,
int objc, Tcl_Obj *const objv[]);
-static void DestroyPacker(char *memPtr);
+static void DestroyPacker(void *memPtr);
static Packer * GetPacker(Tk_Window tkwin);
static int PackAfter(Tcl_Interp *interp, Packer *prevPtr,
Packer *masterPtr, int objc,Tcl_Obj *const objv[]);
@@ -1389,10 +1389,10 @@ Unlink(
static void
DestroyPacker(
- char *memPtr) /* Info about packed window that is now
+ void *memPtr) /* Info about packed window that is now
* dead. */
{
- register Packer *packPtr = (Packer *) memPtr;
+ register Packer *packPtr = memPtr;
ckfree(packPtr);
}
@@ -1463,7 +1463,7 @@ PackStructureProc(
Tcl_CancelIdleCall(ArrangePacking, packPtr);
}
packPtr->tkwin = NULL;
- Tcl_EventuallyFree(packPtr, DestroyPacker);
+ Tcl_EventuallyFree(packPtr, (Tcl_FreeProc *) DestroyPacker);
} else if (eventPtr->type == MapNotify) {
/*
* When a master gets mapped, must redo the geometry computation so
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index ad1506c..36d2d6e 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -98,7 +98,7 @@ static const Tk_OptionSpec optionSpecs[] = {
static void SquareDeletedProc(ClientData clientData);
static int SquareConfigure(Tcl_Interp *interp, Square *squarePtr);
-static void SquareDestroy(char *memPtr);
+static void SquareDestroy(void *memPtr);
static void SquareDisplay(ClientData clientData);
static void KeepInWindow(Square *squarePtr);
static void SquareObjEventProc(ClientData clientData,
@@ -410,7 +410,7 @@ SquareObjEventProc(
if (squarePtr->updatePending) {
Tcl_CancelIdleCall(SquareDisplay, squarePtr);
}
- Tcl_EventuallyFree(squarePtr, SquareDestroy);
+ Tcl_EventuallyFree(squarePtr, (Tcl_FreeProc *) SquareDestroy);
}
}
@@ -554,9 +554,9 @@ SquareDisplay(
static void
SquareDestroy(
- char *memPtr) /* Info about square widget. */
+ void *memPtr) /* Info about square widget. */
{
- Square *squarePtr = (Square *) memPtr;
+ Square *squarePtr = memPtr;
ckfree(squarePtr);
}
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index 3bac7d4..a34b74b 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -289,7 +289,7 @@ TkTextTagCmd(
textPtr->sharedTextPtr->bindingTable,
(ClientData) tagPtr->name, Tcl_GetString(objv[4]));
if (command == NULL) {
- const char *string = Tcl_GetStringResult(interp);
+ const char *string = Tcl_GetString(Tcl_GetObjResult(interp));
/*
* Ignore missing binding errors. This is a special hack that
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 6b908dc..10ae820 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3135,7 +3135,7 @@ Initialize(
Tcl_DStringInit(&ds);
Tcl_DStringAppendElement(&ds, "::safe::TkInit");
- Tcl_DStringAppendElement(&ds, Tcl_GetStringResult(master));
+ Tcl_DStringAppendElement(&ds, Tcl_GetString(Tcl_GetObjResult(master)));
/*
* Step 2 : Eval in the master. The argument is the *reversed* interp
@@ -3163,7 +3163,7 @@ Initialize(
* changing the code below.
*/
- argString = Tcl_GetStringResult(master);
+ argString = Tcl_GetString(Tcl_GetObjResult(master));
} else {
/*
* If there is an "argv" variable, get its value, extract out relevant
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index 464be78..c50efc5 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -198,7 +198,7 @@ WidgetInstanceObjCmdDeleted(ClientData clientData)
* Final cleanup for widget; called via Tcl_EventuallyFree().
*/
static void
-FreeWidget(char *memPtr)
+FreeWidget(void *memPtr)
{
ckfree(memPtr);
}
@@ -231,7 +231,7 @@ DestroyWidget(WidgetCore *corePtr)
/* NB: this can reenter the interpreter via a command traces */
Tcl_DeleteCommandFromToken(corePtr->interp, cmd);
}
- Tcl_EventuallyFree(corePtr, FreeWidget);
+ Tcl_EventuallyFree(corePtr, (Tcl_FreeProc *) FreeWidget);
}
/*
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index 15817eb..53a2196 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -1575,7 +1575,7 @@ SendEventProc(
*/
if (commWindow != None) {
- Tcl_DStringAppend(&reply, Tcl_GetStringResult(remoteInterp),
+ Tcl_DStringAppend(&reply, Tcl_GetString(Tcl_GetObjResult(remoteInterp)),
-1);
if (result == TCL_ERROR) {
const char *varValue;