Callback functions must appear in the headers so that they can be called by other compiled functios.

This commit is contained in:
Juan Jose Garcia Ripoll 2010-04-24 10:39:22 +02:00
parent 8378517f67
commit a588dcb62c

View file

@ -86,15 +86,18 @@
(:stdcall "__stdcall ")
(t (cmperr "DEFCALLBACK does not support ~A as calling convention"
call-type)))))
(wt-nl-h "static " return-type-name " " fmod c-name "(")
(wt-nl1 "static " return-type-name " " fmod c-name "(")
(loop for n from 0
and type in arg-types
with comma = ""
do
(progn
(wt-h comma (rep-type-name (ffi::%convert-to-arg-type type)) " var" n)
(wt comma (rep-type-name (ffi::%convert-to-arg-type type)) " var" n)
(setf comma ",")))
(wt ")")
(wt-h ");")
(wt-nl1 "{")
(when return-p
(wt-nl return-type-name " output;"))