wanted: EQUALP/EQUAL/EQL for SAPs
Bug #671259 reported by
3b
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
CFFI uses SB-SYS:INT-SAPs as foreign pointers on sbcl, but since SAPs can't be compared with with EQ/EQL/
test cases:
(let ((h (make-hash-table :test 'equalp)))
(setf (gethash (cffi:make-pointer 12345) h) 123)
(gethash (cffi:make-pointer 12345) h))
expected 123,T
actual results NIL,NIL, on sbcl 1.0.43.78 linux x86-64
Works on CCL, using EQL, EQUAL and EQUALP
There was some related discussion on #sbcl (~18:50 in http://
Changed in sbcl: | |
assignee: | nobody → Nikodemus Siivola (nikodemus) |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Changed in sbcl: | |
assignee: | Nikodemus Siivola (nikodemus) → nobody |
To post a comment you must log in.
I suspect SAPs could very well be EQL-comparable since they are immutable.
Though I think I was opposed to EQLness in that discussion, or at least sceptical, on reflection EQL comparison does sound right "numberlike immutable objects" -- but I'm still on the fence re. extending a very primitive standard operator.
However, re: CFFI, pointers, and hash-tables: I believe the portable solution is to use CFFI:POINTER- ADDRESS as the key.