On Thu, Sep 8, 2011 at 5:56 PM, Liam Healy lnp@healy.washington.dc.us wrote:
I see this is a simple change to the function call interface: naming the struct means call by value; if you want to call by reference, use :pointer.
That's Attila's suggestion. Break it and move on.
We can even make a warning if you call by reference with the struct name and don't have FSBV loaded (remember we are going to keep this a separate system so that users don't have to load libffi if they don't need call by value).
That's nicer, but fsbv might be loaded for some other reason and thus silently break existing code.
So this is an incompatible change to the call interface, essentially revoking CFFI's prior generosity in allowing structure name instead of :pointer. I definitely don't like the idea of making different defcstructs, that will be too confusing and a kludge.
Just to be clear, the older defcstruct would become deprecated, removed from the user manual, etc.