summaryrefslogtreecommitdiffstats
path: root/tk8.6
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-31 21:48:30 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-31 21:48:30 (GMT)
commit4f54d474a1792c52f1a156354e132b799edb7c6d (patch)
tree51effa4ab375927e3d3c262330eb38a1be3f3586 /tk8.6
parent5a347dcb1e566abc32c8880a9b517ab48e989a39 (diff)
downloadblt-4f54d474a1792c52f1a156354e132b799edb7c6d.zip
blt-4f54d474a1792c52f1a156354e132b799edb7c6d.tar.gz
blt-4f54d474a1792c52f1a156354e132b799edb7c6d.tar.bz2
fix a issue with new xcode 8.3 compiler
Diffstat (limited to 'tk8.6')
-rw-r--r--tk8.6/macosx/tkMacOSXWm.c4
-rw-r--r--tk8.6/macosx/tkMacOSXWm.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/tk8.6/macosx/tkMacOSXWm.c b/tk8.6/macosx/tkMacOSXWm.c
index 39990e6..ac5f43d 100644
--- a/tk8.6/macosx/tkMacOSXWm.c
+++ b/tk8.6/macosx/tkMacOSXWm.c
@@ -2899,11 +2899,13 @@ WmProtocolCmd(
}
cmd = Tcl_GetStringFromObj(objv[4], &cmdLength);
if (cmdLength > 0) {
- protPtr = ckalloc(HANDLER_SIZE(cmdLength));
+ /* protPtr = ckalloc(HANDLER_SIZE(cmdLength));*/
+ protPtr = ckalloc(sizeof(ProtocolHandler));
protPtr->protocol = protocol;
protPtr->nextPtr = wmPtr->protPtr;
wmPtr->protPtr = protPtr;
protPtr->interp = interp;
+ protPtr->command = malloc(cmdLength+1);
strcpy(protPtr->command, cmd);
}
return TCL_OK;
diff --git a/tk8.6/macosx/tkMacOSXWm.h b/tk8.6/macosx/tkMacOSXWm.h
index d98010f..b504896 100644
--- a/tk8.6/macosx/tkMacOSXWm.h
+++ b/tk8.6/macosx/tkMacOSXWm.h
@@ -29,7 +29,8 @@ typedef struct ProtocolHandler {
* same top-level window, or NULL for end of
* list. */
Tcl_Interp *interp; /* Interpreter in which to invoke command. */
- char command[4]; /* Tcl command to invoke when a client message
+ /* char command[4]; Tcl command to invoke when a client message*/
+ char* command; /* Tcl command to invoke when a client message
* for this protocol arrives. The actual size
* of the structure varies to accommodate the
* needs of the actual command. THIS MUST BE
@@ -37,7 +38,7 @@ typedef struct ProtocolHandler {
} ProtocolHandler;
#define HANDLER_SIZE(cmdLength) \
-((unsigned) (sizeof(ProtocolHandler) - 3 + cmdLength))
+ ((unsigned) (sizeof(ProtocolHandler) -3 + cmdLength))
/*
* A data structure of the following type holds window-manager-related