From c9ad6eab69ab8867eefcc7720e36d54534534459 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Tue, 3 Jul 2018 10:05:37 -0500 Subject: [PATCH] ffi: Avoid 9.1's expansion of define-print-method. --- src/runtime/ffi.scm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/runtime/ffi.scm b/src/runtime/ffi.scm index 3be4c1d32..5799e4a53 100644 --- a/src/runtime/ffi.scm +++ b/src/runtime/ffi.scm @@ -35,7 +35,16 @@ USA. (define-structure (alien (constructor %make-alien) (conc-name %alien/) (copier copy-alien) - (predicate alien?)) + (predicate alien?) + (print-procedure + (bracketed-print-method + 'alien + (lambda (alien port) + (write-char #\space port) + (write (%alien/ctype alien) port) + (write-string " 0x" port) + (write-string (alien/address-string alien) + port))))) ;; Two fixnums. (high-bits 0) (low-bits 0) ;; A symbol or list. @@ -45,15 +54,6 @@ USA. ;; two digits representing a larger number, then RADIX is their base. (define %radix) -(define-print-method alien? - (bracketed-print-method - 'alien - (lambda (alien port) - (write-char #\space port) - (write (%alien/ctype alien) port) - (write-string " 0x" port) - (write-string (alien/address-string alien) port)))) - (define-integrable alien/ctype %alien/ctype) (define-integrable set-alien/ctype! set-%alien/ctype!) -- 2.25.1