diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-13 09:57:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-13 09:57:07 (GMT) |
commit | 4a1828d3e7f328cce5d6b770ffbb6ea5a5373d0c (patch) | |
tree | ee4d9a63fa953072901b6d76880e60f81266dd78 /generic/tkImgBmap.c | |
parent | 58dee83cb742162ddda8b91eb7a8132aebaa68b4 (diff) | |
download | tk-4a1828d3e7f328cce5d6b770ffbb6ea5a5373d0c.zip tk-4a1828d3e7f328cce5d6b770ffbb6ea5a5373d0c.tar.gz tk-4a1828d3e7f328cce5d6b770ffbb6ea5a5373d0c.tar.bz2 |
Make tk.h work unchanged with Tcl 9.0 (novem), account for possible missing TCL_STORAGE_CLASS definition. More internal use of size_t in stead of int.
Diffstat (limited to 'generic/tkImgBmap.c')
-rw-r--r-- | generic/tkImgBmap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index 0906673..1a9a86e 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -49,7 +49,7 @@ typedef struct BitmapMaster { */ typedef struct BitmapInstance { - int refCount; /* Number of instances that share this data + size_t refCount; /* Number of instances that share this data * structure. */ BitmapMaster *masterPtr; /* Pointer to master for image. */ Tk_Window tkwin; /* Window in which the instances will be @@ -951,8 +951,7 @@ ImgBmapFree( BitmapInstance *instancePtr = clientData; BitmapInstance *prevPtr; - instancePtr->refCount--; - if (instancePtr->refCount > 0) { + if (instancePtr->refCount-- > 1) { return; } |