Skip to content
Tcl Source Code View Ticket
Login

View Ticket

use Tcl_SaveInterpState

Closed / Accepted1208108fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 21 years ago
Descriptionplain2005-05-24 20:30:15
When LinkTraceProc handles
write traces, it calls on
various Tcl_GetFooFromObj()
routines to check the "type"
of the written value, against 
the link type.  The "interp" is
passed to these calls to capture
error messages.

When there's no error, the impact
on the interp isn't supposed to
be perceived, and LinkTraceProc
saves and restores the interp result
to achieve this.

The interp result is only a part
of the interpreter state.  The
new routines
Tcl_(Save|Restore)InterpState
would be better tools to completely
achieve this task.
dkfplain2005-05-25 16:16:45
Logged In: YES 
user_id=79902

Sounds fair to me
dgpplain2005-07-06 21:44:39
Logged In: YES 
user_id=80530


I think I misread this one.

LinkTraceProc() is a
Tcl_VarTraceProc.  It gets
called only by TclCallVarTraces,
which does its own save/restore
of the interp state, precisely so
each trace routine doesn't have to.
dgpplain2005-07-06 21:56:04
Logged In: YES 
user_id=80530


With that in mind, the attached patch
simplifies LinkTraceProc a good deal.
dgpplain2005-07-06 21:56:06
File Added - 141055: 1208108.patch
dgp Closed ticket [1208108fff]. [History diff]2005-07-06 22:11:05
dgpplain2005-07-06 22:11:06
Logged In: YES 
user_id=80530


Patch applied to HEAD.

*not* safe for 8.4.
dgp Ticket [1208108fff]: 2 changes [History diff]2005-07-06 22:11:08
Log in (anonymous is fine) to add a comment.

Attachments: