diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2015-07-02 08:17:50 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2015-07-02 08:17:50 (GMT) |
| commit | c987de9d2fba29077b6c843a80e7a8d1d83df08c (patch) | |
| tree | 9b1ff6ff3db457ec452f61ebcb38c942c259dc7d /generic/tclRegexp.c | |
| parent | b185ee724b895e0a541f78285a13be727e4176c0 (diff) | |
| download | tcl-c987de9d2fba29077b6c843a80e7a8d1d83df08c.zip tcl-c987de9d2fba29077b6c843a80e7a8d1d83df08c.tar.gz tcl-c987de9d2fba29077b6c843a80e7a8d1d83df08c.tar.bz2 | |
Another round of refCount consistancy improvements.
Diffstat (limited to 'generic/tclRegexp.c')
| -rw-r--r-- | generic/tclRegexp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 5bc3aa2..ea25d4b 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -755,7 +755,7 @@ FreeRegexpInternalRep( * If this is the last reference to the regexp, free it. */ - if (--(regexpRepPtr->refCount) <= 0) { + if (regexpRepPtr->refCount-- <= 1) { FreeRegexp(regexpRepPtr); } objPtr->typePtr = NULL; @@ -976,7 +976,7 @@ CompileRegexp( if (tsdPtr->patterns[NUM_REGEXPS-1] != NULL) { TclRegexp *oldRegexpPtr = tsdPtr->regexps[NUM_REGEXPS-1]; - if (--(oldRegexpPtr->refCount) <= 0) { + if (oldRegexpPtr->refCount-- <= 1) { FreeRegexp(oldRegexpPtr); } ckfree(tsdPtr->patterns[NUM_REGEXPS-1]); @@ -1050,7 +1050,7 @@ FinalizeRegexp( for (i = 0; (i < NUM_REGEXPS) && (tsdPtr->patterns[i] != NULL); i++) { regexpPtr = tsdPtr->regexps[i]; - if (--(regexpPtr->refCount) <= 0) { + if (regexpPtr->refCount-- <= 1) { FreeRegexp(regexpPtr); } ckfree(tsdPtr->patterns[i]); |
