Changeset 1024 for trunk/base
- Timestamp:
- Oct 10, 2002, 1:26:26 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portutil.tcl
r1018 r1024 235 235 $obj append provides $provides 236 236 $obj append requires $requires 237 $obj set code $code 237 238 # make a user procedure named variant-blah-blah 239 # well will call this procedure during variant-run 240 makeuserproc $name \{$code\} 238 241 lappend all_variants $obj 239 242 … … 380 383 # thought of any other way to do this. 381 384 proc makeuserproc {name body} { 382 regsub -- "^\{(.*?)" $body "\{ \n eval \"global \[info globals\]\"\n \\1" body385 regsub -- "^\{(.*?)" $body "\{ \n foreach g \[info globals\] \{ \n global \$g \n \} \n \\1" body 383 386 eval "proc $name {} $body" 384 387 } … … 743 746 set name [$this get name] 744 747 ui_debug "Executing $name provides [$this get provides]" 745 makeuserproc ${name}-code "[$this get code]"746 if ([catch ${name}-code result]){748 # execute proc with same name as variant. 749 if {[catch ${name} result]} { 747 750 ui_error "Error executing $name: $result" 748 751 return 1
Note: See TracChangeset
for help on using the changeset viewer.