summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index c4f7991..21e8f20 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -505,7 +505,7 @@ TclpInitLibraryPath(
str = Tcl_JoinPath(pathc, pathv, &ds);
Tcl_ListObjAppendElement(NULL, pathPtr, TclDStringToObj(&ds));
}
- ckfree(pathv);
+ Tcl_Free(pathv);
}
/*
@@ -539,7 +539,7 @@ TclpInitLibraryPath(
*encodingPtr = Tcl_GetEncoding(NULL, NULL);
str = TclGetString(pathPtr);
*lengthPtr = pathPtr->length;
- *valuePtr = ckalloc(*lengthPtr + 1);
+ *valuePtr = Tcl_Alloc(*lengthPtr + 1);
memcpy(*valuePtr, str, *lengthPtr + 1);
Tcl_DecrRefCount(pathPtr);
}
@@ -981,7 +981,7 @@ TclpSetVariables(
*
* Results:
* The return value is the index in environ of an entry with the name
- * "name", or -1 if there is no such entry. The integer at *lengthPtr is
+ * "name", or (size_t)-1 if there is no such entry. The integer at *lengthPtr is
* filled in with the length of name (if a matching entry is found) or
* the length of the environ array (if no matching entry is found).
*
@@ -991,16 +991,16 @@ TclpSetVariables(
*----------------------------------------------------------------------
*/
-int
+size_t
TclpFindVariable(
const char *name, /* Name of desired environment variable
* (native). */
- int *lengthPtr) /* Used to return length of name (for
+ size_t *lengthPtr) /* Used to return length of name (for
* successful searches) or number of non-NULL
* entries in environ (for unsuccessful
* searches). */
{
- int i, result = -1;
+ size_t i, result = (size_t)-1;
register const char *env, *p1, *p2;
Tcl_DString envString;