From 94a77ec467d4d7a9d99c233691fd0b57185a3f31 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 6 Feb 2024 21:07:02 +0000 Subject: Modify TkTextGetTabs() signature: textPtr -> tkwin --- generic/tkText.c | 8 ++++---- generic/tkText.h | 2 +- generic/tkTextTag.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generic/tkText.c b/generic/tkText.c index cde36e4..a6142ed 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -2227,7 +2227,7 @@ ConfigureText( textPtr->tabArrayPtr = NULL; } if (textPtr->tabOptionPtr != NULL) { - textPtr->tabArrayPtr = TkTextGetTabs(interp, textPtr, + textPtr->tabArrayPtr = TkTextGetTabs(interp, textPtr->tkwin, textPtr->tabOptionPtr); if (textPtr->tabArrayPtr == NULL) { Tcl_AddErrorInfo(interp,"\n (while processing -tabs option)"); @@ -4483,7 +4483,7 @@ TextSearchFoundMatch( TkTextTabArray * TkTextGetTabs( Tcl_Interp *interp, /* Used for error reporting. */ - const TkText *textPtr, /* Information about the text widget. */ + Tk_Window tkwin, /* Information about the window. */ Tcl_Obj *stringPtr) /* Description of the tab stops. See the text * manual entry for details. */ { @@ -4534,7 +4534,7 @@ TkTextGetTabs( * downwards, to find the right integer pixel position. */ - if (Tk_GetPixelsFromObj(interp, textPtr->tkwin, objv[i], + if (Tk_GetPixelsFromObj(interp, tkwin, objv[i], &tabPtr->location) != TCL_OK) { goto error; } @@ -4548,7 +4548,7 @@ TkTextGetTabs( } prevStop = lastStop; - if (Tk_GetDoublePixelsFromObj(interp, textPtr->tkwin, objv[i], + if (Tk_GetDoublePixelsFromObj(interp, tkwin, objv[i], &lastStop) != TCL_OK) { goto error; } diff --git a/generic/tkText.h b/generic/tkText.h index 18a6cce..22f1b53 100644 --- a/generic/tkText.h +++ b/generic/tkText.h @@ -1133,7 +1133,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, - const TkText *textPtr, Tcl_Obj *stringPtr); + Tk_Window tkwin, Tcl_Obj *stringPtr); MODULE_SCOPE void TkTextFindDisplayLineEnd(TkText *textPtr, TkTextIndex *indexPtr, int end, int *xOffset); MODULE_SCOPE void TkTextIndexBackChars(const TkText *textPtr, diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index e232f85..541fc74 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -387,7 +387,7 @@ TkTextTagCmd( } if (tagPtr->tabStringPtr != NULL) { tagPtr->tabArrayPtr = - TkTextGetTabs(interp, textPtr, tagPtr->tabStringPtr); + TkTextGetTabs(interp, textPtr->tkwin, tagPtr->tabStringPtr); if (tagPtr->tabArrayPtr == NULL) { return TCL_ERROR; } -- cgit v0.12