diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-11-08 09:16:05 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-11-08 09:16:05 (GMT) |
commit | c8a3f6f325bfd89ded61d6b1c9d88bdb012e90b1 (patch) | |
tree | 3bee26ae4398540bd6a1e0fd875f1d4a1f8f9c1e | |
parent | febf16788baf39f348938e62776f7e3b60edfde6 (diff) | |
download | tk-c8a3f6f325bfd89ded61d6b1c9d88bdb012e90b1.zip tk-c8a3f6f325bfd89ded61d6b1c9d88bdb012e90b1.tar.gz tk-c8a3f6f325bfd89ded61d6b1c9d88bdb012e90b1.tar.bz2 |
Since fontCache is the first field of struct TkFontInfo, make the code somewhat better readable. But actually it's no change at all.bug_f214b8
This is my only review comment! Good work!
-rw-r--r-- | generic/tkFont.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index 27cd4af..cbc4cf4 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -1094,7 +1094,7 @@ Tk_AllocFontFromObj( NamedFont *nfPtr; if (objPtr->typePtr != &tkFontObjType - || objPtr->internalRep.twoPtrValue.ptr2 != &fiPtr->fontCache) { + || objPtr->internalRep.twoPtrValue.ptr2 != fiPtr) { SetFontFromAny(interp, objPtr); } @@ -1134,7 +1134,7 @@ Tk_AllocFontFromObj( fontPtr->resourceRefCount++; fontPtr->objRefCount++; objPtr->internalRep.twoPtrValue.ptr1 = fontPtr; - objPtr->internalRep.twoPtrValue.ptr2 = &fiPtr->fontCache; + objPtr->internalRep.twoPtrValue.ptr2 = fiPtr; return (Tk_Font) fontPtr; } } @@ -1245,7 +1245,7 @@ Tk_AllocFontFromObj( } objPtr->internalRep.twoPtrValue.ptr1 = fontPtr; - objPtr->internalRep.twoPtrValue.ptr2 = &fiPtr->fontCache; + objPtr->internalRep.twoPtrValue.ptr2 = fiPtr; return (Tk_Font) fontPtr; } @@ -1279,7 +1279,7 @@ Tk_GetFontFromObj( Tcl_HashEntry *hashPtr; if (objPtr->typePtr != &tkFontObjType - || objPtr->internalRep.twoPtrValue.ptr2 != &fiPtr->fontCache) { + || objPtr->internalRep.twoPtrValue.ptr2 != fiPtr) { SetFontFromAny(NULL, objPtr); } @@ -1315,7 +1315,7 @@ Tk_GetFontFromObj( if (Tk_Screen(tkwin) == fontPtr->screen) { fontPtr->objRefCount++; objPtr->internalRep.twoPtrValue.ptr1 = fontPtr; - objPtr->internalRep.twoPtrValue.ptr2 = &fiPtr->fontCache; + objPtr->internalRep.twoPtrValue.ptr2 = fiPtr; return (Tk_Font) fontPtr; } } |