Tcl Library Source Code

View Ticket
Login
Ticket UUID: 446562
Title: profiler: uplevel breaks for rare case
Type: Bug Version: None
Submitter: hemanglavana Created on: 2001-07-31 21:18:12
Subsystem: profiler Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-08-01 06:48:32
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2001-07-31 23:48:32
Description:
The profiler breaks if a user defines  a proc with spaces in its name or if the name
begins with # or a digit.

The following patch will resolve this problem:

godel> cvs diff profiler.tcl
Index: profiler.tcl
=============================================
RCS file: /cvsroot/tcllib/tcllib/modules/profiler/profiler.tcl,v
retrieving revision 1.14
diff -r1.14 profiler.tcl
138c138
< set CODE [uplevel ${name}ORIG $args]
---
> set CODE [uplevel 1 [list ${name}ORIG] $args]

The list command is used to take care of procnames with spaces in it.
The "uplevel 1 ..." ensures that procnames begining with # or a digit
are not construed as the level argument to uplevel.

Hemang.
User Comments: andreas_kupries added on 2001-08-01 06:48:32:
Logged In: YES 
user_id=75003

Comitted the patch.