Skip to content

Commit

Permalink
fix compile with TCL_NO_DEPRECATED
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Oct 27, 2024
1 parent 3dd9722 commit af844ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
10 changes: 3 additions & 7 deletions generic/tkFrame.c
Original file line number Diff line number Diff line change
Expand Up @@ -2102,14 +2102,10 @@ TkToplevelWindowForCommand(
if (Tcl_GetCommandInfo(interp, cmdName, &cmdInfo) == 0) {
return NULL;
}
if (cmdInfo.isNativeObjectProc == 2) {
if (cmdInfo.objProc2 != FrameWidgetObjCmd) {
return NULL;
}
framePtr = (Frame *)cmdInfo.objClientData2;
} else {
framePtr = (Frame *)cmdInfo.objClientData;
if (cmdInfo.objProc2 != FrameWidgetObjCmd) {
return NULL;
}
framePtr = (Frame *)cmdInfo.objClientData2;
if (framePtr->type != TYPE_TOPLEVEL) {
return NULL;
}
Expand Down
7 changes: 1 addition & 6 deletions generic/tkText.c
Original file line number Diff line number Diff line change
Expand Up @@ -6969,12 +6969,7 @@ TkpTesttextCmd(
if (Tcl_GetCommandInfo(interp, Tcl_GetString(objv[1]), &info) == 0) {
return TCL_ERROR;
}
#if TCL_MAJOR_VERSION > 8
if (info.isNativeObjectProc == 2) {
textPtr = (TkText *)info.objClientData2;
} else
#endif
textPtr = (TkText *)info.objClientData;
textPtr = (TkText *)info.objClientData2;
len = strlen(Tcl_GetString(objv[2]));
if (strncmp(Tcl_GetString(objv[2]), "byteindex", len) == 0) {
if (objc != 5) {
Expand Down

0 comments on commit af844ab

Please sign in to comment.