repairs for srcloc->string
Fix predicate on argument, including allowing chaperoned srclocs. Closes PR 14376
This commit is contained in:
parent
32cd4d2973
commit
e231718075
|
@ -1176,6 +1176,9 @@
|
|||
|
||||
(test "x.rkt:10:11" srcloc->string (make-srcloc "x.rkt" 10 11 100 8))
|
||||
(test "x.rkt::100" srcloc->string (make-srcloc "x.rkt" #f #f 100 8))
|
||||
(test "x.rkt::100" srcloc->string (chaperone-struct (make-srcloc "x.rkt" #f #f 100 8)
|
||||
srcloc-line (lambda (s v) v)))
|
||||
(err/rt-test (srcloc->string 1))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
|
|
@ -5211,7 +5211,11 @@ Scheme_Object *scheme_make_location(Scheme_Object *src,
|
|||
|
||||
int scheme_is_location(Scheme_Object *o)
|
||||
{
|
||||
return scheme_is_struct_instance(location_struct, o);
|
||||
if (SCHEME_CHAPERONEP(o))
|
||||
o = SCHEME_CHAPERONE_VAL(o);
|
||||
|
||||
return (SCHEME_STRUCTP(o)
|
||||
&& scheme_is_struct_instance(location_struct, o));
|
||||
}
|
||||
|
||||
static Scheme_Object *check_location_fields(int argc, Scheme_Object **argv)
|
||||
|
|
Loading…
Reference in New Issue
Block a user