Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Vini, vidi, Linux! -- Unknown source


devel / comp.lang.tcl / Tcl_TraceVar() and Tcl_Save/RestoreInterpState()

SubjectAuthor
o Tcl_TraceVar() and Tcl_Save/RestoreInterpState()Ralf Fassel

1
Tcl_TraceVar() and Tcl_Save/RestoreInterpState()

<yga7czdspcm.fsf@akutech.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10271&group=comp.lang.tcl#10271

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!news.mb-net.net!open-news-network.org!news.mind.de!bolzen.all.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Tcl_TraceVar() and Tcl_Save/RestoreInterpState()
Date: Tue, 29 Nov 2022 17:22:01 +0100
Lines: 21
Message-ID: <yga7czdspcm.fsf@akutech.de>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net m8a/Ngc4FxL4Nzo1wGP+jQkEVxZGqIlYT6SAMWSHisw32OC+E=
Cancel-Lock: sha1:Wwg7AL59fkqSx94IxyfVS9YT8Uk= sha1:V1l4DoWmVQYPgIWoFEkWQ1JaVSU=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Tue, 29 Nov 2022 16:22 UTC

The manpage for Tcl_TraceVar() states

RESTRICTIONS
A trace procedure can be called at any time, even when there are par-
tially formed results stored in the interpreter. If the trace proce-
dure does anything that could damage this result (such as calling
Tcl_Eval) then it must use the Tcl_SaveInterpState and related routines
to save and restore the original state of the interpreter before it re-
turns.

Does

Tcl_GetVar2(interp, "p1", "p2", TCL_LEAVE_ERR_MSG)

in the trace procedure also count as "possible damage to the interp
result"?

I suspect as much, since if the variable is not found, "an error message
is left in interp's result if the TCL_LEAVE_ERR_MSG flag bit is set."

R'

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor