Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bootstrap: Add minimal package require support
Makes it easier to run the test suite if a minmal 'package require' is supported. Also omit SSL code from jim-aio.c Signed-off-by: Steve Bennett <steveb@workware.net.au>
- Loading branch information
Showing
3 changed files
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
# No need for package support in the bootstrap jimsh, but | ||
# Tcl extensions call package require | ||
proc package {args} {} | ||
# Minimal support for package require | ||
# No error on failure since C extensions aren't handled | ||
proc package {cmd pkg} { | ||
if {$cmd eq "require"} { | ||
foreach path $::auto_path { | ||
if {[file exists $path/$pkg.tcl]} { | ||
uplevel #0 [list source $path/$pkg.tcl] | ||
return | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters