mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
load shouldn't search for the file
This commit is contained in:
parent
f60b72dbc0
commit
27af40b2fa
1 changed files with 2 additions and 5 deletions
|
@ -956,15 +956,12 @@
|
|||
(let ((thunk (compile x (if (pair? o) (car o) (interaction-environment)))))
|
||||
(if (procedure? thunk) (thunk) (raise thunk))))
|
||||
|
||||
(define (load base . o)
|
||||
(define (load file . o)
|
||||
(let* ((env (if (pair? o) (car o) (interaction-environment)))
|
||||
(file (find-module-file base))
|
||||
(len (and file (string-length file)))
|
||||
(len (string-length file))
|
||||
(ext *shared-object-extension*)
|
||||
(ext-len (string-length ext)))
|
||||
(cond
|
||||
((not file)
|
||||
(error "couldn't find file" base))
|
||||
((and (> len ext-len 0) (equal? ext (substring file (- len ext-len))))
|
||||
(%load file env))
|
||||
(else
|
||||
|
|
Loading…
Add table
Reference in a new issue