Skip to content

Commit

Permalink
Change textPtr parameter of TkTextGetTabs to a "const"
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Feb 2, 2024
1 parent 8f813a4 commit 1453df7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion generic/tkText.c
Original file line number Diff line number Diff line change
Expand Up @@ -4496,7 +4496,7 @@ TextSearchFoundMatch(
TkTextTabArray *
TkTextGetTabs(
Tcl_Interp *interp, /* Used for error reporting. */
TkText *textPtr, /* Information about the text widget. */
const TkText *textPtr, /* Information about the text widget. */
Tcl_Obj *stringPtr) /* Description of the tab stops. See the text
* manual entry for details. */
{
Expand Down
2 changes: 1 addition & 1 deletion generic/tkText.h
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ MODULE_SCOPE int TkTextSharedGetObjIndex(Tcl_Interp *interp,
MODULE_SCOPE const TkTextIndex *TkTextGetIndexFromObj(Tcl_Interp *interp,
TkText *textPtr, Tcl_Obj *objPtr);
MODULE_SCOPE TkTextTabArray *TkTextGetTabs(Tcl_Interp *interp,
TkText *textPtr, Tcl_Obj *stringPtr);
const TkText *textPtr, Tcl_Obj *stringPtr);
MODULE_SCOPE void TkTextFindDisplayLineEnd(TkText *textPtr,
TkTextIndex *indexPtr, int end, int *xOffset);
MODULE_SCOPE void TkTextIndexBackChars(const TkText *textPtr,
Expand Down
12 changes: 6 additions & 6 deletions generic/tkTextDisp.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ static DLine * FindDLine(TkText *textPtr, DLine *dlPtr,
static void FreeDLines(TkText *textPtr, DLine *firstPtr,
DLine *lastPtr, int action);
static void FreeStyle(TkText *textPtr, TextStyle *stylePtr);
static TextStyle * GetStyle(TkText *textPtr, const TkTextIndex *indexPtr);
static void GetXView(Tcl_Interp *interp, TkText *textPtr,
static TextStyle * GetStyle(const TkText *textPtr, const TkTextIndex *indexPtr);
static void GetXView(Tcl_Interp *interp, const TkText *textPtr,
int report);
static void GetYView(Tcl_Interp *interp, TkText *textPtr,
int report);
Expand Down Expand Up @@ -621,7 +621,7 @@ static int TextGetScrollInfoObj(Tcl_Interp *interp,
static void AsyncUpdateLineMetrics(void *clientData);
static void GenerateWidgetViewSyncEvent(TkText *textPtr, Bool InSync);
static void AsyncUpdateYScrollbar(void *clientData);
static int IsStartOfNotMergedLine(TkText *textPtr,
static int IsStartOfNotMergedLine(const TkText *textPtr,
const TkTextIndex *indexPtr);

/*
Expand Down Expand Up @@ -766,7 +766,7 @@ TkTextFreeDInfo(

static TextStyle *
GetStyle(
TkText *textPtr, /* Overall information about text widget. */
const TkText *textPtr, /* Overall information about text widget. */
const TkTextIndex *indexPtr)/* The character in the text for which display
* information is wanted. */
{
Expand Down Expand Up @@ -6496,7 +6496,7 @@ GetXView(
Tcl_Interp *interp, /* If "report" is FALSE, string describing
* visible range gets stored in the interp's
* result. */
TkText *textPtr, /* Information about text widget. */
const TkText *textPtr, /* Information about text widget. */
int report) /* Non-zero means report info to scrollbar if
* it has changed. */
{
Expand Down Expand Up @@ -7005,7 +7005,7 @@ FindDLine(

static int
IsStartOfNotMergedLine(
TkText *textPtr, /* Widget record for text widget. */
const TkText *textPtr, /* Widget record for text widget. */
const TkTextIndex *indexPtr) /* Index to check. */
{
TkTextIndex indexPtr2;
Expand Down

0 comments on commit 1453df7

Please sign in to comment.