diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2012-04-25 12:07:45 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2012-04-25 12:07:45 (GMT) |
| commit | 2d0545c937ed0e491f8e155dde41c9a62bd7dc86 (patch) | |
| tree | 9287ec35f60eeed086288278741ae7b69817beda /generic/tclRegexp.c | |
| parent | eaa02eccbd4b1111d5775d38bd135ef3425da6bb (diff) | |
| download | tcl-2d0545c937ed0e491f8e155dde41c9a62bd7dc86.zip tcl-2d0545c937ed0e491f8e155dde41c9a62bd7dc86.tar.gz tcl-2d0545c937ed0e491f8e155dde41c9a62bd7dc86.tar.bz2 | |
* generic/tclUtil.c (TclDStringToObj): Added internal function to make
the fairly-common operation of converting a DString into an Obj a more
efficient one.
Diffstat (limited to 'generic/tclRegexp.c')
| -rw-r--r-- | generic/tclRegexp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 5c5af7b..53d7153 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -947,10 +947,8 @@ CompileRegexp( */ if (TclReToGlob(NULL, string, length, &stringBuf, &exact) == TCL_OK) { - regexpPtr->globObjPtr = Tcl_NewStringObj(Tcl_DStringValue(&stringBuf), - Tcl_DStringLength(&stringBuf)); + regexpPtr->globObjPtr = TclDStringToObj(&stringBuf); Tcl_IncrRefCount(regexpPtr->globObjPtr); - Tcl_DStringFree(&stringBuf); } else { regexpPtr->globObjPtr = NULL; } |
