summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyEvent.c
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-04-27 17:21:04 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-04-27 17:21:04 (GMT)
commit1f578eda91cddbe705333692cdb369a6c502aa70 (patch)
tree179df19899fa86fe4cd078bd53f7955a81862a39 /macosx/tkMacOSXKeyEvent.c
parent71ba027f8de56bf6837fd722d37dbb2bda01f5a1 (diff)
downloadtk-1f578eda91cddbe705333692cdb369a6c502aa70.zip
tk-1f578eda91cddbe705333692cdb369a6c502aa70.tar.gz
tk-1f578eda91cddbe705333692cdb369a6c502aa70.tar.bz2
Eliminate use of nbytes, which seems to be superfluous on macOS; edit some comments
Diffstat (limited to 'macosx/tkMacOSXKeyEvent.c')
-rw-r--r--macosx/tkMacOSXKeyEvent.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index fbc688d..b25f2a5 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -226,7 +226,6 @@ static void setXEventPoint(XEvent *xEvent, Tk_Window tkwin, NSWindow *w);
setXEventPoint(&xEvent, tkwin, w);
if (IS_PRINTABLE(keychar)) {
- xEvent.xkey.nbytes = 0; /* This string is null-terminated. */
int length = TkUniCharToUtf(keychar, xEvent.xkey.trans_chars);
xEvent.xkey.trans_chars[length] = 0;
}
@@ -332,8 +331,7 @@ static void setXEventPoint(XEvent *xEvent, Tk_Window tkwin, NSWindow *w);
*/
for (i = 0; i < len; i++) {
- xEvent.xkey.nbytes = TkUtfAtIndex(str, i, xEvent.xkey.trans_chars,
- &xEvent.xkey.keycode);
+ TkUtfAtIndex(str, i, xEvent.xkey.trans_chars, &xEvent.xkey.keycode);
if (xEvent.xkey.keycode > 0xffff){
i++;
}