From: Matt Birkholz Date: Tue, 3 Jul 2018 13:58:08 +0000 (-0500) Subject: ffi: avoid 9.1's expansion of define-print-method X-Git-Tag: mit-scheme-pucked-9.2.16~3 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=afde5d08f21f6a1531b2ce9d841c9f78c7e3a075;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..eb3b671cb 100644 --- a/src/runtime/ffi.scm +++ b/src/runtime/ffi.scm @@ -35,7 +35,15 @@ 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 +53,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!)