Kalyanov Dmitry | 10 Sep 20:20

Library specs with T are ignored

Hello, cffi-devel!

I have found a case when cffi behaves not as documented.
The documentation in page for define-foreign-library says about load-clauses 
list that "Finally, if feature is t, this load-clause is picked 
unconditionally."

But the load-clause with feature set to T is ignored, because function 
%foreign-library-spec uses alexandria:featurep, which does consider T to be 
feature.

This patch should fix this: to return the load-clause that has feature set to 
T.

Test case:
(define-foreign-library libgraphan-wrap
  (t (:default "libgraphan-wrap")))

(equal
  (%foreign-library-spec (get-foreign-library 'libgraphan-wrap))
  (t (:default "libgraphan-wrap")))
=>
 T
Attachment (cffi-spec.patch): text/x-diff, 469 bytes
_______________________________________________
cffi-devel mailing list
cffi-devel <at> common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
(Continue reading)

| 12 Sep 16:07

Re: Library specs with T are ignored

On Wed, Sep 10, 2008 at 7:22 PM, Kalyanov Dmitry
<kalyanov.dmitry <at> gmail.com> wrote:

> This patch should fix this: to return the load-clause that has feature set to
> T.

Thanks. Applied and released as 0.10.2.

--

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/

Gmane