[cffi-devel] CLISP (pointer-address nil) error
Tobias Rautenkranz
tobias at rautenkranz.ch
Thu Jun 11 19:46:34 UTC 2009
Hi
CLISP returns NIL as null pointer but:
(cffi:pointer-address nil)
gives an error.
Thanks for fixing this.
(see the patch below)
diff -rN -u old-cffi/src/cffi-clisp.lisp new-cffi/src/cffi-clisp.lisp
--- old-cffi/src/cffi-clisp.lisp 2009-06-11 21:43:09.816010652 +0200
+++ new-cffi/src/cffi-clisp.lisp 2009-06-11 21:43:09.860018215 +0200
@@ -140,7 +140,9 @@
(defun pointer-address (ptr)
"Return the address pointed to by PTR."
- (ffi:foreign-address-unsigned ptr))
+ (if ptr
+ (ffi:foreign-address-unsigned ptr)
+ 0))
;;;# Foreign Memory Allocation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20090611/46815c3a/attachment.sig>
More information about the cffi-devel
mailing list