Skip to content

Commit

Permalink
Add write-identity for allegro
Browse files Browse the repository at this point in the history
  • Loading branch information
yitzchak committed May 22, 2024
1 parent a06e426 commit 0014a82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/interface.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
(defgeneric write-unreadable-object (client object stream type identity function))

(defgeneric write-identity (client object stream)
#+(or abcl ccl clasp cmucl ecl sbcl)
#+(or abcl allegro ccl clasp cmucl ecl sbcl)
(:method (client object stream)
(declare (ignorable client))
(write-char #\@ stream)
#+clasp
(core:write-addr object stream)
#+(or abcl ccl cmucl ecl sbcl)
#+(or abcl allegro ccl cmucl ecl sbcl)
(let ((*print-radix* t)
(*print-base* 16))
(incless:write-object client
#+abcl (system:identity-hash-code object)
#+allegro (excl:lispval-to-address object)
#+ccl (ccl:%address-of object)
#+cmucl (lisp::get-lisp-obj-address object)
#+ecl (si:pointer object)
Expand Down

0 comments on commit 0014a82

Please sign in to comment.