Skip to content
Tcl Source Code View Ticket
Login

View Ticket

TclFindCompiledLocal() header comments are false

Open81ebe684b4a9d6ba82561ea8c276670ca27f502fCreated 2 years agoUpdated 1 year ago
Descriptionplain2025-05-30 17:46:24
The header comments say

"If the variable's name is NULL, a new temporary variable is always created."

If this were true, then callers of the wrapper macro AnonymousLocal()
would never have to check for a TCL_INDEX_NONE return value.

But it is not true.  There are pathways through TclFindCompiledLocal()
that lead to a return of TCL_INDEX_NONE.

We need to get the story straight.
dgpplain2025-05-30 17:46:59
FWIW, the comment was true in Tcl 8.5.
dgp Ticket [81ebe684b4]: 3 changes [History diff]2025-06-13 14:08:55
Log in (anonymous is fine) to add a comment.