Franz Allegro Common Lisp 6.0: FFI 
Author Message
 Franz Allegro Common Lisp 6.0: FFI

I have been experimenting with ACL 6.0, attempting to link a foreign
library. Most of it is fine, but I am having real problems with the
passing of an array of strings to the library. Documentation appears to
imply that the automatic conversions apply to arrays of strings as well
as individual strings, but I have been unable to get it to behave for
me. The receiving end is seeing complete garbage (presumably there is a
pattern in it, but I have not been able to find it). I have tried
passing arrays of void * to switch off the string conversion, and then
using string-to-native conversions, but this is not doing it for me.

Has anyone else tried this and with any success or not?

Derek



Tue, 02 Dec 2003 18:04:22 GMT  
 Franz Allegro Common Lisp 6.0: FFI

Quote:
> I have been experimenting with ACL 6.0, attempting to link a foreign
> library. Most of it is fine, but I am having real problems with the
> passing of an array of strings to the library. Documentation appears to
> imply that the automatic conversions apply to arrays of strings as well
> as individual strings, but I have been unable to get it to behave for
> me. The receiving end is seeing complete garbage (presumably there is a
> pattern in it, but I have not been able to find it). I have tried
> passing arrays of void * to switch off the string conversion, and then
> using string-to-native conversions, but this is not doing it for me.

> Has anyone else tried this and with any success or not?

> Derek

I did something along these lines a while ago, and the only solution that I
found was to convert manually with native-to-string and string-to-native.

--
Gavin E. Mendel-Gleason
(apply #'concatenate 'string
       (reverse `("com"
                  ,(make-string 1 :initial-element
                                (code-char (* 2 23)))
                  "mdli"
                  ,(make-string 1 :initial-element
                                (code-char (expt 2 6)))
                  "ggleason")))



Thu, 04 Dec 2003 07:51:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Lucid (Sun) Common Lisp vs Allegro (Franz) Common Lisp - the Summary

2. Lucid (Sun) Common Lisp vs Allegro (Franz) Common Lisp

3. Looking for Franz Allegro Common Lisp 5.01

4. FS: Franz Allegro Common Lisp for Windows

5. Allegro/Franz Common LISP for Solaris 2.4

6. CLIM and Franz Allegro Common LISP

7. suppressing compiler warnings in Franz Allegro Common Lisp

8. some clear examples for FFI call to a Windows api function in Franz Allegro for Windows

9. Sun Common Lisp vs. Allegro Common Lisp

10. Replace fn: Franz lisp vs. Common Lisp

11. Franz Lisp --> Common Lisp - (nf)

12. Franz Lisp --> Common Lisp

 

 
Powered by phpBB® Forum Software