summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-01 20:36:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-01 20:36:01 (GMT)
commiteee14742522aed25744851879c80a96134de7369 (patch)
tree5650ddb981ce76c5b4348123db6def9c4be1aa68 /unix
parenta6ecb97fa5846d7930c9649f008c490d06e8b054 (diff)
parent3106f9a6955f9df9de5df5879319b6e4393ab702 (diff)
downloadtcl-eee14742522aed25744851879c80a96134de7369.zip
tcl-eee14742522aed25744851879c80a96134de7369.tar.gz
tcl-eee14742522aed25744851879c80a96134de7369.tar.bz2
Another (big) round of int -> size_t enhancements. So Tcl can handle string >2GiB in more places.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclLoadDl.c4
-rw-r--r--unix/tclLoadDyld.c2
-rw-r--r--unix/tclLoadNext.c2
-rw-r--r--unix/tclLoadOSF.c2
-rw-r--r--unix/tclLoadShl.c2
-rw-r--r--unix/tclUnixChan.c4
-rw-r--r--unix/tclUnixPipe.c4
-rw-r--r--unix/tclUnixSock.c3
8 files changed, 12 insertions, 11 deletions
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index 88854da..8a801c9 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -106,7 +106,7 @@ TclpDlopen(
*/
Tcl_DString ds;
- const char *fileName = Tcl_GetString(pathPtr);
+ const char *fileName = TclGetString(pathPtr);
native = Tcl_UtfToExternalDString(NULL, fileName, -1, &ds);
/*
@@ -127,7 +127,7 @@ TclpDlopen(
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"couldn't load file \"%s\": %s",
- Tcl_GetString(pathPtr), errorStr));
+ TclGetString(pathPtr), errorStr));
}
return TCL_ERROR;
}
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index d1701da..af24841 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -184,7 +184,7 @@ TclpDlopen(
*/
nativePath = Tcl_FSGetNativePath(pathPtr);
- nativeFileName = Tcl_UtfToExternalDString(NULL, Tcl_GetString(pathPtr),
+ nativeFileName = Tcl_UtfToExternalDString(NULL, TclGetString(pathPtr),
-1, &ds);
#if TCL_DYLD_USE_DLFCN
diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c
index 58657c8..393bfc5 100644
--- a/unix/tclLoadNext.c
+++ b/unix/tclLoadNext.c
@@ -61,7 +61,7 @@ TclpDlopen(
NXStream *errorStream = NXOpenMemory(0,0,NX_READWRITE);
- fileName = Tcl_GetString(pathPtr);
+ fileName = TclGetString(pathPtr);
/*
* First try the full path the user gave us. This is particularly
diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c
index 6a06b3e..f67725f 100644
--- a/unix/tclLoadOSF.c
+++ b/unix/tclLoadOSF.c
@@ -79,7 +79,7 @@ TclpDlopen(
Tcl_LoadHandle newHandle;
ldr_module_t lm;
char *pkg;
- char *fileName = Tcl_GetString(pathPtr);
+ char *fileName = TclGetString(pathPtr);
const char *native;
/*
diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c
index a849ac6..fc5f27c 100644
--- a/unix/tclLoadShl.c
+++ b/unix/tclLoadShl.c
@@ -57,7 +57,7 @@ TclpDlopen(
shl_t handle;
Tcl_LoadHandle newHandle;
const char *native;
- char *fileName = Tcl_GetString(pathPtr);
+ char *fileName = TclGetString(pathPtr);
/*
* The flags below used to be BIND_IMMEDIATE; they were changed at the
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 04bb28c..1dd2340 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -579,7 +579,7 @@ TtySetOptionProc(
const char *value) /* New value for option. */
{
FileState *fsPtr = instanceData;
- unsigned int len, vlen;
+ size_t len, vlen;
TtyAttrs tty;
int argc;
const char **argv;
@@ -806,7 +806,7 @@ TtyGetOptionProc(
Tcl_DString *dsPtr) /* Where to store value(s). */
{
FileState *fsPtr = instanceData;
- unsigned int len;
+ size_t len;
char buf[3*TCL_INTEGER_SPACE + 16];
int valid = 0; /* Flag if valid option parsed. */
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index c42dfa7..0623648 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -524,7 +524,7 @@ TclpCreateProcess(
errPipeOut = NULL;
fd = GetFd(errPipeIn);
- count = read(fd, errSpace, (size_t) (sizeof(errSpace) - 1));
+ count = read(fd, errSpace, sizeof(errSpace) - 1);
if (count > 0) {
char *end;
@@ -1274,7 +1274,7 @@ Tcl_PidObjCmd(
* Get the channel and make sure that it refers to a pipe.
*/
- chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL);
+ chan = Tcl_GetChannel(interp, TclGetString(objv[1]), NULL);
if (chan == NULL) {
return TCL_ERROR;
}
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 23ef1ba..d53b3de 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -313,7 +313,8 @@ InitializeHostName(
const char *
Tcl_GetHostName(void)
{
- return Tcl_GetString(TclGetProcessGlobalValue(&hostName));
+ Tcl_Obj *tclObj = TclGetProcessGlobalValue(&hostName);
+ return TclGetString(tclObj);
}
/*