diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-05 10:32:38 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-03-05 10:32:38 (GMT) |
| commit | 75e8b346e2193f1c524cbbb741583e6ab4dfc417 (patch) | |
| tree | b176ac82c867eb9f5b5e441afd6e1314491cc14f /unix/tclXtNotify.c | |
| parent | b2f5cb2b5926675920e0bf8d12c39ee6e91ac1e0 (diff) | |
| download | tcl-75e8b346e2193f1c524cbbb741583e6ab4dfc417.zip tcl-75e8b346e2193f1c524cbbb741583e6ab4dfc417.tar.gz tcl-75e8b346e2193f1c524cbbb741583e6ab4dfc417.tar.bz2 | |
Add "const" to Tcl_SetNotifier() argument. Should have been part of TIP #27, looooooong ago. This simplifier tclXtNotify.c a lot.
Diffstat (limited to 'unix/tclXtNotify.c')
| -rw-r--r-- | unix/tclXtNotify.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index 0210cd3..45bda3e 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -181,7 +181,13 @@ TclSetAppContext( void InitNotifier(void) { - Tcl_NotifierProcs np; + static const Tcl_NotifierProcs np = + SetTimer, + WaitForEvent, + CreateFileHandler, + DeleteFileHandler, + NULL, NULL, NULL, NULL + }; /* * Only reinitialize if we are not in exit handling. The notifier can get @@ -193,11 +199,6 @@ InitNotifier(void) return; } - memset(&np, 0, sizeof(np)); - np.createFileHandlerProc = CreateFileHandler; - np.deleteFileHandlerProc = DeleteFileHandler; - np.setTimerProc = SetTimer; - np.waitForEventProc = WaitForEvent; Tcl_SetNotifier(&np); /* |
