diff options
-rw-r--r-- | doc/Notifier.3 | 2 | ||||
-rw-r--r-- | generic/tcl.decls | 2 | ||||
-rw-r--r-- | generic/tclDecls.h | 5 | ||||
-rw-r--r-- | generic/tclNotify.c | 2 | ||||
-rw-r--r-- | unix/tclXtNotify.c | 13 |
5 files changed, 13 insertions, 11 deletions
diff --git a/doc/Notifier.3 b/doc/Notifier.3 index ec9f910..efbe216 100644 --- a/doc/Notifier.3 +++ b/doc/Notifier.3 @@ -103,7 +103,7 @@ passed to \fBTcl_DoOneEvent\fR. .AP int mode in Indicates whether events should be serviced by \fBTcl_ServiceAll\fR. Must be one of \fBTCL_SERVICE_NONE\fR or \fBTCL_SERVICE_ALL\fR. -.AP Tcl_NotifierProcs* notifierProcPtr in +.AP const Tcl_NotifierProcs* notifierProcPtr in Structure of function pointers describing notifier procedures that are to replace the ones installed in the executable. See \fBREPLACING THE NOTIFIER\fR for details. diff --git a/generic/tcl.decls b/generic/tcl.decls index a6a9d5c..8e21b1d 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1365,7 +1365,7 @@ declare 385 { Tcl_Obj *patternObj) } declare 386 { - void Tcl_SetNotifier(Tcl_NotifierProcs *notifierProcPtr) + void Tcl_SetNotifier(const Tcl_NotifierProcs *notifierProcPtr) } declare 387 { Tcl_Mutex *Tcl_GetAllocMutex(void) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index fd5f81b..87a90af 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1164,7 +1164,8 @@ void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr, EXTERN int Tcl_RegExpMatchObj(Tcl_Interp *interp, Tcl_Obj *textObj, Tcl_Obj *patternObj); /* 386 */ -EXTERN void Tcl_SetNotifier(Tcl_NotifierProcs *notifierProcPtr); +EXTERN void Tcl_SetNotifier( + const Tcl_NotifierProcs *notifierProcPtr); /* 387 */ EXTERN Tcl_Mutex * Tcl_GetAllocMutex(void); /* 388 */ @@ -2377,7 +2378,7 @@ typedef struct TclStubs { Tcl_Obj * (*tcl_GetRange) (Tcl_Obj *objPtr, int first, int last); /* 383 */ TCL_DEPRECATED_API("Use Tcl_AppendStringsToObj") void (*tcl_AppendUnicodeToObj) (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int length); /* 384 */ int (*tcl_RegExpMatchObj) (Tcl_Interp *interp, Tcl_Obj *textObj, Tcl_Obj *patternObj); /* 385 */ - void (*tcl_SetNotifier) (Tcl_NotifierProcs *notifierProcPtr); /* 386 */ + void (*tcl_SetNotifier) (const Tcl_NotifierProcs *notifierProcPtr); /* 386 */ Tcl_Mutex * (*tcl_GetAllocMutex) (void); /* 387 */ int (*tcl_GetChannelNames) (Tcl_Interp *interp); /* 388 */ int (*tcl_GetChannelNamesEx) (Tcl_Interp *interp, const char *pattern); /* 389 */ diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 12b40b1..1140168 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -226,7 +226,7 @@ TclFinalizeNotifier(void) void Tcl_SetNotifier( - Tcl_NotifierProcs *notifierProcPtr) + const Tcl_NotifierProcs *notifierProcPtr) { tclNotifierHooks = *notifierProcPtr; 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); /* |