Tcl Source Code

View Ticket
Login
Ticket UUID: 1208108
Title: use Tcl_SaveInterpState
Type: Bug Version: obsolete: 8.5a3
Submitter: dgp Created on: 2005-05-24 20:30:15
Subsystem: 09. Linked C Variables Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2005-07-06 22:11:08
Resolution: Accepted Closed By: dgp
    Closed on: 2005-07-06 15:11:08
Description:
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.
User Comments: dgp added on 2005-07-06 22:11:06:
Logged In: YES 
user_id=80530


Patch applied to HEAD.

*not* safe for 8.4.

dgp added on 2005-07-06 21:56:06:

File Added - 141055: 1208108.patch

dgp added on 2005-07-06 21:56:04:
Logged In: YES 
user_id=80530


With that in mind, the attached patch
simplifies LinkTraceProc a good deal.

dgp added on 2005-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.

dkf added on 2005-05-25 16:16:45:
Logged In: YES 
user_id=79902

Sounds fair to me

Attachments: