summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-07-01 09:11:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-07-01 09:11:19 (GMT)
commit77ba009f38758fa27fecfc8f99b363a95e142ad4 (patch)
treea4a595d0d7e461bfb0a07cf3163fd08eb720eaf1 /unix
parent3dc03bc4ac97274d4f260b16b1b7f5e5d550666a (diff)
downloadtcl-77ba009f38758fa27fecfc8f99b363a95e142ad4.zip
tcl-77ba009f38758fa27fecfc8f99b363a95e142ad4.tar.gz
tcl-77ba009f38758fa27fecfc8f99b363a95e142ad4.tar.bz2
New macro TclGetUnicodeFromObj() which can handle size_t
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index c4f7991..6af83c5 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -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;