Overview
| Artifact ID: | 0bcbb432e7c88e12edd41d45b78fc1c09ca7882b |
|---|---|
| Ticket: | 813056ffffffffffffffffffffffffffffffffff
Tcl_GetIndexFromObjStruct doesn't reset result before error |
| User & Date: | muonics on 2003-09-26 13:26:28 |
Changes
- assignee changed to: "nijtmans"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl_GetIndexFromObjStruct doesn't reset prior result information in the interpreter when generating its so-called (in the comments) "fancy error message". This means that if you've done something that has set a result before calling it or Tcl_GetIndexFromObj (including calling Tcl_GetIndexFromObj multiple times with multiple errors) you get bogus error messages. In the particular case I noticed this, I have an ObjCmd that separates out certain option arguments that it wants and delegates the remaining options to another ObjCmd. Here I use the TCL_ERROR vs. TCL_OK result to determine whether an option was matched within the set that the first function wants. It's a little more maintainable this way (though perhaps slower with all those error messages being generated) to have the first function only know about the small subset of options that it wants. At any rate, I noticed that when feeding the command a bunch of options where one wasn't recognized by either generated an error message with repeated error messages and other result bits. See below for suggested patch.
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "muonics"
- subsystem changed to: "13. Index Object"
- title changed to:
Tcl_GetIndexFromObjStruct doesn't reset result before error
- type changed to: "Bug"