diff options
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r-- | generic/tkTextIndex.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 7aebc84..faa1afd 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -40,9 +40,9 @@ static const char * StartEnd(TkText *textPtr, const char *string, static int GetIndex(Tcl_Interp *interp, TkSharedText *sharedPtr, TkText *textPtr, const char *string, TkTextIndex *indexPtr, int *canCachePtr); -static int IndexCountBytesOrdered(const TkText *textPtr, - const TkTextIndex *indexPtr1, - const TkTextIndex *indexPtr2); +static int IndexCountBytesOrdered(CONST TkText *textPtr, + CONST TkTextIndex *indexPtr1, + CONST TkTextIndex *indexPtr2); /* * The "textindex" Tcl_Obj definition: @@ -87,7 +87,7 @@ FreeTextIndexInternalRep( TkTextIndex *indexPtr = GET_TEXTINDEX(indexObjPtr); if (indexPtr->textPtr != NULL) { - if (--indexPtr->textPtr->refCount == 0) { + if (indexPtr->textPtr->refCount-- <= 1) { /* * The text widget has been deleted and we need to free it now. */ @@ -1636,9 +1636,9 @@ TkTextIndexForwChars( int TkTextIndexCountBytes( - const TkText *textPtr, - const TkTextIndex *indexPtr1, /* Index describing one location. */ - const TkTextIndex *indexPtr2) /* Index describing second location. */ + CONST TkText *textPtr, + CONST TkTextIndex *indexPtr1, /* Index describing one location. */ + CONST TkTextIndex *indexPtr2) /* Index describing second location. */ { int compare = TkTextIndexCmp(indexPtr1, indexPtr2); @@ -1653,11 +1653,11 @@ TkTextIndexCountBytes( static int IndexCountBytesOrdered( - const TkText *textPtr, - const TkTextIndex *indexPtr1, + CONST TkText *textPtr, + CONST TkTextIndex *indexPtr1, /* Index describing location of character from * which to count. */ - const TkTextIndex *indexPtr2) + CONST TkTextIndex *indexPtr2) /* Index describing location of last character * at which to stop the count. */ { |