diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-08 07:54:08 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-08 07:54:08 (GMT) |
commit | 973b6e6d17b26ec027eb3b6df3b37d9da9d9f514 (patch) | |
tree | 16cd8e062060db885208ea156a7c74aa9751ee83 /win/tkWinFont.c | |
parent | 649ce6ba5bb32fc38e88fc8f4ac13359651d1d32 (diff) | |
download | tk-973b6e6d17b26ec027eb3b6df3b37d9da9d9f514.zip tk-973b6e6d17b26ec027eb3b6df3b37d9da9d9f514.tar.gz tk-973b6e6d17b26ec027eb3b6df3b37d9da9d9f514.tar.bz2 |
Use size_t in stead of int for some internal refCount variables. On 32-bit systems, this doubles the range (as size_t is unsigned), on 64-bit system much more than that.
Diffstat (limited to 'win/tkWinFont.c')
-rw-r--r-- | win/tkWinFont.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 86f63ac..9172b00 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -33,7 +33,7 @@ typedef struct FontFamily { struct FontFamily *nextPtr; /* Next in list of all known font families. */ - int refCount; /* How many SubFonts are referring to this + size_t refCount; /* How many SubFonts are referring to this * FontFamily. When the refCount drops to * zero, this FontFamily may be freed. */ /* @@ -1869,8 +1869,7 @@ FreeFontFamily( if (familyPtr == NULL) { return; } - familyPtr->refCount--; - if (familyPtr->refCount > 0) { + if (familyPtr->refCount-- > 1) { return; } for (i = 0; i < FONTMAP_PAGES; i++) { |