summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 950cae6..7e321f6 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -32,6 +32,11 @@
static ProcessGlobalValue executableName = {
0, 0, NULL, NULL, NULL, NULL, NULL
};
+#if !defined(STATIC_BUILD)
+static ProcessGlobalValue shlibName = {
+ 0, 0, NULL, NULL, NULL, NULL, NULL
+};
+#endif
/*
* The following values are used in the flags arguments of Tcl*Scan*Element
@@ -4379,6 +4384,52 @@ Tcl_GetNameOfExecutable(void)
return bytes;
}
+#if !defined(STATIC_BUILD)
+/*
+ * TclSetObjNameOfShlib --
+ *
+ * This function stores the absolute pathname of the Tcl shared library.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Stores the shared library name in the process global database.
+ */
+
+void
+TclSetObjNameOfShlib(
+ Tcl_Obj *name,
+ TCL_UNUSED(Tcl_Encoding))
+{
+ TclSetProcessGlobalValue(&shlibName, name);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclGetObjNameOfShlib --
+ *
+ * This function retrieves the absolute pathname of the Tcl shared
+ * library.
+ *
+ * Results:
+ * A pointer to an "fsPath" Tcl_Obj, or to an empty Tcl_Obj if the
+ * pathname of the application is unknown.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Obj *
+TclGetObjNameOfShlib(void)
+{
+ return TclGetProcessGlobalValue(&shlibName);
+}
+
+#endif /* !STATIC_BUILD - Tcl{Get,Set}NameOfShlib */
/*
*----------------------------------------------------------------------
*