summaryrefslogtreecommitdiffstats
path: root/generic/tclEnv.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r--generic/tclEnv.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index 6dae72a..ce1bfbe 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -50,7 +50,7 @@ static struct {
* need to track this in case another
* subsystem swaps around the environ array
* like we do. */
- size_t ourEnvironSize; /* Non-zero means that the environ array was
+ Tcl_Size ourEnvironSize; /* Non-zero means that the environ array was
* malloced and has this many total entries
* allocated to it (not all may be in use at
* once). Zero means that the environment
@@ -185,8 +185,8 @@ TclSetupEnv(
p1 = "COMSPEC";
}
#endif
- obj1 = Tcl_NewStringObj(p1, TCL_INDEX_NONE);
- obj2 = Tcl_NewStringObj(p2, TCL_INDEX_NONE);
+ obj1 = Tcl_NewStringObj(p1, -1);
+ obj2 = Tcl_NewStringObj(p2, -1);
Tcl_DStringFree(&envString);
Tcl_IncrRefCount(obj1);
@@ -253,8 +253,8 @@ TclSetEnv(
const char *value) /* New value for variable (UTF-8). */
{
Tcl_DString envString;
- size_t nameLength, valueLength;
- size_t index, length;
+ Tcl_Size nameLength, valueLength;
+ Tcl_Size index, length;
char *p, *oldValue;
const techar *p2;
@@ -453,7 +453,7 @@ TclUnsetEnv(
const char *name) /* Name of variable to remove (UTF-8). */
{
char *oldValue;
- size_t length, index;
+ Tcl_Size length, index;
#ifdef USE_PUTENV_FOR_UNSET
Tcl_DString envString;
char *string;
@@ -469,7 +469,7 @@ TclUnsetEnv(
* needless work and to avoid recursion on the unset.
*/
- if (index == TCL_INDEX_NONE) {
+ if (index == -1) {
Tcl_MutexUnlock(&envMutex);
return;
}
@@ -568,13 +568,13 @@ TclGetEnv(
* value of the environment variable is
* stored. */
{
- size_t length, index;
+ Tcl_Size length, index;
const char *result;
Tcl_MutexLock(&envMutex);
index = TclpFindVariable(name, &length);
result = NULL;
- if (index != TCL_INDEX_NONE) {
+ if (index != -1) {
Tcl_DString envStr;
result = tenviron2utfdstr(tenviron[index], -1, &envStr);
@@ -582,7 +582,7 @@ TclGetEnv(
if (*result == '=') {
result++;
Tcl_DStringInit(valuePtr);
- Tcl_DStringAppend(valuePtr, result, TCL_INDEX_NONE);
+ Tcl_DStringAppend(valuePtr, result, -1);
result = Tcl_DStringValue(valuePtr);
} else {
result = NULL;