summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXCursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXCursor.c')
-rw-r--r--macosx/tkMacOSXCursor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index c9815c1..53c2cd2 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -381,19 +381,21 @@ TkGetCursorByName(
if (Tcl_SplitList(interp, string, &argc, &argv) == TCL_OK) {
if (argc) {
- macCursorPtr = (TkMacOSXCursor *) ckalloc(sizeof(TkMacOSXCursor));
+ macCursorPtr = ckalloc(sizeof(TkMacOSXCursor));
macCursorPtr->info.cursor = (Tk_Cursor) macCursorPtr;
macCursorPtr->macCursor = nil;
macCursorPtr->type = 0;
FindCursorByName(macCursorPtr, argv[0]);
}
- ckfree((char *) argv);
+ ckfree(argv);
}
if (!macCursorPtr || (!macCursorPtr->macCursor &&
macCursorPtr->type != NONE)) {
- Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "bad cursor spec \"%s\"", string));
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "CURSOR", NULL);
if (macCursorPtr) {
- ckfree((char *)macCursorPtr);
+ ckfree(macCursorPtr);
macCursorPtr = NULL;
}
}