From 7d678ecc919f1d253250ee607311fad444343d25 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 27 Mar 2013 10:48:00 +0000 Subject: remove unneccessary duplication --- generic/tcl.decls | 8 -------- 1 file changed, 8 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 7f49002..28cee54 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2171,14 +2171,6 @@ export { export { void Tcl_GetMemoryInfo(Tcl_DString *dsPtr) } -export { - const char *Tcl_InitStubs(Tcl_Interp *interp, const char *version, - int exact) -} -export { - const char *TclTomMathInitializeStubs(Tcl_Interp *interp, - const char *version, int epoch, int revision) -} # Global variables that need to be exported from the tcl shared library. -- cgit v0.12 From 0a1209b8b919a0913b8ef905bd8244dfaf8d56ea Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 27 Mar 2013 14:06:03 +0000 Subject: Add dummy (undocumented) TclCanceled function in stub table (not exported as symbol or macro), which always returns TCL_OK. Needed for Tk 8.5.14 when running in Tcl 8.6 for properly clean-up when a (Tcl 8.6) thread is canceled. --- generic/tcl.decls | 5 +++++ generic/tclDecls.h | 14 +++++++++++--- generic/tclStubInit.c | 9 ++++++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 28cee54..e618c9d 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2108,6 +2108,11 @@ declare 578 { declare 579 { void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, const char *format, ...) } + +# Public in Tcl 8.6: +declare 581 { + int TclCanceled(Tcl_Interp *interp, int flags) +} declare 630 { void TclUnusedStubEntry(void) } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 20ec35d..7eb6714 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -3409,7 +3409,11 @@ EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, CONST char *format, ...); #endif /* Slot 580 is reserved */ -/* Slot 581 is reserved */ +#ifndef TclCanceled_TCL_DECLARED +#define TclCanceled_TCL_DECLARED +/* 581 */ +EXTERN int TclCanceled(Tcl_Interp *interp, int flags); +#endif /* Slot 582 is reserved */ /* Slot 583 is reserved */ /* Slot 584 is reserved */ @@ -4079,7 +4083,7 @@ typedef struct TclStubs { Tcl_Obj * (*tcl_ObjPrintf) (CONST char *format, ...); /* 578 */ void (*tcl_AppendPrintfToObj) (Tcl_Obj *objPtr, CONST char *format, ...); /* 579 */ VOID *reserved580; - VOID *reserved581; + int (*tclCanceled) (Tcl_Interp *interp, int flags); /* 581 */ VOID *reserved582; VOID *reserved583; VOID *reserved584; @@ -6484,7 +6488,10 @@ extern TclStubs *tclStubsPtr; (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ #endif /* Slot 580 is reserved */ -/* Slot 581 is reserved */ +#ifndef TclCanceled +#define TclCanceled \ + (tclStubsPtr->tclCanceled) /* 581 */ +#endif /* Slot 582 is reserved */ /* Slot 583 is reserved */ /* Slot 584 is reserved */ @@ -6542,6 +6549,7 @@ extern TclStubs *tclStubsPtr; /* !END!: Do not edit above this line. */ +#undef TclCanceled #undef TclUnusedStubEntry #undef TCL_STORAGE_CLASS diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index fd4a222..f8012c2 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -76,6 +76,13 @@ MODULE_SCOPE TclPlatStubs tclPlatStubs; MODULE_SCOPE TclStubs tclStubs; MODULE_SCOPE TclTomMathStubs tclTomMathStubs; +#define TclCanceled canceled +static int TclCanceled(interp) + Tcl_Interp *interp; +{ + return TCL_OK; +} + #if defined(_WIN32) || defined(__CYGWIN__) #undef TclWinNToHS unsigned short TclWinNToHS(unsigned short ns) { @@ -1256,7 +1263,7 @@ TclStubs tclStubs = { Tcl_ObjPrintf, /* 578 */ Tcl_AppendPrintfToObj, /* 579 */ NULL, /* 580 */ - NULL, /* 581 */ + TclCanceled, /* 581 */ NULL, /* 582 */ NULL, /* 583 */ NULL, /* 584 */ -- cgit v0.12 From 4e1c42706e2192221efb4179bcae10e4bd042303 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 28 Mar 2013 14:48:08 +0000 Subject: Undo [6a9ee3273c]. Last commit in Tk's core-8-5-branch makes this change no longer necessary. --- generic/tcl.decls | 5 ----- generic/tclDecls.h | 14 +++----------- generic/tclStubInit.c | 9 +-------- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index e618c9d..28cee54 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2108,11 +2108,6 @@ declare 578 { declare 579 { void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, const char *format, ...) } - -# Public in Tcl 8.6: -declare 581 { - int TclCanceled(Tcl_Interp *interp, int flags) -} declare 630 { void TclUnusedStubEntry(void) } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 7eb6714..20ec35d 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -3409,11 +3409,7 @@ EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, CONST char *format, ...); #endif /* Slot 580 is reserved */ -#ifndef TclCanceled_TCL_DECLARED -#define TclCanceled_TCL_DECLARED -/* 581 */ -EXTERN int TclCanceled(Tcl_Interp *interp, int flags); -#endif +/* Slot 581 is reserved */ /* Slot 582 is reserved */ /* Slot 583 is reserved */ /* Slot 584 is reserved */ @@ -4083,7 +4079,7 @@ typedef struct TclStubs { Tcl_Obj * (*tcl_ObjPrintf) (CONST char *format, ...); /* 578 */ void (*tcl_AppendPrintfToObj) (Tcl_Obj *objPtr, CONST char *format, ...); /* 579 */ VOID *reserved580; - int (*tclCanceled) (Tcl_Interp *interp, int flags); /* 581 */ + VOID *reserved581; VOID *reserved582; VOID *reserved583; VOID *reserved584; @@ -6488,10 +6484,7 @@ extern TclStubs *tclStubsPtr; (tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */ #endif /* Slot 580 is reserved */ -#ifndef TclCanceled -#define TclCanceled \ - (tclStubsPtr->tclCanceled) /* 581 */ -#endif +/* Slot 581 is reserved */ /* Slot 582 is reserved */ /* Slot 583 is reserved */ /* Slot 584 is reserved */ @@ -6549,7 +6542,6 @@ extern TclStubs *tclStubsPtr; /* !END!: Do not edit above this line. */ -#undef TclCanceled #undef TclUnusedStubEntry #undef TCL_STORAGE_CLASS diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f8012c2..fd4a222 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -76,13 +76,6 @@ MODULE_SCOPE TclPlatStubs tclPlatStubs; MODULE_SCOPE TclStubs tclStubs; MODULE_SCOPE TclTomMathStubs tclTomMathStubs; -#define TclCanceled canceled -static int TclCanceled(interp) - Tcl_Interp *interp; -{ - return TCL_OK; -} - #if defined(_WIN32) || defined(__CYGWIN__) #undef TclWinNToHS unsigned short TclWinNToHS(unsigned short ns) { @@ -1263,7 +1256,7 @@ TclStubs tclStubs = { Tcl_ObjPrintf, /* 578 */ Tcl_AppendPrintfToObj, /* 579 */ NULL, /* 580 */ - TclCanceled, /* 581 */ + NULL, /* 581 */ NULL, /* 582 */ NULL, /* 583 */ NULL, /* 584 */ -- cgit v0.12