Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-12-20
04:10 • Closed ticket [1854399fff]: compiled switch -regexp -- is broken plus 7 o... artifact: 143628e389 user: hobbs
2007-12-19
20:35 • New ticket [1854399fff]. artifact: 735b164fc1 user: dgp

compiled [switch -regexp --] is broken

Closed / Fixed1854399fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2007-12-19 20:35:47
% proc try {} {
switch -regex -- 0 {
{[0-9]+} {return true}
default {return false}
}
}
% try
false
% proc try2 {} {
set switch switch
$switch -regexp -- 0 {
{[0-9]+} {return true}
default {return false}
}
}
% try2
true
% proc try3 {} {
switch -regexp 0 {
{[0-9]+} {return true}
default {return false}
}
}
% try3
true

This breaks the struct
package in tcllib pretty bad.
hobbsplain2007-12-20 04:10:03
Logged In: YES 
user_id=72656
Originator: NO

* generic/tclCompCmds.c (TclCompileSwitchCmd):update switch -regexp
* tests/switch.test-14.*:compilation to pass
the cflags to INST_REGEXP (changed on 12-07).  Added tests for
switch -regexp compilation (need more). [Bug 1854399]
Log in (anonymous is fine) to add a comment.