From 0f35a81eb0d8134bb30003fdb9067d3caf572f1d Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sun, 17 Oct 2010 21:54:50 +0200 Subject: [PATCH] Fix a few PRINT-OBJECT methods Readable printing must be enabled also when *PRINT-READABLY* is non-null --- src/pathnames/file-path.lisp | 4 ++-- src/sockets/address-arithmetic.lisp | 4 ++-- src/sockets/address.lisp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pathnames/file-path.lisp b/src/pathnames/file-path.lisp index fd29fe8..cde5898 100644 --- a/src/pathnames/file-path.lisp +++ b/src/pathnames/file-path.lisp @@ -195,8 +195,8 @@ (defmethod print-object ((path file-path) stream) (let ((ns (file-path-namestring path))) - (if *print-escape* - (format stream "#/p/~S" ns) + (if (or *print-readably* *print-escape*) + (format stream "#/~S/~S" 'p ns) (write-string ns stream)))) (define-literal-reader p (stream) diff --git a/src/sockets/address-arithmetic.lisp b/src/sockets/address-arithmetic.lisp index 0e22a13..6399e0f 100644 --- a/src/sockets/address-arithmetic.lisp +++ b/src/sockets/address-arithmetic.lisp @@ -83,8 +83,8 @@ host part of ADDRESS.") (format nil "~A/~A" (address-to-string (address-of network)) (cidr-of network)))) - (if *print-escape* - (format stream "#/net/~A" namestring) + (if (or *print-readably* *print-escape*) + (format stream "#/~S/~A" 'net namestring) (write-string namestring stream)))) (defgeneric ipv4-network= (net1 net2) diff --git a/src/sockets/address.lisp b/src/sockets/address.lisp index c489ea1..c0a969f 100644 --- a/src/sockets/address.lisp +++ b/src/sockets/address.lisp @@ -337,7 +337,7 @@ returned unmodified." (defmethod print-object ((address inet-address) stream) (let ((namestring (address-to-string address))) - (if *print-escape* + (if (or *print-readably* *print-escape*) (format stream "#/~S/~A" 'ip namestring) (write-string namestring stream)))) -- 2.11.4.GIT