summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h2
-rw-r--r--generic/tclCompile.h6
-rw-r--r--generic/tclIO.h2
-rw-r--r--generic/tclIOUtil.c23
-rw-r--r--generic/tclInt.h34
-rw-r--r--generic/tclScan.c4
-rw-r--r--[-rwxr-xr-x]generic/tclStrToD.c3
-rw-r--r--generic/tclStubInit.c2
-rw-r--r--generic/tclStubLibTbl.c58
-rw-r--r--generic/tclTest.c4
-rw-r--r--generic/tclTestProcBodyObj.c2
11 files changed, 104 insertions, 36 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 297b42c..93aba96 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2142,7 +2142,7 @@ typedef struct Tcl_EncodingType {
* Tcl_ExternalToUtf takes the initial value
* of *dstCharsPtr is taken as a limit of the
* maximum number of chars to produce in the
- * encoded UTF-8 content. Otherwise, the
+ * encoded UTF-8 content. Otherwise, the
* number of chars produced is controlled only
* by other limiting factors.
*/
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index c6c7a7c..b89346d 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1171,7 +1171,7 @@ MODULE_SCOPE void TclPushVarName(Tcl_Interp *interp,
int flags, int *localIndexPtr,
int *isScalarPtr);
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
-MODULE_SCOPE void TclInvalidateCmdLiteral(Tcl_Interp *interp,
+MODULE_SCOPE void TclInvalidateCmdLiteral(Tcl_Interp *interp,
const char *name, Namespace *nsPtr);
MODULE_SCOPE int TclSingleOpCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
@@ -1194,7 +1194,7 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr,
MODULE_SCOPE void TclLogCommandInfo(Tcl_Interp *interp,
const char *script, const char *command,
int length, const unsigned char *pc,
- Tcl_Obj **tosPtr);
+ Tcl_Obj **tosPtr);
MODULE_SCOPE Tcl_Obj *TclGetInnerContext(Tcl_Interp *interp,
const unsigned char *pc, Tcl_Obj **tosPtr);
MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
@@ -1660,7 +1660,7 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
#define PushVarNameWord(i,v,e,f,l,sc,word) \
SetLineInformation(word); \
- TclPushVarName(i,v,e,f,l,sc)
+ TclPushVarName(i,v,e,f,l,sc)
/*
* Often want to issue one of two versions of an instruction based on whether
diff --git a/generic/tclIO.h b/generic/tclIO.h
index ca74c3e..7aa07eb 100644
--- a/generic/tclIO.h
+++ b/generic/tclIO.h
@@ -126,7 +126,7 @@ typedef struct Channel {
*/
typedef struct ChannelState {
- const char *channelName; /* The name of the channel instance in Tcl
+ char *channelName; /* The name of the channel instance in Tcl
* commands. Storage is owned by the generic
* IO code, is dynamically allocated. */
int flags; /* ORed combination of the flags defined
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index d2919fc..06e1b32 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -2890,9 +2890,13 @@ int
Tcl_FSChdir(
Tcl_Obj *pathPtr)
{
- const Tcl_Filesystem *fsPtr;
+ const Tcl_Filesystem *fsPtr, *oldFsPtr = NULL;
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
int retVal = -1;
+ if (tsdPtr->cwdPathPtr != NULL) {
+ oldFsPtr = Tcl_FSGetFileSystemForPath(tsdPtr->cwdPathPtr);
+ }
if (Tcl_FSGetNormalizedPath(NULL, pathPtr) == NULL) {
Tcl_SetErrno(ENOENT);
return retVal;
@@ -2992,7 +2996,6 @@ Tcl_FSChdir(
* instead. This should be examined by someone on Unix.
*/
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&fsDataKey);
ClientData cd;
ClientData oldcd = tsdPtr->cwdClientData;
@@ -3009,6 +3012,14 @@ Tcl_FSChdir(
} else {
FsUpdateCwd(normDirName, NULL);
}
+
+ /*
+ * If the filesystem changed between old and new cwd
+ * force filesystem refresh on path objects.
+ */
+ if (oldFsPtr != NULL && fsPtr != oldFsPtr) {
+ Tcl_FSMountsChanged(NULL);
+ }
}
return retVal;
@@ -3150,7 +3161,7 @@ TclSkipUnlink (Tcl_Obj* shlibFile)
*
* Ad 2: This variable can disable/override the AUFS detection, i.e. for
* testing if a newer AUFS does not have the bug any more.
- *
+ *
* Ad 3: This is conditionally compiled in. Condition currently must be set manually.
* This part needs proper tests in the configure(.in).
*/
@@ -3460,7 +3471,7 @@ Tcl_LoadFile(
return retVal;
resolveSymbols:
- /*
+ /*
* At this point, *handlePtr is already set up to the handle for the
* loaded library. We now try to resolve the symbols.
*/
@@ -3469,7 +3480,7 @@ Tcl_LoadFile(
for (i=0 ; symbols[i] != NULL; i++) {
procPtrs[i] = Tcl_FindSymbol(interp, *handlePtr, symbols[i]);
if (procPtrs[i] == NULL) {
- /*
+ /*
* At least one symbol in the list was not found. Unload the
* file, and report the problem back to the caller.
* (Tcl_FindSymbol should already have left an appropriate
@@ -3489,7 +3500,7 @@ Tcl_LoadFile(
*----------------------------------------------------------------------
*
* DivertFindSymbol --
- *
+ *
* Find a symbol in a shared library loaded by copy-from-VFS.
*
*----------------------------------------------------------------------
diff --git a/generic/tclInt.h b/generic/tclInt.h
index c89f053..2537ad8 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -1177,25 +1177,25 @@ typedef struct CmdFrame {
*
* Field TEBC EvalEx
* ======= ==== ======
- * level yes yes
+ * level yes yes
* type BC/PREBC SRC/EVAL
- * line0 yes yes
- * framePtr yes yes
+ * line0 yes yes
+ * framePtr yes yes
* ======= ==== ======
*
* ======= ==== ========= union data
- * line1 - yes
- * line3 - yes
- * path - yes
+ * line1 - yes
+ * line3 - yes
+ * path - yes
* ------- ---- ------
- * codePtr yes -
- * pc yes -
+ * codePtr yes -
+ * pc yes -
* ======= ==== ======
*
* ======= ==== ========= union cmd
- * str.cmd yes yes
- * str.len yes yes
- * ------- ---- ------
+ * str.cmd yes yes
+ * str.len yes yes
+ * ------- ---- ------
*/
union {
@@ -3230,15 +3230,15 @@ MODULE_SCOPE Tcl_Obj * TclDictWithInit(Tcl_Interp *interp, Tcl_Obj *dictPtr,
MODULE_SCOPE int Tcl_DisassembleObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
-
-/* Assemble command function */
+
+/* Assemble command function */
MODULE_SCOPE int Tcl_AssembleObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[]);
+ Tcl_Obj *const objv[]);
MODULE_SCOPE int TclNRAssembleObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[]);
-
+ Tcl_Obj *const objv[]);
+
MODULE_SCOPE int Tcl_EncodingObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
@@ -3909,7 +3909,7 @@ MODULE_SCOPE int TclStreqOpCmd(ClientData clientData,
MODULE_SCOPE int TclCompileStreqOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
-
+
MODULE_SCOPE int TclCompileAssembleCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 4dfc2d6..3edb8be 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -595,7 +595,7 @@ Tcl_ScanObjCmd(
return TCL_ERROR;
}
- format = Tcl_GetStringFromObj(objv[2], NULL);
+ format = Tcl_GetString(objv[2]);
numVars = objc-3;
/*
@@ -617,7 +617,7 @@ Tcl_ScanObjCmd(
}
}
- string = Tcl_GetStringFromObj(objv[1], NULL);
+ string = Tcl_GetString(objv[1]);
baseString = string;
/*
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index c1b3e99..66640ea 100755..100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -1798,7 +1798,7 @@ RefineApproximation(
double quot; /* Correction term. */
double minincr; /* Lower bound on the absolute value of the
* correction term. */
- int roundToEven; /* Flag == TRUE if we need to invoke
+ int roundToEven = 0; /* Flag == TRUE if we need to invoke
* "round to even" functionality */
double rteSignificand; /* Significand of the round-to-even result */
int rteExponent; /* Exponent of the round-to-even result */
@@ -1915,7 +1915,6 @@ RefineApproximation(
roundToEven = 1;
break;
case MP_GT:
- roundToEven = 0;
break;
}
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 7a84cba..7d44163 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -82,7 +82,7 @@ static const char *TclGetStartupScriptFileName(void)
if (path == NULL) {
return NULL;
}
- return Tcl_GetStringFromObj(path, NULL);
+ return Tcl_GetString(path);
}
#if defined(_WIN32) || defined(__CYGWIN__)
diff --git a/generic/tclStubLibTbl.c b/generic/tclStubLibTbl.c
new file mode 100644
index 0000000..0391502
--- /dev/null
+++ b/generic/tclStubLibTbl.c
@@ -0,0 +1,58 @@
+/*
+ * tclStubLibTbl.c --
+ *
+ * Stub object that will be statically linked into extensions that want
+ * to access Tcl.
+ *
+ * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright (c) 1998 Paul Duffin.
+ *
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#include "tclInt.h"
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclInitStubTable --
+ *
+ * Initialize the stub table, using the structure pointed at
+ * by the "version" argument.
+ *
+ * Results:
+ * Outputs the value of the "version" argument.
+ *
+ * Side effects:
+ * Sets the stub table pointers.
+ *
+ *----------------------------------------------------------------------
+ */
+MODULE_SCOPE const char *
+TclInitStubTable(
+ const char *version) /* points to the version field of a
+ TclStubInfoType structure variable. */
+{
+ tclStubsPtr = ((const TclStubInfoType *) version)->stubs;
+
+ if (tclStubsPtr->hooks) {
+ tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
+ tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
+ tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs;
+ } else {
+ tclPlatStubsPtr = NULL;
+ tclIntStubsPtr = NULL;
+ tclIntPlatStubsPtr = NULL;
+ }
+
+ return version;
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 78
+ * End:
+ */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 0f4b6d4..19a9033 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2306,9 +2306,9 @@ TesteventDeleteProc(
return 0;
}
targetName = (Tcl_Obj *) clientData;
- targetNameStr = (char *) Tcl_GetStringFromObj(targetName, NULL);
+ targetNameStr = (char *) Tcl_GetString(targetName);
ev = (TestEvent *) event;
- evNameStr = Tcl_GetStringFromObj(ev->tag, NULL);
+ evNameStr = Tcl_GetString(ev->tag);
if (strcmp(evNameStr, targetNameStr) == 0) {
Tcl_DecrRefCount(ev->tag);
Tcl_DecrRefCount(ev->command);
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index a3f89f6..0d3617e 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -245,7 +245,7 @@ ProcBodyTestProcObjCmd(
* Find the Command pointer to this procedure
*/
- fullName = Tcl_GetStringFromObj(objv[3], NULL);
+ fullName = Tcl_GetString(objv[3]);
procCmd = Tcl_FindCommand(interp, fullName, NULL, TCL_LEAVE_ERR_MSG);
if (procCmd == NULL) {
return TCL_ERROR;