summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-21 13:22:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-21 13:22:46 (GMT)
commitf1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7 (patch)
tree8f2de1f5517aaef98a53e2b46cd01cccb3e058bf /generic
parentfbc72eac8c4bf3a9b9b81257b08dc6a5640b7dbf (diff)
downloadtk-f1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7.zip
tk-f1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7.tar.gz
tk-f1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7.tar.bz2
If TK_NO_DEPRECATED is defined, remove the deprecated stub entries
Diffstat (limited to 'generic')
-rw-r--r--generic/tkIntDecls.h16
-rw-r--r--generic/tkStubInit.c10
2 files changed, 19 insertions, 7 deletions
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 9d86109..11802b8 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -1213,13 +1213,15 @@ extern const TkIntStubs *tkIntStubsPtr;
#undef TkpGetSystemDefault
#undef TkpMakeContainer
-#define TkSetWindowMenuBar Tk_SetWindowMenuBar
-#define TkpDrawHighlightBorder Tk_DrawHighlightBorder
-#define TkpUseWindow Tk_UseWindow
-#define TkpSetMainMenubar Tk_SetMainMenubar
-#define TkpGetOtherWindow ((TkWindow *(*)(TkWindow *))(void *)Tk_GetOtherWindow)
-#define TkpGetSystemDefault Tk_GetSystemDefault
-#define TkpMakeContainer Tk_MakeContainer
+#if !defined(TK_NO_DEPRECATED) && (TCL_MAJOR_VERSION == 8)
+# define TkSetWindowMenuBar Tk_SetWindowMenuBar
+# define TkpDrawHighlightBorder Tk_DrawHighlightBorder
+# define TkpUseWindow Tk_UseWindow
+# define TkpSetMainMenubar Tk_SetMainMenubar
+# define TkpGetOtherWindow ((TkWindow *(*)(TkWindow *))(void *)Tk_GetOtherWindow)
+# define TkpGetSystemDefault Tk_GetSystemDefault
+# define TkpMakeContainer Tk_MakeContainer
+#endif
#if !defined(MAC_OSX_TK)
# undef TkpWillDrawWidget
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 0426c50..f802810 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -61,6 +61,16 @@ static int TkWinGetPlatformId(void) {
# define TkWinGetPlatformId 0
#endif
+#if defined(TK_NO_DEPRECATED) || (TCL_MAJOR_VERSION > 8)
+# define TkSetWindowMenuBar 0
+# define TkpDrawHighlightBorder 0
+# define TkpUseWindow 0
+# define TkpSetMainMenubar 0
+# define TkpGetOtherWindow 0
+# define TkpGetSystemDefault 0
+# define TkpMakeContainer 0
+#endif
+
static int
doNothing(void)
{