[cffi-devel] automatic conversion of array of (unsigned-byte 8) to c-string

Johan Ur Riise johan at riise-data.no
Sun Sep 27 09:01:02 UTC 2009


On Sat, Sep 26, 2009 at 02:15:28PM +0100, Luís Oliveira wrote:
> On Sat, Sep 26, 2009 at 10:12 AM, Johan Ur Riise <johan at riise-data.no> wrote:
> > this is exactly the example from the manual:
> >
> > (let ((str (make-array 4 :element-type '(unsigned-byte 8)
> >                       :initial-element 65)))
> >  (foreign-funcall "strlen" :string str :int))
> 
> This used to work but it stopped making much sense when we added
> support for string encodings. I've fixed the manual and will upload it
> as soon as I figure out how to build it on OSX.
> 
Do you mean all the :string conversions, or only :string used with unsigned-byte 8?






More information about the cffi-devel mailing list