diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-19 10:42:42 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-12-19 10:42:42 (GMT) |
| commit | a728d03f7d2b232dbc44f2669d8eb326b1029d3d (patch) | |
| tree | 5e462694ca52e0a37de87c6786d4028e6da22080 /generic/tclEncoding.c | |
| parent | 82903a4b1fb9b7ea432581d5c197770473c49021 (diff) | |
| parent | 89f9758279f36f87e7b7efa0c7b2358635a1ea10 (diff) | |
| download | tcl-a728d03f7d2b232dbc44f2669d8eb326b1029d3d.zip tcl-a728d03f7d2b232dbc44f2669d8eb326b1029d3d.tar.gz tcl-a728d03f7d2b232dbc44f2669d8eb326b1029d3d.tar.bz2 | |
merge novem
Diffstat (limited to 'generic/tclEncoding.c')
| -rw-r--r-- | generic/tclEncoding.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index d4b6cf1..3dd471d 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -46,7 +46,7 @@ typedef struct { * nullSize is 2, this is a function that * returns the number of bytes in a 0x0000 * terminated string. */ - int refCount; /* Number of uses of this structure. */ + size_t refCount; /* Number of uses of this structure. */ Tcl_HashEntry *hPtr; /* Hash table entry that owns this encoding. */ } Encoding; @@ -782,11 +782,7 @@ FreeEncoding( if (encodingPtr == NULL) { return; } - if (encodingPtr->refCount<=0) { - Tcl_Panic("FreeEncoding: refcount problem !!!"); - } - encodingPtr->refCount--; - if (encodingPtr->refCount == 0) { + if (encodingPtr->refCount-- <= 1) { if (encodingPtr->freeProc != NULL) { encodingPtr->freeProc(encodingPtr->clientData); } |
