module caching: ensure consistency of directory paths
Use `path->directory-path` to normalize directory paths and increase use of the cache.
This commit is contained in:
parent
bc48e9b935
commit
af9e891215
|
@ -4578,7 +4578,11 @@ static Scheme_Object *do_load_handler(void *data)
|
|||
|
||||
|
||||
if (obj) {
|
||||
obj = scheme_make_pair(obj, scheme_get_param(config, MZCONFIG_LOAD_DIRECTORY));
|
||||
Scheme_Object *dir;
|
||||
dir = scheme_get_param(config, MZCONFIG_LOAD_DIRECTORY);
|
||||
if (SCHEME_TRUEP(dir))
|
||||
dir = scheme_path_to_directory_path(dir);
|
||||
obj = scheme_make_pair(obj, dir);
|
||||
obj = scheme_lookup_in_table(scheme_module_code_cache, (const char *)obj);
|
||||
if (obj)
|
||||
obj = scheme_ephemeron_value(obj);
|
||||
|
|
|
@ -5556,6 +5556,8 @@ static Scheme_Object *read_compiled(Scheme_Object *port,
|
|||
config = scheme_current_config();
|
||||
|
||||
dir = scheme_get_param(config, MZCONFIG_LOAD_DIRECTORY);
|
||||
if (SCHEME_TRUEP(dir))
|
||||
dir = scheme_path_to_directory_path(dir);
|
||||
rp->relto = dir;
|
||||
|
||||
rp->magic_sym = params->magic_sym;
|
||||
|
|
Loading…
Reference in New Issue
Block a user