diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-22 14:22:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-22 14:22:11 (GMT) |
commit | 298c9aa866650c686294458c87c8e08c74d835ac (patch) | |
tree | bd82b61c182b6f50b9e6161505c56bfb1b41a0f3 | |
parent | f050bae793b79e89e328b6c6b0d9ed2815d923c6 (diff) | |
parent | 4612b57a1e761b1dc3dd970b8dc318d4e2953360 (diff) | |
download | tcl-298c9aa866650c686294458c87c8e08c74d835ac.zip tcl-298c9aa866650c686294458c87c8e08c74d835ac.tar.gz tcl-298c9aa866650c686294458c87c8e08c74d835ac.tar.bz2 |
Fix [http://core.tcl.tk/tk/tktview?name=1712098|1712098]: Tk still needs Tcl source distro, by new export Tcl_MacOSXNotifierAddRunLoopMode()
-rw-r--r-- | generic/tcl.decls | 3 | ||||
-rw-r--r-- | generic/tclPlatDecls.h | 6 | ||||
-rw-r--r-- | generic/tclStubInit.c | 5 | ||||
-rw-r--r-- | macosx/tclMacOSXNotify.c | 8 |
4 files changed, 17 insertions, 5 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index c25e90f..5895946 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2451,6 +2451,9 @@ declare 1 macosx { const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath) } +declare 2 macosx { + void Tcl_MacOSXNotifierAddRunLoopMode(const void *runLoopMode) +} ############################################################################## diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 4b06148..8a1c6a5 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -69,6 +69,9 @@ EXTERN int Tcl_MacOSXOpenVersionedBundleResources( const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); +/* 2 */ +EXTERN void Tcl_MacOSXNotifierAddRunLoopMode( + const void *runLoopMode); #endif /* MACOSX */ typedef struct TclPlatStubs { @@ -82,6 +85,7 @@ typedef struct TclPlatStubs { #ifdef MAC_OSX_TCL /* MACOSX */ int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */ int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */ + void (*tcl_MacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 2 */ #endif /* MACOSX */ } TclPlatStubs; @@ -108,6 +112,8 @@ extern const TclPlatStubs *tclPlatStubsPtr; (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */ #define Tcl_MacOSXOpenVersionedBundleResources \ (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */ +#define Tcl_MacOSXNotifierAddRunLoopMode \ + (tclPlatStubsPtr->tcl_MacOSXNotifierAddRunLoopMode) /* 2 */ #endif /* MACOSX */ #endif /* defined(USE_TCL_STUBS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 0afc503..dd7dc26 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -397,7 +397,9 @@ TclWinGetPlatformId(void) #define TclpCreateTempFile_ TclpCreateTempFile #define TclUnixWaitForFile_ TclUnixWaitForFile -#ifndef MAC_OSX_TCL /* On UNIX, fill with other stub entries */ +#ifdef MAC_OSX_TCL /* On UNIX, fill with other stub entries */ +#define TclMacOSXNotifierAddRunLoopMode Tcl_MacOSXNotifierAddRunLoopMode +#else #define TclMacOSXGetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj **))(void *)TclpCreateProcess #define TclMacOSXSetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj *))(void *)isatty #define TclMacOSXCopyFileAttributes (int (*)(const char *, const char *, const Tcl_StatBuf *))(void *)TclUnixCopyFile @@ -1124,6 +1126,7 @@ static const TclPlatStubs tclPlatStubs = { #ifdef MAC_OSX_TCL /* MACOSX */ Tcl_MacOSXOpenBundleResources, /* 0 */ Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ + Tcl_MacOSXNotifierAddRunLoopMode, /* 2 */ #endif /* MACOSX */ }; diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index dd2b898..5bdc5a3 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -700,7 +700,7 @@ Tcl_InitNotifier(void) /* *---------------------------------------------------------------------- * - * TclMacOSXNotifierAddRunLoopMode -- + * Tcl_MacOSXNotifierAddRunLoopMode -- * * Add the tcl notifier RunLoop source, observer and timer (if any) * to the given RunLoop mode. @@ -715,7 +715,7 @@ Tcl_InitNotifier(void) */ void -TclMacOSXNotifierAddRunLoopMode( +Tcl_MacOSXNotifierAddRunLoopMode( const void *runLoopMode) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -2138,10 +2138,10 @@ AtForkChild(void) #else /* HAVE_COREFOUNDATION */ void -TclMacOSXNotifierAddRunLoopMode( +Tcl_MacOSXNotifierAddRunLoopMode( const void *runLoopMode) { - Tcl_Panic("TclMacOSXNotifierAddRunLoopMode: " + Tcl_Panic("Tcl_MacOSXNotifierAddRunLoopMode: " "Tcl not built with CoreFoundation support"); } |