; generate declarations for functions (in-package "VERRAZANO-CFFI") ; generate regular function declarations (generate-for ((par namespace-type) (edg allocates) (tgt function-type)) (let ((fun-name (named-name edg)) (c-name (named-c-name edg))) (define-symbol fun-name "function") (defcfun-declaration fun-name c-name tgt))) ; for typenames that appear as arguments, output tuple (generate-for ((par node) (edg receives) (tgt cpp-type)) `(,(named-name edg) ,(call-next-method))) ; structures and unions passed by value are actually passed as pointers (generate-for ((par node) (edg receives) (tgt class-type struct-type union-type)) `(,(named-name edg) ":pointer")) ; don't output anything for ellipsis, since C-FFI doesn't support them (generate-for ((par node) (edg receives) (tgt ellipsis-type)) nil)