[cffi-devel] Lisp/CFFI interface to Midishare available

Luís Oliveira luismbo at gmail.com
Sun Dec 11 06:31:31 UTC 2005


On 2005-dec-09, at 23:35, Rick Taube wrote:
> A CFFI interface to Midishare for Common Lisp is available for  
> download from Common Music's Sourceforge project area:

This is very cool, specially when we consider the fact that the  
majority of the CFFI developers are musicians. :-)

I have a couple of comments and suggestions (more about CFFI than the  
bindings themselves):

   - You use cffi:null-pointer-p a lot in examples. This suggests that
     adding a type that converts between the NULL pointer and Lisp NIL
     would be useful. What do you think James?

   - The #+(or darwin macos macosx) in midishare.lisp (and the others)
     could be a simple #+darwin since all the CFFI-SYS implementations
     will push this into *features*. I find this useful, should we do
     this for more operating systems and/or architectures? Or is this
     bad style?

   - (cffi:define-foreign-type pm-message () ':long) <-- I see a lot of
     these. I assume it's because these are bindings generated by
     Verrazano. If not, you can use (cffi:defctype pm-message :long)
     instead.

   - Sorry about breaking your bindings *twice*. :-) To show you how
     bad I feel, I'm attaching a patch for the midishare tests/examples
     that fixes the calls to null-ptr-p.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: midishare.patch
Type: application/octet-stream
Size: 5621 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20051211/ba8b14ef/attachment.obj>


More information about the cffi-devel mailing list