Code: Select all
(cffi:defcfun ("linkage_print_diagram" linkage_print_diagram) :string (linkage :pointer) (display_walls :boolean) (screen_width :int))
- return a :pointer rather than :string and free the memory pointed by the pointer when it's not needed, or
- do nothing, CFFI already did it. I.e. the meaning of returning a :string is that it was copied into Lisp string, and the original was deallocated.?