summaryrefslogtreecommitdiffstats
path: root/generic/tclEvent.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-26 07:29:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-26 07:29:02 (GMT)
commita4c35fb82f99d990ca1ef877cb9917c7f55151ff (patch)
treecdd02327448cf2c0393cbf3cea4fd48bb17e52c4 /generic/tclEvent.c
parent81a213ed4ce77b15fbc6d5d97cc1235b689ad482 (diff)
parente12b1646c6f675cf09d5f1a72d4ecdffa5da7396 (diff)
downloadtcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.zip
tcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.tar.gz
tcl-a4c35fb82f99d990ca1ef877cb9917c7f55151ff.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r--generic/tclEvent.c90
1 files changed, 87 insertions, 3 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index cb2e529..71ca814 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -14,6 +14,7 @@
*/
#include "tclInt.h"
+#include "tclUuid.h"
/*
* The data structure below is used to report background errors. One such
@@ -229,7 +230,7 @@ HandleBgErrors(
errPtr = assocPtr->firstBgPtr;
- Tcl_ListObjGetElements(NULL, copyObj, &prefixObjc, &prefixObjv);
+ TclListObjGetElements(NULL, copyObj, &prefixObjc, &prefixObjv);
tempObjv = (Tcl_Obj**)ckalloc((prefixObjc+2) * sizeof(Tcl_Obj *));
memcpy(tempObjv, prefixObjv, prefixObjc*sizeof(Tcl_Obj *));
tempObjv[prefixObjc] = errPtr->errorMsg;
@@ -1016,7 +1017,7 @@ Tcl_Exit(
* down another.
*
* Results:
- * None.
+ * The full Tcl version with build information.
*
* Side effects:
* Varied, see the respective initialization routines.
@@ -1024,7 +1025,89 @@ Tcl_Exit(
*-------------------------------------------------------------------------
*/
-void
+MODULE_SCOPE const TclStubs tclStubs;
+
+#ifndef STRINGIFY
+# define STRINGIFY(x) STRINGIFY1(x)
+# define STRINGIFY1(x) #x
+#endif
+
+static const struct {
+ const TclStubs *stubs;
+ const char version[256];
+} stubInfo = {
+ &tclStubs, {TCL_PATCH_LEVEL "+" STRINGIFY(TCL_VERSION_UUID)
+#if defined(__clang__) && defined(__clang_major__)
+ ".clang-" STRINGIFY(__clang_major__)
+#if __clang_minor__ < 10
+ "0"
+#endif
+ STRINGIFY(__clang_minor__)
+#endif
+#ifdef TCL_COMPILE_DEBUG
+ ".compiledebug"
+#endif
+#ifdef TCL_COMPILE_STATS
+ ".compilestats"
+#endif
+#if defined(__cplusplus) && !defined(__OBJC__)
+ ".cplusplus"
+#endif
+#ifndef NDEBUG
+ ".debug"
+#endif
+#if !defined(__clang__) && !defined(__INTEL_COMPILER) && defined(__GNUC__)
+ ".gcc-" STRINGIFY(__GNUC__)
+#if __GNUC_MINOR__ < 10
+ "0"
+#endif
+ STRINGIFY(__GNUC_MINOR__)
+#endif
+#ifdef __INTEL_COMPILER
+ ".icc-" STRINGIFY(__INTEL_COMPILER)
+#endif
+#if (defined(_WIN32) && !defined(_WIN64)) || (ULONG_MAX == 0xffffffffUL)
+ ".ilp32"
+#endif
+#ifdef TCL_MEM_DEBUG
+ ".memdebug"
+#endif
+#if defined(_MSC_VER)
+ ".msvc-" STRINGIFY(_MSC_VER)
+#endif
+#ifdef USE_NMAKE
+ ".nmake"
+#endif
+#ifdef TCL_NO_DEPRECATED
+ ".no-deprecate"
+#endif
+#if !TCL_THREADS
+ ".no-thread"
+#endif
+#ifndef TCL_CFG_OPTIMIZED
+ ".no-optimize"
+#endif
+#ifdef __OBJC__
+ ".objective-c"
+#if defined(__cplusplus)
+ "plusplus"
+#endif
+#endif
+#ifdef TCL_CFG_PROFILED
+ ".profile"
+#endif
+#ifdef PURIFY
+ ".purify"
+#endif
+#ifdef STATIC_BUILD
+ ".static"
+#endif
+#if TCL_UTF_MAX < 4
+ ".utf-16"
+#endif
+}};
+
+const char *
Tcl_InitSubsystems(void)
{
if (inExit != 0) {
@@ -1071,6 +1154,7 @@ Tcl_InitSubsystems(void)
TclpInitUnlock();
}
TclInitNotifier();
+ return stubInfo.version;
}
/*