diff options
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r-- | generic/tclTest.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index d05ef7d..c623b36 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -204,7 +204,7 @@ static int ObjTraceProc(ClientData clientData, Tcl_Obj *const objv[]); static void ObjTraceDeleteProc(ClientData clientData); static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr); -static void SpecialFree(char *blockPtr); +static void SpecialFree(void *blockPtr); static int StaticInitProc(Tcl_Interp *interp); static Tcl_CmdProc TestasyncCmd; static Tcl_ObjCmdProc TestbumpinterpepochObjCmd; @@ -265,7 +265,7 @@ static Tcl_ObjCmdProc TestreturnObjCmd; static void TestregexpXflags(const char *string, int length, int *cflagsPtr, int *eflagsPtr); static Tcl_ObjCmdProc TestsaveresultCmd; -static void TestsaveresultFree(char *blockPtr); +static void TestsaveresultFree(void *blockPtr); static Tcl_CmdProc TestsetassocdataCmd; static Tcl_CmdProc TestsetCmd; static Tcl_CmdProc Testset2Cmd; @@ -1764,7 +1764,7 @@ TestdstringCmd( } else if (strcmp(argv[2], "special") == 0) { char *s = (char *)ckalloc(100) + 16; strcpy(s, "This is a specially-allocated string"); - Tcl_SetResult(interp, s, SpecialFree); + Tcl_SetResult(interp, s, (Tcl_FreeProc *)(void *)SpecialFree); } else { Tcl_AppendResult(interp, "bad gresult option \"", argv[2], "\": must be staticsmall, staticlarge, free, or special", @@ -1811,9 +1811,9 @@ TestdstringCmd( */ static void SpecialFree( - char *blockPtr /* Block to free. */ + void *blockPtr /* Block to free. */ ) { - ckfree(blockPtr - 16); + ckfree((char *)blockPtr - 16); } /* @@ -5428,7 +5428,7 @@ TestsaveresultCmd( break; } case RESULT_DYNAMIC: - Tcl_SetResult(interp, (char *)"dynamic result", TestsaveresultFree); + Tcl_SetResult(interp, (char *)"dynamic result", (Tcl_FreeProc *)(void *)TestsaveresultFree); break; case RESULT_OBJECT: objPtr = Tcl_NewStringObj("object result", -1); @@ -5454,7 +5454,7 @@ TestsaveresultCmd( switch ((enum options) index) { case RESULT_DYNAMIC: { - int present = iPtr->freeProc == TestsaveresultFree; + int present = iPtr->freeProc == (Tcl_FreeProc *)(void *)TestsaveresultFree; int called = freeCount; Tcl_AppendElement(interp, called ? "called" : "notCalled"); @@ -5489,7 +5489,7 @@ TestsaveresultCmd( static void TestsaveresultFree( - char *blockPtr) + void *blockPtr) { freeCount++; } |