Overview
| Artifact ID: | bb8bf741911152cccacf169e12c1aba16067b889 |
|---|---|
| Ticket: | 752814ffffffffffffffffffffffffffffffffff
Inhibit some type conversions |
| User & Date: | ysutjandra on 2003-06-11 18:54:42 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Hi, I found that regexp changes the object type to string type. I see this behavior in Tcl8.3.5 but not in Tcl8.1. The stack trace when it calls the registered function to free the old internal representation looks as follows: #1 0x9d2a4 in SetStringFromAny (interp=0x0, objPtr=0x11ebf8) at ./../generic/tclStringObj.c:1505 #2 0x9bc3c in Tcl_GetCharLength (objPtr=0x11ebf8) at ./../generic/tclStringObj.c:329 #3 0x2fab4 in Tcl_RegexpObjCmd (dummy=0x0, interp=0xfdd68, objc=2, objv=0xffdac) at ./../generic/tclCmdMZ.c:227 The question is why Tcl_GetCharLength requires changing the internal representation to string object. It should simply call Tcl_GetStringFromObj and does a strlen on the return C-string. Looking at the code tclCmdMZ.c, it has the following comment... Get the length of the string that we are matching before getting the regexp to avoid shimmering problems. -- Yohan
- foundin changed to: "final: 8.3.5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "ysutjandra"
- subsystem changed to: "43. Regexp"
- title changed to: "Regexp change Tcl_Obj type to string"
- type changed to: "RFE"