Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-07-18
20:38 • Closed ticket [582532ffff]: delete trace doesn't pass FQ name plus 7 oth... artifact: 241d6d4b5e user: msofer
2002-07-16
22:36 • New ticket [582532ffff]. artifact: adbb51cdc9 user: dgp

delete trace doesn't pass FQ name

Closed / Fixed582532ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-07-16 22:36:57
% proc print args {puts $args}
% namespace eval ns {proc foo {} {}}
% trace add command ns::foo delete print
% namespace delete ns
foo {} delete

Note that the command deleted is reported
as "foo" instead of ::ns::foo .  Imagine deleting
a top level namespace and tracing deletion
of many commands in many child namespaces.
This is not sufficient.

The problem traces to CallCommandTraces()
which uses Tcl_GetCommandName() to get
the name to pass when oldName is NULL.
It ought to call Tcl_GetCommandFullName()
instead.
msoferplain2002-07-18 20:38:52
Logged In: YES 
user_id=148712

Now calling Tcl_GetCommandFullName() as suggested.
Log in (anonymous is fine) to add a comment.