[cffi-devel] Cffi-uffi-compat and clsql-mysql on SBCL

Alexandre Paes alex.paes at streetdogstudio.com
Sat Aug 14 22:42:43 UTC 2010


Hi Luís,

I've finally sat down and corrected the changes i had made to my
cffi-uffi-compat.lisp file (basically copied/pasted the missing definitions
from UFFI) and did the things you suggested

a) added a dependency on babel to the cffi-uffi-compat.asd file

b) added the foreign-encoded-octet-count function at the end of the file and
added to list of exported symbols

c) added an extra key parameter (encoding) to the function
convert-from-foreign-string, i believe this the parameter name was changed
from locale to encoding on the new UFFI version, i could have simply
replaced the locale parameter but since they aren't even being used on the
function body i thought it was better to keep both and avoid breaking
compatibility with other code.

Please give it a look, i know it's not much work but since i had to do it
for my client's webapp here goes a small patch with my modifications. Hope
this is helpful for anyone.


Cheers,

Alexandre Paes


On Sat, Aug 7, 2010 at 7:23 AM, Luís Oliveira <luismbo at gmail.com> wrote:

> Hello Alexandre,
>
> On Fri, Aug 6, 2010 at 12:27 PM, Alexandre Paes
> <alex.paes at streetdogstudio.com> wrote:
> > Is this something i'm doing wrong or the cffi-uffi-compat package is not
> > fully uffi-2.0.0 compatible?
>
> UFFI 2.0.0 is indeed more recent than the latest uffi-compat.
>
>
> > Any ideas of how i should tackle this issue?
>
> You could implement the new UFFI 2.0.0 functions. That would be great.
>
> You should be able to use what's in CFFI and Babel to do so. (For
> example, if UFFI 2 does provide a string-to-octets function, you
> should change CFFI-UFFI-COMPAT to depend on Babel and use
> babel:string-to-octets to implement uffi:string-to-octets.)
>
> Cheers,
>
> --
> Luís Oliveira
> http://r42.eu/~luis/ <http://r42.eu/%7Eluis/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100814/0d1148a4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foreign-encoded-string-count.patch
Type: text/x-diff
Size: 680 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100814/0d1148a4/attachment.patch>


More information about the cffi-devel mailing list