fix source name of built-in modules

Closes PR 12051

 Merge to 5.1.2
This commit is contained in:
Matthew Flatt 2011-07-16 21:40:14 -06:00
parent c4b820e5c5
commit 92671ab3ea
2 changed files with 10 additions and 0 deletions

View File

@ -518,6 +518,14 @@
(print (module->namespace ''n) s)
(test #t regexp-match? #rx"<namespace:'" (get-output-string s)))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Check "source" name of built-in module:
(parameterize ([current-namespace (module->namespace ''#%network)])
(test '#%network
variable-reference->module-source
(eval (datum->syntax #'here '(#%variable-reference)))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(report-errs)

View File

@ -4769,6 +4769,8 @@ Scheme_Env *scheme_primitive_module(Scheme_Object *name, Scheme_Env *for_env)
src = prefix;
else
src = scheme_intern_resolved_module_path(src);
if (SCHEME_FALSEP(src))
src = name;
insp = scheme_get_param(config, MZCONFIG_CODE_INSPECTOR);
}
else {