summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXNotify.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-01-22 12:44:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-01-22 12:44:44 (GMT)
commit076287b193ce6c0a24cde6b5888e355468c2e2ac (patch)
treeea5c673fd06ebb3d0544fbf679172292ebe0f14c /macosx/tkMacOSXNotify.c
parentfcee3d36fd756683f04be4a52137afe680009517 (diff)
parentf31f7c15c932ef82b7ea1ce4df7b3a1436118d62 (diff)
downloadtk-076287b193ce6c0a24cde6b5888e355468c2e2ac.zip
tk-076287b193ce6c0a24cde6b5888e355468c2e2ac.tar.gz
tk-076287b193ce6c0a24cde6b5888e355468c2e2ac.tar.bz2
Fix [1712098]: Tk still needs Tcl source distro
Diffstat (limited to 'macosx/tkMacOSXNotify.c')
-rw-r--r--macosx/tkMacOSXNotify.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 4b65fd8..cbffb55 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -16,7 +16,29 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXEvent.h"
#include "tkMacOSXConstants.h"
-#include <tclInt.h>
+
+#ifdef USE_TCL_STUBS
+#ifdef __cplusplus
+extern "C" {
+#endif
+/* Little hack to eliminate the need for "tclInt.h" here:
+ Just copy a small portion of TclIntPlatStubs, just
+ enough to make it work. See [600b72bfbc] */
+typedef struct {
+ int magic;
+ void *hooks;
+ void (*dummy[19]) (void); /* dummy entries 0-18, not used */
+ void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */
+} TclIntPlatStubs;
+extern const TclIntPlatStubs *tclIntPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
+#define TclMacOSXNotifierAddRunLoopMode \
+ (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */
+#else
+ extern void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode);
+#endif
#import <objc/objc-auto.h>
/* This is not used for anything at the moment. */