(define xtmdoc-nativefunc-handler
(lambda (name-sym)
(list
'(category . "C function")
(cons 'name (symbol->string name-sym))
(cons 'args (impc:ti:get-nativefunc-arg-names (symbol->string name-sym)))
(cons 'type
(let ((type (impc:ti:get-nativefunc-type (symbol->string name-sym))))
(if (equal? type 'varargs)
"varargs"
(impc:ir:pretty-print-type type))))
(cons 'docstring
(let ((docstring (impc:ti:get-nativefunc-docstring (symbol->string name-sym))))
(if (string=? docstring "") '() docstring))))))