summaryrefslogtreecommitdiffstats
path: root/generic/tclEvent.c
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2022-08-31 16:19:00 (GMT)
committerkjnash <k.j.nash@usa.net>2022-08-31 16:19:00 (GMT)
commitbca70ca3acaed162e49bc7616b7da4001c7fee41 (patch)
treee7f53f796bd576d7231fed8db0aa533ae65f59b6 /generic/tclEvent.c
parent7e2bd5e5052a3fa8f5ee01c05e56fadf4cdfc592 (diff)
parent6cf74d1492b68e11b5a4cccf559ec5f69836b67b (diff)
downloadtcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.zip
tcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.tar.gz
tcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r--generic/tclEvent.c96
1 files changed, 93 insertions, 3 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 52cd351..c8fe92e 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);
+ TclListObjGetElementsM(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;
}
/*
@@ -1618,6 +1702,12 @@ Tcl_CreateThread(
}
return result;
#else
+ (void)idPtr;
+ (void)proc;
+ (void)clientData;
+ (void)stackSize;
+ (void)flags;
+
return TCL_ERROR;
#endif /* TCL_THREADS */
}