summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-05 11:20:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-05 11:20:21 (GMT)
commit665e03a336861b9001cec4f01cb7ed37177578cc (patch)
tree63b2e1f636b5ebc9c0a44e4e90e20dc2dbe1c703
parent6f5d6107545bbd42e380fe0e297d9e13fa8816d3 (diff)
parent75e8b346e2193f1c524cbbb741583e6ab4dfc417 (diff)
downloadtcl-665e03a336861b9001cec4f01cb7ed37177578cc.zip
tcl-665e03a336861b9001cec4f01cb7ed37177578cc.tar.gz
tcl-665e03a336861b9001cec4f01cb7ed37177578cc.tar.bz2
Merge 8.7
-rw-r--r--doc/Notifier.32
-rw-r--r--generic/tcl.decls2
-rw-r--r--generic/tclDecls.h5
-rw-r--r--generic/tclNotify.c2
-rw-r--r--unix/tclXtNotify.c13
5 files changed, 13 insertions, 11 deletions
diff --git a/doc/Notifier.3 b/doc/Notifier.3
index 1899032..2d58906 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 cb23d6c..f7db41a 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -1418,7 +1418,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 9205401..ee4f131 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1008,7 +1008,8 @@ EXTERN Tcl_Obj * Tcl_GetRange(Tcl_Obj *objPtr, size_t first,
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 */
@@ -2164,7 +2165,7 @@ typedef struct TclStubs {
Tcl_Obj * (*tcl_GetRange) (Tcl_Obj *objPtr, size_t first, size_t last); /* 383 */
void (*reserved384)(void);
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 862b957..3d45737 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 79dd154..b7a1ea8 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);
/*