[cffi-devel] LispWorks 5.0/5.1 and LONG-LONG support

Chun Tian (binghe) binghe.lisp at gmail.com
Sun Apr 6 09:21:12 UTC 2008


Hi, Oliveira

With new patch, I can compile CFFI on LWL64 5.0 now.

> 2008/4/6 Chun Tian (binghe) <binghe.lisp at gmail.com>:
>> Your patch is OK for 5.1, but in 5.0, cannot compile
>> src/cffi-lispworks.lisp:
>>
>> **++++ Error in CFFI-SYS:%MEM-SET:
>>  Unknown block $MEM-REF
>
> The new patch I've attached should work.
>
>
>>> By the way, foreign strings seem completely broken. Do the string
>>> tests pass for you?
>>
>> How to do this test? On LispWorks 5.1 (amd64-linux), I load the  
>> ASDF-TESTS
>> package, and load the tests/run-test.lisp, all seems OK, no error  
>> found.
>
> You can run the tests with (asdf:oos 'asdf:test-op :cffi)

Thank, now I can run CFFI tests. I met following issues:

LWL64 5.0:

Cannot compile tests/foreign-globals.lisp, seems in somewhere the  
FLI:FORIEGN-TYPED-AREF been called for 64-bit integers which LW 5.0  
cannot support where I have no idea. For details, see test-reports-5.0  
in attach.

LWL64 5.1:

18 unexpected failures: FUNCALL.DOUBLE, FUNCALL.DOUBLE26,
    FUNCALL.FLOAT26, DEFCFUN.DOUBLE, DEFCFUN.BFF.1, DEFCFUN.BFF.2,
    DEFCFUN.DOUBLE26, DEFCFUN.FLOAT26, CALLBACKS.LONG,
    CALLBACKS.LONG-LONG, CALLBACKS.FLOAT, CALLBACKS.FUNCALL.2,
    CALLBACKS.DOUBLE26.FUNCALL, CALLBACKS.FLOAT26,
    CALLBACKS.FLOAT26.FUNCALL, FOREIGN-GLOBALS.READ-ONLY.1,
    STRING.ENCODING.UTF-16.BASIC, STRING.ENCODINGS.ALL.BASIC.

For details, see test-reports-5.1 in attach.
I'll try to look into them to see why they're failed on LispWorks, I  
don't know whether they're LW 5.1-only bugs until I can run tests on 5.0

>
>
> Or, simply run the following snippet. Does this work for you?
>
>    (cffi:with-foreign-string (s "abc") (cffi:foreign-string-to-lisp  
> s))

Both 5.0 and 5.1 give me this result, I think it's OK:

CL-USER 6 > (cffi:with-foreign-string (s "abc") (cffi:foreign-string- 
to-lisp s))
"abc"
3

>
>
> -- 
> Luís Oliveira
> http://student.dei.uc.pt/~lmoliv/
> <cffi-lispworks-long-long.diff>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-report-5.0.txt
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20080406/daf69eb3/attachment.txt>
-------------- next part --------------


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-report-5.1.txt
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20080406/daf69eb3/attachment-0001.txt>
-------------- next part --------------






More information about the cffi-devel mailing list