On Sun, Apr 25, 2010 at 6:43 PM, Juan Jose Garcia-Ripoll
<juanjose.garciarip...@googlemail.com> wrote:
> ... provided in this patch.

I have a few questions about this patch.

 (defun pointer-eq (ptr1 ptr2)
   "Return true if PTR1 and PTR2 point to the same address."
-  (= (ffi:pointer-address ptr1) (ffi:pointer-address ptr2)))
+  ;; In ECL two pointers are EQUAL if they point to the same address.
+  (equal ptr1 ptr2))

One advantage of the previous definition is that passing non-pointers
to POINTER-EQ would (I assume) signal an error. What do you think?


+(define-compiler-macro null-pointer ()
+  '(si::allocate-foreign-data :void 0))

Any reason why a simpler (declaim (inline null-pointer)) wouldn't work
just as well?

-- 
Luís Oliveira
http://r42.eu/~luis/

_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to