ndle that case specially. (open-bytevector-input-port '#vu8()) (let ((open (memory-backend-open backend))) (open address size)))))) (define (get-word port) "Read a word from PORT and return it as an integer." (let ((bv (get-bytevector-n port %word-size))) (bytevector-uint-ref bv 0 (native-endianness) %word-size))) (define (read-c-string backend address) "Read a NUL-terminated string from ADDRESS, decode it as UTF-8, and return the corresponding string." (define port (memory-port backend address)) (let loop ((bytes '())) (let ((byte (get-u8 port))) (if (zero? byte) (utf8->string (u8-list->bytevector (reverse bytes))) (loop (cons byte bytes)))))) (define-inlinable (type-number->name backend kind number) "Return the name of the type NUMBER of KIND, where KIND is one of 'smob or 'port, or #f if the information is unavailable." (let ((proc (memory-backend-type-name backend))) (and proc (proc kind number))))