Correction to recompiling on a version chance
svn: r2052
This commit is contained in:
parent
47aadf7789
commit
c0d057056a
|
@ -314,15 +314,18 @@
|
||||||
;Extracts the version from a .zo file. Will probably blow up on anything else.
|
;Extracts the version from a .zo file. Will probably blow up on anything else.
|
||||||
;get-version port -> string
|
;get-version port -> string
|
||||||
(define (get-version port)
|
(define (get-version port)
|
||||||
(let get-to-count ((n 0))
|
(if (eof-object? (peek-char port))
|
||||||
(unless (= n 2)
|
""
|
||||||
(read-bytes 1 port)
|
(begin
|
||||||
(get-to-count (add1 n))))
|
(let get-to-count ((n 0))
|
||||||
(let ((count (bytes-ref (read-bytes 1 port) 0)))
|
(unless (= n 2)
|
||||||
(list->string (let loop ((c count))
|
(read-bytes 1 port)
|
||||||
(if (= c 0)
|
(get-to-count (add1 n))))
|
||||||
null
|
(let ((count (bytes-ref (read-bytes 1 port) 0)))
|
||||||
(cons (read-char port)
|
(list->string (let loop ((c count))
|
||||||
(loop (sub1 c))))))))
|
(if (= c 0)
|
||||||
|
null
|
||||||
|
(cons (read-char port)
|
||||||
|
(loop (sub1 c))))))))))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
"version4")
|
"version4" "ignore")
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
"version4")
|
"version4" "ignore")
|
||||||
|
|
|
@ -17,5 +17,5 @@
|
||||||
()
|
()
|
||||||
(("Object" "java" "lang"))
|
(("Object" "java" "lang"))
|
||||||
()
|
()
|
||||||
"version4")
|
"version4" "ignore")
|
||||||
|
|
||||||
|
|
|
@ -85,4 +85,4 @@
|
||||||
()
|
()
|
||||||
(("Object" "java" "lang"))
|
(("Object" "java" "lang"))
|
||||||
(("Serializable" "java" "io") ("Comparable" "java" "lang") ("CharSequence" "java" "lang"))
|
(("Serializable" "java" "io") ("Comparable" "java" "lang") ("CharSequence" "java" "lang"))
|
||||||
"version4")
|
"version4" "ignore")
|
||||||
|
|
|
@ -35,4 +35,4 @@
|
||||||
()
|
()
|
||||||
(("Object" "java" "lang"))
|
(("Object" "java" "lang"))
|
||||||
(("Serializable" "java" "io"))
|
(("Serializable" "java" "io"))
|
||||||
"version4")
|
"version4" "ignore")
|
||||||
|
|
|
@ -722,7 +722,7 @@
|
||||||
|
|
||||||
|
|
||||||
(define type-version "version4")
|
(define type-version "version4")
|
||||||
(define type-length 10)
|
(define type-length 11)
|
||||||
|
|
||||||
;; read-record: path -> (U class-record #f)
|
;; read-record: path -> (U class-record #f)
|
||||||
(define (read-record filename)
|
(define (read-record filename)
|
||||||
|
@ -730,6 +730,8 @@
|
||||||
(lambda (input)
|
(lambda (input)
|
||||||
(and (= (length input) type-length)
|
(and (= (length input) type-length)
|
||||||
(equal? type-version (list-ref input 9))
|
(equal? type-version (list-ref input 9))
|
||||||
|
(or (equal? (version) (list-ref input 10))
|
||||||
|
(equal? "ignore" (list-ref input 10)))
|
||||||
(make-class-record (list-ref input 1)
|
(make-class-record (list-ref input 1)
|
||||||
(list-ref input 2)
|
(list-ref input 2)
|
||||||
(symbol=? 'class (car input))
|
(symbol=? 'class (car input))
|
||||||
|
@ -798,7 +800,8 @@
|
||||||
(map inner->list (class-record-inners r))
|
(map inner->list (class-record-inners r))
|
||||||
(class-record-parents r)
|
(class-record-parents r)
|
||||||
(class-record-ifaces r)
|
(class-record-ifaces r)
|
||||||
type-version)))
|
type-version
|
||||||
|
(version))))
|
||||||
(field->list
|
(field->list
|
||||||
(lambda (f)
|
(lambda (f)
|
||||||
(list
|
(list
|
||||||
|
|
Loading…
Reference in New Issue
Block a user