On Sat, 2006-05-13 at 15:01 -0400, [EMAIL PROTECTED] wrote:
> (define-foreign-library libc
>       (t (:default "libc")))
> (use-foreign-library libc)
> 
> But this doesn't:
> 
> (define-foreign-library libc
>       (t (:or "libc" "libc.so.6")))
> (use-foreign-library libc)
> 
> This seems to be because load-foreign-library doesn't attempt to  
> guess the appropriate suffix for the library name when used with :or.  
> This is the documented behavior but it could be a little confusing  
> since the second example appears to the naive (like me) to be a super- 
> set of the first example.

Consider instead that library spec clauses have an evaluation rule that
supports composition of useful, yet orthogonal operators.  :OR
and :DEFAULT behavior should not intersect in such a scheme.

> Also:
> (define-foreign-library libc
>       (:unix (:or "libc.so.6"))
>       (t (:default "libc")))
> (use-foreign-library libc)
> 
> Doesn't work since OS-X is unix, but not linux. Maybe after failing  
> on the specific case (i.e. unix), it could fall back to the general  
> case?

I won't state a preference on this, except that the current behavior
seems chosen to be much like that of COND, CASE, and other such CL forms
with test-expr clauses.

-- 
Stephen Compall
http://scompall.nocandysw.com/blog

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to