From: Yaroslav K. <kav...@je...> - 2006-06-21 11:19:56
|
foreign function declare as: (define-alien-routine my-func (* char) ...) If I compile next code: (with-alien ((x (* char) (my-func ...))) (prog1 (cast x c-string) (free-alien x))) I get warning: ; in: DEFUN MY-FUN2 ; (CAST STR C-STRING) ; --> SB-ALIEN-INTERNALS:%CAST SB-ALIEN-INTERNALS:NATURALIZE IF ; ==> ; NIL ; ; caught WARNING: ; The binding of ARRAY is not a STRING: ; NIL ; See also: ; The SBCL Manual, Node "Handling of Types" I did not declare function as returning c-string because necessary to free memory. Code works but how to avoid the warning? Thanks! -- WBR, Yaroslav Kavenchuk. |