Fli and pointers to pointers
Hi. Given a C struct like this: typedef struct _hobbit { int age; int name_count; char **legal_names; } hobbit_t, *hobbit; There's a C function in our dll that allocates an instance of hobbit. I don't know how to access the legal_names member in our corresponding Lisp type: (fli:define-c-struct hobbit-struct (age :int) (name_count :int) (legal-names (:c-array :ef-mb-string))) (fli:define-c-typedef hobbit-type (:struct hobbit-struct)) (fli:define-c-typedef hobbit (:pointer hobbit-type)) Given an instance of hobbit as allocated by the C library, if I try: (setf *hobbit* (make-hobbit)) (fli:with-foreign-slots (legal-names) *hobbit* (print legal-names)) I get this: Error: Attempted to dereference a pointer to aggregate type (:C-ARRAY :EF-MB-STRING). 1 (abort) Return to level 0. 2 Return to top loop level 0. The C library allocates an array of strings for legal-names. I want to set the contents of this array from Lisp. How should I do this? Thanks... David E. Young Bloodhound Software, Inc. For wisdom is more precious than rubies, and nothing you desire can compare with her. -- Prov. 8:11 "But all the world understands my language." -- Franz Josef Haydn (1732 - 1809) This email message is for the sole use of the intended recipients(s) and may contain confidential and privileged information of Bloodhound Software, Inc.. Any unauthorized review, use, disclosure is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.