[cl-gd-devel] Error with draw-feetype-string
Edi Weitz
edi at agharta.de
Sat Mar 24 15:17:10 UTC 2007
On Sat, 24 Mar 2007 08:55:00 -0400, "Andrei Stebakov" <lispercat at gmail.com> wrote:
> Looks like the value from (session-value) is BASE-STRING, and what
> the draw-freetype-string is looking for SIMPLE-BASE-STRING. Actually
> I setf the session value from the html form combo-box values. I
> wonder what can I do to make it right? Get latest FFI?
You mean UFFI? I think this is not a problem of UFFI but rather a
limitation of SBCL:
CL-USER> (sb-alien:define-alien-routine "strlen"
sb-alien:int
(str (sb-alien:c-string :external-format :latin-1)))
STRLEN
CL-USER> (defun make-foo (&key (simplep t))
(let ((array (make-array 3
:element-type 'character
:initial-contents '(#\f #\o #\o)
:fill-pointer (not simplep))))
array))
MAKE-FOO
CL-USER> (typep (make-foo) 'simple-string)
T
CL-USER> (typep (make-foo :simplep nil) 'simple-string)
NIL
CL-USER> (strlen (make-foo))
3
CL-USER> (strlen (make-foo :simplep nil))
;; you'll get the same error here
You might want to ask on the SBCL mailing list if this is expected
behaviour if you want to pursue this further.
HTH,
Edi.
More information about the Cl-gd-devel
mailing list