fix module-path? for planet sub-dirs

svn: r8206
This commit is contained in:
Matthew Flatt 2008-01-04 16:18:12 +00:00
parent 765ec336e0
commit 44311583eb
2 changed files with 10 additions and 3 deletions

View File

@ -62,7 +62,7 @@
((s2) == 0 ? opr(0, (rd)) \
: (s2) == (s1) ? jit_fxch((rd), op(0, 0)) \
: jit_fxch((rd), op((s2), 0))) \
: (rd) == (s2) ? jit_fxch((s1), op(0, (rd) == 0 ? (s1) : (rd))) \
: (rd) == (s2) ? ((s1) == 0 ? op((s1), (s2)) : jit_fxch((s2), op((s1), 0))) \
: (FLDr (s1), op(0, (s2)+1), FSTPr((rd)+1)))
#define jit_addr_d(rd,s1,s2) jit_fp_binary((rd),(s1),(s2),FADDrr,FADDrr)

View File

@ -1842,10 +1842,10 @@ int scheme_is_module_path(Scheme_Object *obj)
return 1;
}
} else if (SAME_OBJ(SCHEME_CAR(obj), planet_symbol)) {
Scheme_Object *a;
Scheme_Object *a, *subs;
int len;
if (scheme_proper_list_length(obj) != 3)
if (scheme_proper_list_length(obj) < 3)
return 0;
obj = SCHEME_CDR(obj);
a = SCHEME_CAR(obj);
@ -1854,6 +1854,7 @@ int scheme_is_module_path(Scheme_Object *obj)
if (!ok_path_string(a, 0, 1, 1))
return 0;
obj = SCHEME_CDR(obj);
subs = SCHEME_CDR(obj);
obj = SCHEME_CAR(obj);
len = scheme_proper_list_length(obj);
if (len < 2)
@ -1901,6 +1902,12 @@ int scheme_is_module_path(Scheme_Object *obj)
return 0;
}
for (; !SCHEME_NULLP(subs); subs = SCHEME_CDR(subs)) {
a = SCHEME_CAR(subs);
if (!ok_path_string(a, 0, 0, 0))
return 0;
}
return 1;
}
}