diff options
Diffstat (limited to 'unix')
| -rw-r--r-- | unix/dltest/pkga.c | 2 | ||||
| -rw-r--r-- | unix/dltest/pkgc.c | 4 | ||||
| -rw-r--r-- | unix/dltest/pkgd.c | 4 | ||||
| -rw-r--r-- | unix/dltest/pkge.c | 2 | ||||
| -rw-r--r-- | unix/dltest/pkgooa.c | 2 | ||||
| -rw-r--r-- | unix/dltest/pkgua.c | 2 | ||||
| -rw-r--r-- | unix/tclUnixFCmd.c | 28 | ||||
| -rw-r--r-- | unix/tclUnixFile.c | 15 | ||||
| -rw-r--r-- | unix/tclXtTest.c | 2 |
9 files changed, 30 insertions, 31 deletions
diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index d21ef95..e2943e8 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -122,7 +122,7 @@ Pkga_Init( { int code; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvideEx(interp, "Pkga", "1.0", NULL); diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c index a1d9ba0..83ff2ee 100644 --- a/unix/dltest/pkgc.c +++ b/unix/dltest/pkgc.c @@ -112,7 +112,7 @@ Pkgc_Init( { int code; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvideEx(interp, "Pkgc", "1.7.2", NULL); @@ -149,7 +149,7 @@ Pkgc_SafeInit( { int code; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvideEx(interp, "Pkgc", "1.7.2", NULL); diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c index 3718dfb..7eed681 100644 --- a/unix/dltest/pkgd.c +++ b/unix/dltest/pkgd.c @@ -112,7 +112,7 @@ Pkgd_Init( { int code; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL); @@ -149,7 +149,7 @@ Pkgd_SafeInit( { int code; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL); diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c index c3380a7..336dd50 100644 --- a/unix/dltest/pkge.c +++ b/unix/dltest/pkge.c @@ -38,7 +38,7 @@ Pkge_Init( { static const char script[] = "if 44 {open non_existent}"; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } return Tcl_EvalEx(interp, script, -1, 0); diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c index a715fbc..96e505c 100644 --- a/unix/dltest/pkgooa.c +++ b/unix/dltest/pkgooa.c @@ -88,7 +88,7 @@ Pkgooa_Init( { int code; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } if (tclStubsPtr == NULL) { diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index bb2eec1..52729ca 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -199,7 +199,7 @@ Pkgua_Init( int code, cmdIndex = 0; Tcl_Command *cmdTokens; - if (Tcl_InitStubs(interp, "9.0", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 25a5901..7c2f2a4 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -1505,11 +1505,10 @@ SetGroupAttribute( Tcl_DString ds; struct group *groupPtr = NULL; const char *string; - int length; - string = TclGetStringFromObj(attributePtr, &length); + string = TclGetString(attributePtr); - native = Tcl_UtfToExternalDString(NULL, string, length, &ds); + native = Tcl_UtfToExternalDString(NULL, string, attributePtr->length, &ds); groupPtr = TclpGetGrNam(native); /* INTL: Native. */ Tcl_DStringFree(&ds); @@ -1572,11 +1571,10 @@ SetOwnerAttribute( Tcl_DString ds; struct passwd *pwPtr = NULL; const char *string; - int length; - string = TclGetStringFromObj(attributePtr, &length); + string = TclGetString(attributePtr); - native = Tcl_UtfToExternalDString(NULL, string, length, &ds); + native = Tcl_UtfToExternalDString(NULL, string, attributePtr->length, &ds); pwPtr = TclpGetPwNam(native); /* INTL: Native. */ Tcl_DStringFree(&ds); @@ -1944,9 +1942,9 @@ TclpObjNormalizePath( int nextCheckpoint) { const char *currentPathEndPosition; - int pathLen; char cur; - const char *path = TclGetStringFromObj(pathPtr, &pathLen); + const char *path = TclGetString(pathPtr); + size_t pathLen = pathPtr->length; Tcl_DString ds; const char *nativePath; #ifndef NO_REALPATH @@ -2175,15 +2173,15 @@ TclUnixOpenTemporaryFile( { Tcl_DString template, tmp; const char *string; - int len, fd; + int fd; /* * We should also check against making more then TMP_MAX of these. */ if (dirObj) { - string = TclGetStringFromObj(dirObj, &len); - Tcl_UtfToExternalDString(NULL, string, len, &template); + string = TclGetString(dirObj); + Tcl_UtfToExternalDString(NULL, string, dirObj->length, &template); } else { Tcl_DStringInit(&template); Tcl_DStringAppend(&template, DefaultTempDir(), -1); /* INTL: native */ @@ -2192,8 +2190,8 @@ TclUnixOpenTemporaryFile( TclDStringAppendLiteral(&template, "/"); if (basenameObj) { - string = TclGetStringFromObj(basenameObj, &len); - Tcl_UtfToExternalDString(NULL, string, len, &tmp); + string = TclGetString(basenameObj); + Tcl_UtfToExternalDString(NULL, string, basenameObj->length, &tmp); TclDStringAppendDString(&template, &tmp); Tcl_DStringFree(&tmp); } else { @@ -2204,8 +2202,8 @@ TclUnixOpenTemporaryFile( #ifdef HAVE_MKSTEMPS if (extensionObj) { - string = TclGetStringFromObj(extensionObj, &len); - Tcl_UtfToExternalDString(NULL, string, len, &tmp); + string = TclGetString(extensionObj); + Tcl_UtfToExternalDString(NULL, string, extensionObj->length, &tmp); TclDStringAppendDString(&template, &tmp); fd = mkstemps(Tcl_DStringValue(&template), Tcl_DStringLength(&tmp)); Tcl_DStringFree(&tmp); diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 886b5ad..5f5bfe0 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -262,14 +262,15 @@ TclpMatchInDirectory( DIR *d; Tcl_DirEntry *entryPtr; const char *dirName; - int dirLength, nativeDirLen; + size_t dirLength, nativeDirLen; int matchHidden, matchHiddenPat; Tcl_StatBuf statBuf; Tcl_DString ds; /* native encoding of dir */ Tcl_DString dsOrig; /* utf-8 encoding of dir */ Tcl_DStringInit(&dsOrig); - dirName = TclGetStringFromObj(fileNamePtr, &dirLength); + dirName = TclGetString(fileNamePtr); + dirLength = fileNamePtr->length; Tcl_DStringAppend(&dsOrig, dirName, dirLength); /* @@ -937,7 +938,6 @@ TclpObjLink( */ if (linkAction & TCL_CREATE_SYMBOLIC_LINK) { - int targetLen; Tcl_DString ds; Tcl_Obj *transPtr; @@ -951,8 +951,8 @@ TclpObjLink( if (transPtr == NULL) { return NULL; } - target = TclGetStringFromObj(transPtr, &targetLen); - target = Tcl_UtfToExternalDString(NULL, target, targetLen, &ds); + target = TclGetString(transPtr); + target = Tcl_UtfToExternalDString(NULL, target, transPtr->length, &ds); Tcl_DecrRefCount(transPtr); if (symlink(target, src) != 0) { @@ -1080,7 +1080,7 @@ TclNativeCreateNativeRep( const char *str; Tcl_DString ds; Tcl_Obj *validPathPtr; - int len; + size_t len; if (TclFSCwdIsNative()) { /* @@ -1105,7 +1105,8 @@ TclNativeCreateNativeRep( Tcl_IncrRefCount(validPathPtr); } - str = TclGetStringFromObj(validPathPtr, &len); + str = TclGetString(validPathPtr); + len = validPathPtr->length; Tcl_UtfToExternalDString(NULL, str, len, &ds); len = Tcl_DStringLength(&ds) + sizeof(char); if (strlen(Tcl_DStringValue(&ds)) < len - sizeof(char)) { diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index f7c2652..cb70b58 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -48,7 +48,7 @@ int Tclxttest_Init( Tcl_Interp *interp) /* Interpreter for application. */ { - if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) { return TCL_ERROR; } XtToolkitInitialize(); |
