summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-12-01 13:16:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-12-01 13:16:13 (GMT)
commitbc8d7fce5349b6e960b9fa24034e86c4363ed025 (patch)
treeda525d1491c638f159060278381fc13debcbc62a /generic
parent637521743a9b17f73583047bc235860226de6bee (diff)
downloadtk-bc8d7fce5349b6e960b9fa24034e86c4363ed025.zip
tk-bc8d7fce5349b6e960b9fa24034e86c4363ed025.tar.gz
tk-bc8d7fce5349b6e960b9fa24034e86c4363ed025.tar.bz2
Possible addendum to [5e4e44a93b]: Always canonicalize any abbreviations for -anchor, -relief, -justify or other string tables.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkConfig.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 78a23cc..4ea0d32 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -760,6 +760,10 @@ DoObjConfig(
optionPtr->specPtr->optionName+1, (nullOK ? TCL_NULL_OK : 0), &newValue) != TCL_OK) {
return TCL_ERROR;
}
+ if (slotPtrPtr != NULL && valuePtr != NULL) {
+ valuePtr = Tcl_DuplicateObj(valuePtr);
+ Tcl_InvalidateStringRep(valuePtr);
+ }
}
if (internalPtr != NULL) {
if (optionPtr->specPtr->flags & TYPE_MASK) {
@@ -883,6 +887,10 @@ DoObjConfig(
*((int *) oldInternalPtr) = *((int *) internalPtr);
*((int *) internalPtr) = newRelief;
}
+ if (slotPtrPtr != NULL && valuePtr != NULL) {
+ valuePtr = Tcl_DuplicateObj(valuePtr);
+ Tcl_InvalidateStringRep(valuePtr);
+ }
break;
}
case TK_OPTION_CURSOR: {
@@ -918,6 +926,10 @@ DoObjConfig(
*((Tk_Justify *) oldInternalPtr) = *((Tk_Justify *) internalPtr);
*((Tk_Justify *) internalPtr) = (Tk_Justify)newJustify;
}
+ if (slotPtrPtr != NULL && valuePtr != NULL) {
+ valuePtr = Tcl_DuplicateObj(valuePtr);
+ Tcl_InvalidateStringRep(valuePtr);
+ }
break;
}
case TK_OPTION_ANCHOR: {
@@ -934,6 +946,10 @@ DoObjConfig(
*((Tk_Anchor *) oldInternalPtr) = *((Tk_Anchor *) internalPtr);
*((Tk_Anchor *) internalPtr) = (Tk_Anchor)newAnchor;
}
+ if (slotPtrPtr != NULL && valuePtr != NULL) {
+ valuePtr = Tcl_DuplicateObj(valuePtr);
+ Tcl_InvalidateStringRep(valuePtr);
+ }
break;
}
case TK_OPTION_PIXELS: {