From: Matt Birkholz Date: Tue, 3 Jul 2018 15:05:37 +0000 (-0500) Subject: ffi: Avoid 9.1's expansion of define-print-method. X-Git-Tag: mit-scheme-pucked-9.2.16~1^2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c9ad6eab69ab8867eefcc7720e36d54534534459;p=mit-scheme.git ffi: Avoid 9.1's expansion of define-print-method. --- 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!)