Package: cffi
Macro with-foreign-string
Lambda Listwith-foreign-string ((var-or-vars lisp-string &rest args) &body body) SyntaxArgumentsDetails The with-foreign-string macro will bind var to a newly allocated foreign string containing string. args is passed to the underlying foreign-string-alloc call. If octet-size-var is provided, it will be bound the length of foreign string in octets including the null terminator. ExamplesCFFI> (with-foreign-string (foo "12345") (foreign-funcall "strlen" :pointer foo :int)) => 5 | See also |