main
Matthew Butterick 6 years ago
parent c0f800b912
commit 6622d3ae2c

@ -29,8 +29,10 @@
(set! current-id val))
(define (make-ref [payload (make-hasheq)])
(define new-ref (make-object PDFReference current-id payload))
(for-each (λ (listener-proc) (listener-proc new-ref)) ref-listeners)
(begin0
(make-object PDFReference current-id payload)
new-ref
(set! current-id (add1 current-id))))
(define PDFReference
@ -41,8 +43,6 @@
(field [(@offset offset) #f]
[@port (open-output-bytes)])
(for-each (λ (listener-proc) (listener-proc this)) ref-listeners)
(define/public (write x)
(write-bytes (to-bytes x) @port))

Loading…
Cancel
Save