Those don't fail, but:
UFFI-TESTS> (let ((native-string "test string")) (uffi:with-foreign-string (fs native-string) (ensure-char-character (deref-pointer fs :char)))) #\t UFFI-TESTS> (let ((native-string "test string")) (uffi:with-foreign-string (fs native-string) (deref-pointer fs :char))) 116
The latter would return #\t in uffi-compat.
Em 22 de agosto de 2010 18:25, Luís Oliveira luismbo@gmail.com escreveu:
2010/8/10 Gustavo gugamilare@gmail.com:
I found one inconsistency in uffi's documentation. Uffi's doc says that dereferencing types :char and :unsigned-char return characters where actually it returns integers (at least here).
Does that mean these tests fail for you? http://git.b9.com/?p=uffi.git;a=blob;f=tests/objects.lisp
-- Luís Oliveira http://r42.eu/~luis/ http://r42.eu/%7Eluis/
2010/8/23 Gustavo gugamilare@gmail.com:
Those don't fail, but:
UFFI-TESTS> (let ((native-string "test string")) (uffi:with-foreign-string (fs native-string) (ensure-char-character (deref-pointer fs :char)))) #\t UFFI-TESTS> (let ((native-string "test string")) (uffi:with-foreign-string (fs native-string) (deref-pointer fs :char))) 116
The latter would return #\t in uffi-compat.
Thanks for investigating this issue. I've applied your fix.
Cheers,