On Wed, Dec 17, 2008 at 2:45 PM, mosi <amosat+pyt...@gmail.com> wrote:
> (cffi:foreign-string-to-lisp name 32)
> (cffi:foreign-string-to-lisp name 12)
>
> this works, the correct output is presented. But how can I get the length of
> the char in the cstruct PPP?

Sounds like the string is not null terminated, so you really need to
specify the length. If you want to inspect the struct type definition
you can use something like this:

  (slot-count (get-slot-info 'ppp 'name)) => 32

Anyway, Frode Fjeld's library "Binary-Types" might be a better
solution for your problem: <http://www.cliki.net/Binary-types>.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/

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

Reply via email to