diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-17 08:36:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-17 08:36:55 (GMT) |
commit | 1f915d51ed45d9f68cb4933a1c31b68c254ed242 (patch) | |
tree | 76eaf621e1859748736c351fd39fdd66844ade58 /macosx/tkMacOSXHLEvents.c | |
parent | 9039a4d498efadb7fcf4c44e9802e336e8ea0d28 (diff) | |
download | tk-1f915d51ed45d9f68cb4933a1c31b68c254ed242.zip tk-1f915d51ed45d9f68cb4933a1c31b68c254ed242.tar.gz tk-1f915d51ed45d9f68cb4933a1c31b68c254ed242.tar.bz2 |
Another round of type-casts for ckalloc() calls. Makes C++ compilers even more happy. Mainly for MacOS code.
Diffstat (limited to 'macosx/tkMacOSXHLEvents.c')
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index 49516cf..e2ff0f1 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -90,7 +90,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; * quickly as possible. */ - eventPtr = ckalloc(sizeof(KillEvent)); + eventPtr = (KillEvent *)ckalloc(sizeof(KillEvent)); eventPtr->header.proc = ReallyKillMe; eventPtr->interp = _eventInterp; @@ -200,7 +200,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; * procedure, passing the paths contained in the AppleEvent as arguments. */ - AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo)); + AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); Tcl_DString *openCommand = &AEInfo->command; Tcl_DStringInit(openCommand); Tcl_DStringAppend(openCommand, openDocumentProc, -1); @@ -238,7 +238,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; NSString* file = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; const char *printFile = [file UTF8String]; - AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo)); + AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); Tcl_DString *printCommand = &AEInfo->command; (void)replyEvent; @@ -301,7 +301,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; URLBuffer[actual] = '\0'; NSString *urlString = [NSString stringWithUTF8String:(char*)URLBuffer]; NSURL *fileURL = [NSURL URLWithString:urlString]; - AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo)); + AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); Tcl_DString *scriptFileCommand = &AEInfo->command; Tcl_DStringInit(scriptFileCommand); Tcl_DStringAppend(scriptFileCommand, scriptFileProc, -1); @@ -321,11 +321,11 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; */ if (actual > 0) { - char *data = ckalloc(actual + 1); + char *data = (char *)ckalloc(actual + 1); if (noErr == AEGetParamPtr(theDesc, keyDirectObject, typeUTF8Text, &type, data, actual, NULL)) { - AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo)); + AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); Tcl_DString *scriptTextCommand = &AEInfo->command; Tcl_DStringInit(scriptTextCommand); Tcl_DStringAppend(scriptTextCommand, scriptTextProc, -1); @@ -350,7 +350,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText"; NSString* url = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; const char *cURL=[url UTF8String]; - AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo)); + AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo)); Tcl_DString *launchCommand = &AEInfo->command; (void)replyEvent; |