On Mon, Apr 26, 2010 at 1:11 AM, Luís Oliveira <span dir="ltr"><<a href="mailto:luismbo@gmail.com">luismbo@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Sun, Apr 25, 2010 at 6:43 PM, Juan Jose Garcia-Ripoll<br>
<<a href="mailto:juanjose.garciaripoll@googlemail.com">juanjose.garciaripoll@googlemail.com</a>> wrote:<br>
</div>> ... provided in this patch.<br>
<br>
I have a few questions about this patch.<br>
<br>
(defun pointer-eq (ptr1 ptr2)<br>
"Return true if PTR1 and PTR2 point to the same address."<br>
- (= (ffi:pointer-address ptr1) (ffi:pointer-address ptr2)))<br>
+ ;; In ECL two pointers are EQUAL if they point to the same address.<br>
+ (equal ptr1 ptr2))<br>
<br>
One advantage of the previous definition is that passing non-pointers<br>
to POINTER-EQ would (I assume) signal an error. What do you think?<br></blockquote><div><br>If this is the intended behavior in all platforms then I will have to think about something else for the inline expansion as well -- is it ok if the error check is removed for low safety settings?<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
+(define-compiler-macro null-pointer ()<br>
+ '(si::allocate-foreign-data :void 0))<br>
<br>
Any reason why a simpler (declaim (inline null-pointer)) wouldn't work<br>
just as well?<br></blockquote></div><br clear="all">Such a proclamation would not get propagate anywhere -- ECL does not keep the definion of inline functions<br><br>Juanjo<br><br>-- <br>Instituto de Física Fundamental, CSIC<br>
c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>