diff options
| -rwxr-xr-x | generic/tclArithSeries.c | 21 | ||||
| -rw-r--r-- | generic/tclTest.c | 7 | ||||
| -rw-r--r-- | generic/tclTestObj.c | 6 |
3 files changed, 26 insertions, 8 deletions
diff --git a/generic/tclArithSeries.c b/generic/tclArithSeries.c index c4c65a3..f8428e6 100755 --- a/generic/tclArithSeries.c +++ b/generic/tclArithSeries.c @@ -913,8 +913,21 @@ TclArithSeriesGetElements( } /* - * Handle ArithSeries special case - don't shimmer a series into a list - * just to reverse it. + *---------------------------------------------------------------------- + * + * TclArithSeriesObjReverse -- + * + * Reverse the order of the ArithSeries value. The arithSeriesObj is + * assumed to be a valid ArithSeries. The new Obj has the Start and End + * values appropriately swapped and the Step value sign is changed. + * + * Results: + * The result will be an ArithSeries in the reverse order. + * + * Side effects: + * The ogiginal obj will be modified and returned if it is not Shared. + * + *---------------------------------------------------------------------- */ int TclArithSeriesObjReverse( @@ -961,10 +974,6 @@ TclArithSeriesObjReverse( TclSetIntObj(stepObj, step); } - Tcl_IncrRefCount(startObj); - Tcl_IncrRefCount(endObj); - Tcl_IncrRefCount(stepObj); - if (Tcl_IsShared(arithSeriesObj) || ((arithSeriesObj->refCount > 1))) { Tcl_Obj *lenObj; diff --git a/generic/tclTest.c b/generic/tclTest.c index e701834..4bfd810 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -5765,6 +5765,9 @@ TestbytestringObjCmd( #if !defined(TCL_NO_DEPRECATED) # if defined(_MSC_VER) && !defined(NDEBUG) # pragma warning(disable:4133) +# elif defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wincompatible-pointer-types" # endif int n; /* On purpose, not Tcl_Size, in order to demonstrate what happens */ #else @@ -5783,6 +5786,10 @@ TestbytestringObjCmd( if (p == NULL) { return TCL_ERROR; } +#if !defined(TCL_NO_DEPRECATED) && defined(__clang__) +# pragma clang diagnostic pop +#endif + if (x.m != 1) { Tcl_AppendResult(interp, "Tcl_GetBytesFromObj() overwrites variable", NULL); return TCL_ERROR; diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index a669695..5271a54 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -119,8 +119,10 @@ TclObjTest_Init( Tcl_CreateObjCommand(interp, "testobj", TestobjCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "teststringobj", TeststringobjCmd, NULL, NULL); - Tcl_CreateObjCommand(interp, "testbigdata", TestbigdataCmd, - NULL, NULL); + if (sizeof(Tcl_Size) == sizeof(Tcl_WideInt)) { + Tcl_CreateObjCommand(interp, "testbigdata", TestbigdataCmd, + NULL, NULL); + } return TCL_OK; } |
