summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-10 15:27:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-10 15:27:09 (GMT)
commit43cdc8870751cb686950fe81890def1446e1d4d4 (patch)
tree51c25d8552041fea1155ea808e6608b4111a64cd
parenta525df6909077fb56170cafec49e67dec930afa9 (diff)
parente66cb0c31e8286e752f0ce8d20b886af8b8d4507 (diff)
downloadtcl-43cdc8870751cb686950fe81890def1446e1d4d4.zip
tcl-43cdc8870751cb686950fe81890def1446e1d4d4.tar.gz
tcl-43cdc8870751cb686950fe81890def1446e1d4d4.tar.bz2
Merge 8.7. Tcl_BackgroundError is now a macro.
-rw-r--r--generic/tcl.decls7
-rw-r--r--generic/tclCmdIL.c2
-rw-r--r--generic/tclDecls.h9
-rw-r--r--generic/tclEvent.c10
-rw-r--r--generic/tclStubInit.c2
-rw-r--r--generic/tclTest.c4
6 files changed, 13 insertions, 21 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 7af8cea..61b1982 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -294,9 +294,10 @@ declare 74 {
declare 75 {
int Tcl_AsyncReady(void)
}
-declare 76 {
- void Tcl_BackgroundError(Tcl_Interp *interp)
-}
+# Removed in 9.0
+#declare 76 {deprecated {No longer in use, changed to macro}} {
+# void Tcl_BackgroundError(Tcl_Interp *interp)
+#}
# Removed in 9.0:
#declare 77 {deprecated {Use Tcl_UtfBackslash}} {
# char Tcl_Backslash(const char *src, int *readPtr)
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 667ca52..073ed20 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -3976,7 +3976,7 @@ Tcl_LsortObjCmd(
}
if (result == TCL_ERROR) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
- "\n (-index option item number %d)", j));
+ "\n (-index option item number %" TCL_Z_MODIFIER "d)", j));
sortInfo.resultCode = TCL_ERROR;
goto done;
}
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 57e467b..cda7a48 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -242,8 +242,7 @@ EXTERN int Tcl_AsyncInvoke(Tcl_Interp *interp, int code);
EXTERN void Tcl_AsyncMark(Tcl_AsyncHandler async);
/* 75 */
EXTERN int Tcl_AsyncReady(void);
-/* 76 */
-EXTERN void Tcl_BackgroundError(Tcl_Interp *interp);
+/* Slot 76 is reserved */
/* Slot 77 is reserved */
/* 78 */
EXTERN int Tcl_BadChannelOption(Tcl_Interp *interp,
@@ -1855,7 +1854,7 @@ typedef struct TclStubs {
int (*tcl_AsyncInvoke) (Tcl_Interp *interp, int code); /* 73 */
void (*tcl_AsyncMark) (Tcl_AsyncHandler async); /* 74 */
int (*tcl_AsyncReady) (void); /* 75 */
- void (*tcl_BackgroundError) (Tcl_Interp *interp); /* 76 */
+ void (*reserved76)(void);
void (*reserved77)(void);
int (*tcl_BadChannelOption) (Tcl_Interp *interp, const char *optionName, const char *optionList); /* 78 */
void (*tcl_CallWhenDeleted) (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, void *clientData); /* 79 */
@@ -2597,8 +2596,7 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_AsyncMark) /* 74 */
#define Tcl_AsyncReady \
(tclStubsPtr->tcl_AsyncReady) /* 75 */
-#define Tcl_BackgroundError \
- (tclStubsPtr->tcl_BackgroundError) /* 76 */
+/* Slot 76 is reserved */
/* Slot 77 is reserved */
#define Tcl_BadChannelOption \
(tclStubsPtr->tcl_BadChannelOption) /* 78 */
@@ -3845,6 +3843,7 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_SetIntObj(objPtr, value) Tcl_SetWideIntObj((objPtr), (int)(value))
#define Tcl_SetLongObj(objPtr, value) Tcl_SetWideIntObj((objPtr), (long)(value))
#define Tcl_GetUnicode(objPtr) Tcl_GetUnicodeFromObj((objPtr), NULL)
+#define Tcl_BackgroundError(interp) Tcl_BackgroundException((interp), TCL_ERROR)
/*
* Deprecated Tcl procedures:
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 5d180d5..d8d31d9 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -124,7 +124,7 @@ static void FinalizeThread(int quick);
/*
*----------------------------------------------------------------------
*
- * Tcl_BackgroundError --
+ * Tcl_BackgroundException --
*
* This function is invoked to handle errors that occur in Tcl commands
* that are invoked in "background" (e.g. from event or timer bindings).
@@ -140,14 +140,6 @@ static void FinalizeThread(int quick);
*/
void
-Tcl_BackgroundError(
- Tcl_Interp *interp) /* Interpreter in which an error has
- * occurred. */
-{
- Tcl_BackgroundException(interp, TCL_ERROR);
-}
-
-void
Tcl_BackgroundException(
Tcl_Interp *interp, /* Interpreter in which an exception has
* occurred. */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 61a4d76..55e36b2 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -855,7 +855,7 @@ const TclStubs tclStubs = {
Tcl_AsyncInvoke, /* 73 */
Tcl_AsyncMark, /* 74 */
Tcl_AsyncReady, /* 75 */
- Tcl_BackgroundError, /* 76 */
+ 0, /* 76 */
0, /* 77 */
Tcl_BadChannelOption, /* 78 */
Tcl_CallWhenDeleted, /* 79 */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 277322a..f57cad3 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2281,14 +2281,14 @@ TesteventProc(
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp,
" (command bound to \"testevent\" callback)");
- Tcl_BackgroundError(interp);
+ Tcl_BackgroundException(interp, TCL_ERROR);
return 1; /* Avoid looping on errors */
}
if (Tcl_GetBooleanFromObj(interp, Tcl_GetObjResult(interp),
&retval) != TCL_OK) {
Tcl_AddErrorInfo(interp,
" (return value from \"testevent\" callback)");
- Tcl_BackgroundError(interp);
+ Tcl_BackgroundException(interp, TCL_ERROR);
return 1;
}
if (retval) {