On Thu, Sep 8, 2011 at 5:30 PM, Liam Healy <l...@healy.washington.dc.us> wrote:
> Why not defcstruct (suitably enhanced, of course) for everything?  I
> don't want to preclude calling by reference those foreign structures I
> also need to call by value.  So something that's called exclusively by
> reference should work too.  If an application which only calls by
> reference doesn't want to use the translators, we can leave them
> undefined.

Right now (defcfun foo :void (x some-struct-type)) is identical to
(defcfun foo :void (x (:pointer some-struct-type))). If you want to
change the former to be call-by-value we need a backwards-incompatible
change to DEFCSTRUCT such that a bare SOME-STRUCT-TYPE means
call-by-value.

I think you're right that adding ENHANCED-FOREIGN-TYPE to the
superclasses wouldn't be an issue.

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

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

Reply via email to