diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-21 13:22:46 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-21 13:22:46 (GMT) |
commit | f1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7 (patch) | |
tree | 8f2de1f5517aaef98a53e2b46cd01cccb3e058bf | |
parent | fbc72eac8c4bf3a9b9b81257b08dc6a5640b7dbf (diff) | |
download | tk-f1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7.zip tk-f1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7.tar.gz tk-f1ee7912ba3d631f5ce43a5a0a5434cd6f0b0dc7.tar.bz2 |
If TK_NO_DEPRECATED is defined, remove the deprecated stub entries
-rw-r--r-- | generic/tkIntDecls.h | 16 | ||||
-rw-r--r-- | generic/tkStubInit.c | 10 |
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) { |