diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-15 16:04:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-15 16:04:48 (GMT) |
commit | 3555827afa0cdedcc64a6bcd1cbdf9c2876deac0 (patch) | |
tree | 8b0394365ab38bc8b75d570eb08053e9bf0d7a82 | |
parent | 18d01177025f5569208bde327546155537cf1245 (diff) | |
parent | d0ab2bd83ddf58e52fc7f6043e701f62d539797e (diff) | |
download | tk-3555827afa0cdedcc64a6bcd1cbdf9c2876deac0.zip tk-3555827afa0cdedcc64a6bcd1cbdf9c2876deac0.tar.gz tk-3555827afa0cdedcc64a6bcd1cbdf9c2876deac0.tar.bz2 |
Extend the public and private stub tables with dummy NULL entries, up to the size of the Tk 8.6 stub tables. This makes it easier to debug Tk extensions which use Tk 8.6 features but (erroneously) are attempted to be loaded in wish8.5
-rw-r--r-- | generic/tk.decls | 3 | ||||
-rw-r--r-- | generic/tkDecls.h | 15 | ||||
-rw-r--r-- | generic/tkInt.decls | 3 | ||||
-rw-r--r-- | generic/tkIntDecls.h | 20 | ||||
-rw-r--r-- | generic/tkStubInit.c | 8 |
5 files changed, 49 insertions, 0 deletions
diff --git a/generic/tk.decls b/generic/tk.decls index 50b2837..2825111 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -1067,6 +1067,9 @@ declare 272 { declare 273 { void Tk_CreateOldPhotoImageFormat(Tk_PhotoImageFormat *formatPtr) } +declare 275 { + void TkUnusedStubEntry(void) +} # Define the platform specific public Tk interface. These functions are # only available on the designated platform. diff --git a/generic/tkDecls.h b/generic/tkDecls.h index d06df4b..6a2cca0 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -1674,6 +1674,12 @@ EXTERN void Tk_CreateOldImageType(Tk_ImageType *typePtr); EXTERN void Tk_CreateOldPhotoImageFormat( Tk_PhotoImageFormat *formatPtr); #endif +/* Slot 274 is reserved */ +#ifndef TkUnusedStubEntry_TCL_DECLARED +#define TkUnusedStubEntry_TCL_DECLARED +/* 275 */ +EXTERN void TkUnusedStubEntry(void); +#endif typedef struct TkStubHooks { struct TkPlatStubs *tkPlatStubs; @@ -1960,6 +1966,8 @@ typedef struct TkStubs { Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */ void (*tk_CreateOldImageType) (Tk_ImageType *typePtr); /* 272 */ void (*tk_CreateOldPhotoImageFormat) (Tk_PhotoImageFormat *formatPtr); /* 273 */ + VOID *reserved274; + void (*tkUnusedStubEntry) (void); /* 275 */ } TkStubs; #ifdef __cplusplus @@ -3066,6 +3074,11 @@ extern TkStubs *tkStubsPtr; #define Tk_CreateOldPhotoImageFormat \ (tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */ #endif +/* Slot 274 is reserved */ +#ifndef TkUnusedStubEntry +#define TkUnusedStubEntry \ + (tkStubsPtr->tkUnusedStubEntry) /* 275 */ +#endif #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ @@ -3074,5 +3087,7 @@ extern TkStubs *tkStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT +#undef TkUnusedStubEntry + #endif /* _TKDECLS */ diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 6794edb..17f39ba 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -568,6 +568,9 @@ declare 180 { char *TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } +declare 184 { + void TkUnusedStubEntry(void) +} ############################################################################## diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 5fcce30..063301d 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -962,6 +962,14 @@ EXTERN char * TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); #endif +/* Slot 181 is reserved */ +/* Slot 182 is reserved */ +/* Slot 183 is reserved */ +#ifndef TkUnusedStubEntry_TCL_DECLARED +#define TkUnusedStubEntry_TCL_DECLARED +/* 184 */ +EXTERN void TkUnusedStubEntry(void); +#endif typedef struct TkIntStubs { int magic; @@ -1175,6 +1183,10 @@ typedef struct TkIntStubs { char * (*tkOrientPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 178 */ int (*tkSmoothParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, CONST char *value, char *widgRec, int offset); /* 179 */ char * (*tkSmoothPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 180 */ + VOID *reserved181; + VOID *reserved182; + VOID *reserved183; + void (*tkUnusedStubEntry) (void); /* 184 */ } TkIntStubs; #ifdef __cplusplus @@ -1846,6 +1858,13 @@ extern TkIntStubs *tkIntStubsPtr; #define TkSmoothPrintProc \ (tkIntStubsPtr->tkSmoothPrintProc) /* 180 */ #endif +/* Slot 181 is reserved */ +/* Slot 182 is reserved */ +/* Slot 183 is reserved */ +#ifndef TkUnusedStubEntry +#define TkUnusedStubEntry \ + (tkIntStubsPtr->tkUnusedStubEntry) /* 184 */ +#endif #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ @@ -1881,6 +1900,7 @@ extern TkIntStubs *tkIntStubsPtr; (Region) (src), (Region) (ret)) #endif /* !__CYGWIN__*/ +#undef TkUnusedStubEntry #if defined(__CYGWIN__) && defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) # undef TkBindDeadWindow # define TkBindDeadWindow(winPtr) /* Removed from Cygwins stub table, just do nothing */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index c2ef290..79edc4d 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -30,6 +30,8 @@ #include "tkPlatDecls.h" #include "tkIntXlibDecls.h" +#define TkUnusedStubEntry NULL + #ifdef __WIN32__ static int @@ -476,6 +478,10 @@ TkIntStubs tkIntStubs = { TkOrientPrintProc, /* 178 */ TkSmoothParseProc, /* 179 */ TkSmoothPrintProc, /* 180 */ + NULL, /* 181 */ + NULL, /* 182 */ + NULL, /* 183 */ + TkUnusedStubEntry, /* 184 */ }; TkIntPlatStubs tkIntPlatStubs = { @@ -1130,6 +1136,8 @@ TkStubs tkStubs = { Tk_Interp, /* 271 */ Tk_CreateOldImageType, /* 272 */ Tk_CreateOldPhotoImageFormat, /* 273 */ + NULL, /* 274 */ + TkUnusedStubEntry, /* 275 */ }; /* !END!: Do not edit above this line. */ |