diff options
author | stanton <stanton> | 1999-05-13 01:50:31 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-05-13 01:50:31 (GMT) |
commit | 9525d9226567d4bcd1134ce0376e04dbe531bf6f (patch) | |
tree | 2ed4e906d3b8d7624d3d173ae41938257d15e24f /generic/tclBasic.c | |
parent | 1fcc7feac69c4ccee7495f17ab908e53e09c4e0e (diff) | |
download | tcl-9525d9226567d4bcd1134ce0376e04dbe531bf6f.zip tcl-9525d9226567d4bcd1134ce0376e04dbe531bf6f.tar.gz tcl-9525d9226567d4bcd1134ce0376e04dbe531bf6f.tar.bz2 |
* tests/regexp.test:
* generic/tclInt.h:
* generic/tclBasic.c:
* generic/tclRegexp.h:
* generic/tclRegexp.c: Replaced the per-interpreter regexp cache
with a per-thread cache. Changed the Regexp object to take
advantage of this extra cache. Added a reference count to the
TclRegexp type so regexps can be shared by multiple objects.
Removed the per-interp regexp cache from the interpreter. Now
regexps can be used with no need for an interpreter. [Bug: 1063]
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index e673a3c..10d8311 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.19 1999/04/16 00:46:42 stanton Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.20 1999/05/13 01:50:32 stanton Exp $ */ #include "tclInt.h" @@ -323,11 +323,6 @@ Tcl_CreateInterp() iPtr->appendAvl = 0; iPtr->appendUsed = 0; - for (i = 0; i < NUM_REGEXPS; i++) { - iPtr->patterns[i] = NULL; - iPtr->patLengths[i] = -1; - iPtr->regexps[i] = NULL; - } Tcl_InitHashTable(&iPtr->packageTable, TCL_STRING_KEYS); iPtr->packageUnknown = NULL; iPtr->cmdCount = 0; @@ -923,7 +918,6 @@ DeleteInterpProc(interp) Tcl_HashSearch search; Tcl_HashTable *hTablePtr; ResolverScheme *resPtr, *nextResPtr; - int i; /* * Punt if there is an error in the Tcl_Release/Tcl_Preserve matchup. @@ -1039,14 +1033,6 @@ DeleteInterpProc(interp) ckfree(iPtr->appendResult); iPtr->appendResult = NULL; } - for (i = 0; i < NUM_REGEXPS; i++) { - if (iPtr->patterns[i] == NULL) { - break; - } - ckfree(iPtr->patterns[i]); - ckfree((char *) iPtr->regexps[i]); - iPtr->regexps[i] = NULL; - } TclFreePackageInfo(iPtr); while (iPtr->tracePtr != NULL) { Trace *nextPtr = iPtr->tracePtr->nextPtr; |