diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 17 | ||||
-rw-r--r-- | generic/tclCompCmdsSZ.c | 12 | ||||
-rw-r--r-- | macosx/Tcl.xcode/project.pbxproj | 2 | ||||
-rw-r--r-- | macosx/Tcl.xcodeproj/project.pbxproj | 2 |
5 files changed, 14 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml index 947e858..e186e26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -128,7 +128,6 @@ matrix: - NO_DIRECT_TEST=1 before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm get stable; fi - export ERROR_ON_FAILURES=1 - cd ${BUILD_DIR} install: diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 8ced786..6a7a30b 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -2607,7 +2607,7 @@ Tcl_LpopObjCmd( * First, extract the element to be returned. * TclLindexFlat adds a ref count which is handled. */ - + if (objc == 2) { elemPtr = elemPtrs[listLen - 1]; Tcl_IncrRefCount(elemPtr); @@ -2640,7 +2640,7 @@ Tcl_LpopObjCmd( return TCL_ERROR; } } - + listPtr = Tcl_ObjSetVar2(interp, objv[1], NULL, listPtr, TCL_LEAVE_ERR_MSG); if (listPtr == NULL) { return TCL_ERROR; @@ -3242,11 +3242,10 @@ Tcl_LsearchObjCmd( for (j=0 ; j<sortInfo.indexc ; j++) { int encoded = 0; if (TclIndexEncode(interp, indices[j], TCL_INDEX_BEFORE, - TCL_INDEX_AFTER, &encoded) != TCL_OK) { + TCL_INDEX_BEFORE, &encoded) != TCL_OK) { result = TCL_ERROR; } - if ((encoded == TCL_INDEX_BEFORE) - || (encoded == TCL_INDEX_AFTER)) { + if (encoded == TCL_INDEX_BEFORE) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "index \"%s\" cannot select an element " "from any list", Tcl_GetString(indices[j]))); @@ -3961,10 +3960,9 @@ Tcl_LsortObjCmd( for (j=0 ; j<indexc ; j++) { int encoded = 0; int result = TclIndexEncode(interp, indexv[j], - TCL_INDEX_BEFORE, TCL_INDEX_AFTER, &encoded); + TCL_INDEX_BEFORE, TCL_INDEX_BEFORE, &encoded); - if ((result == TCL_OK) && ((encoded == TCL_INDEX_BEFORE) - || (encoded == TCL_INDEX_AFTER))) { + if ((result == TCL_OK) && (encoded == TCL_INDEX_BEFORE)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "index \"%s\" cannot select an element " "from any list", Tcl_GetString(indexv[j]))); @@ -4053,7 +4051,8 @@ Tcl_LsortObjCmd( } for (j=0 ; j<sortInfo.indexc ; j++) { /* Prescreened values, no errors or out of range possible */ - TclIndexEncode(NULL, indexv[j], 0, 0, &sortInfo.indexv[j]); + TclIndexEncode(NULL, indexv[j], TCL_INDEX_BEFORE, + TCL_INDEX_BEFORE, &sortInfo.indexv[j]); } } diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 08b523c..5af9081 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -1021,7 +1021,7 @@ TclCompileStringReplaceCmd( * Check for first index known and useful at compile time. */ tokenPtr = TokenAfter(valueTokenPtr); - if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER, + if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_AFTER, &first) != TCL_OK) { goto genericReplace; } @@ -1030,7 +1030,7 @@ TclCompileStringReplaceCmd( * Check for last index known and useful at compile time. */ tokenPtr = TokenAfter(tokenPtr); - if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER, + if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_END, &last) != TCL_OK) { goto genericReplace; } @@ -1126,7 +1126,7 @@ TclCompileStringReplaceCmd( * though, interfere with getting a guarantee that first <= last. */ - if ((first == TCL_INDEX_BEFORE) && (last >= TCL_INDEX_START)) { + if ((first == TCL_INDEX_START) && (last >= TCL_INDEX_START)) { /* empty prefix */ tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, 4); @@ -1157,10 +1157,10 @@ TclCompileStringReplaceCmd( * are harmless when they are replaced by another empty string. */ - if ((first == TCL_INDEX_BEFORE) || (first == TCL_INDEX_START)) { + if (first == TCL_INDEX_START) { /* empty prefix - build suffix only */ - if ((last == TCL_INDEX_END) || (last == TCL_INDEX_AFTER)) { + if (last == TCL_INDEX_END) { /* empty suffix too => empty result */ OP( POP); /* Pop original */ PUSH ( ""); @@ -1169,7 +1169,7 @@ TclCompileStringReplaceCmd( OP44( STR_RANGE_IMM, last + 1, TCL_INDEX_END); return TCL_OK; } else { - if ((last == TCL_INDEX_END) || (last == TCL_INDEX_AFTER)) { + if (last == TCL_INDEX_END) { /* empty suffix - build prefix only */ OP44( STR_RANGE_IMM, 0, first-1); return TCL_OK; diff --git a/macosx/Tcl.xcode/project.pbxproj b/macosx/Tcl.xcode/project.pbxproj index c52bfce..d06a1a8 100644 --- a/macosx/Tcl.xcode/project.pbxproj +++ b/macosx/Tcl.xcode/project.pbxproj @@ -870,7 +870,6 @@ F96D449608F272BA004A47F5 /* tclWinSock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinSock.c; sourceTree = "<group>"; }; F96D449708F272BA004A47F5 /* tclWinTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTest.c; sourceTree = "<group>"; }; F96D449808F272BA004A47F5 /* tclWinThrd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinThrd.c; sourceTree = "<group>"; }; - F96D449908F272BA004A47F5 /* tclWinThrd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclWinThrd.h; sourceTree = "<group>"; }; F96D449A08F272BA004A47F5 /* tclWinTime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTime.c; sourceTree = "<group>"; }; F974D56C0FBE7D6300BF728B /* http11.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http11.test; sourceTree = "<group>"; }; F974D56D0FBE7D6300BF728B /* httpd11.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd11.tcl; sourceTree = "<group>"; }; @@ -1782,7 +1781,6 @@ F96D449608F272BA004A47F5 /* tclWinSock.c */, F96D449708F272BA004A47F5 /* tclWinTest.c */, F96D449808F272BA004A47F5 /* tclWinThrd.c */, - F96D449908F272BA004A47F5 /* tclWinThrd.h */, F96D449A08F272BA004A47F5 /* tclWinTime.c */, ); path = win; diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj index e0e424c..928d231 100644 --- a/macosx/Tcl.xcodeproj/project.pbxproj +++ b/macosx/Tcl.xcodeproj/project.pbxproj @@ -871,7 +871,6 @@ F96D449608F272BA004A47F5 /* tclWinSock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinSock.c; sourceTree = "<group>"; }; F96D449708F272BA004A47F5 /* tclWinTest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTest.c; sourceTree = "<group>"; }; F96D449808F272BA004A47F5 /* tclWinThrd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinThrd.c; sourceTree = "<group>"; }; - F96D449908F272BA004A47F5 /* tclWinThrd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tclWinThrd.h; sourceTree = "<group>"; }; F96D449A08F272BA004A47F5 /* tclWinTime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclWinTime.c; sourceTree = "<group>"; }; F974D56C0FBE7D6300BF728B /* http11.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = http11.test; sourceTree = "<group>"; }; F974D56D0FBE7D6300BF728B /* httpd11.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = httpd11.tcl; sourceTree = "<group>"; }; @@ -1783,7 +1782,6 @@ F96D449608F272BA004A47F5 /* tclWinSock.c */, F96D449708F272BA004A47F5 /* tclWinTest.c */, F96D449808F272BA004A47F5 /* tclWinThrd.c */, - F96D449908F272BA004A47F5 /* tclWinThrd.h */, F96D449A08F272BA004A47F5 /* tclWinTime.c */, ); path = win; |