hara.model.spec-lua.c-ffi

c-ffi-args

added in 4.1

(c-ffi-args args)

emits C argument list from a fn args vector

c-ffi-body->string

added in 4.1

(c-ffi-body->string forms)

emits C forward declarations from a collection of fn/fn:> forms

c-ffi-decl

added in 4.1

(c-ffi-decl form)

emits a single C forward declaration from a fn/fn:> form

c-ffi-fn-form?

added in 4.1

(c-ffi-fn-form? form)

checks if a form is a C FFI function declaration

c-ffi-form?

added in 4.1

(c-ffi-form? form)

identifies C FFI blocks that should not be rewritten by the Lua lambda hoisting stage. Both the %.c grammar macro and the @.c reader shorthand (which becomes !:lang {:lang :c} at the input stage) are recognised.

c-ffi-forms

added in 4.1

(c-ffi-forms forms)

collects fn/fn:> forms, descending into nested do blocks

c-ffi-sym

added in 4.1

(c-ffi-sym s)

sanitizes a symbol for use in C

c-ffi-type

added in 4.1

(c-ffi-type t)

coerces a C type annotation to a string