Fix ffi to work with new call stacks

This commit is contained in:
jgarcia 2008-05-14 08:14:26 +00:00
parent a041995cd2
commit 005dc615e8
2 changed files with 9 additions and 8 deletions

View file

@ -99,18 +99,19 @@
(when return-p
(wt-nl return-type-name " output;"))
(wt-nl "cl_object aux;")
(wt-nl "ECL_BUILD_STACK_FRAME(frame, helper)")
(loop for n from 0
and type in arg-types
and ct in arg-type-constants
do
(if (stringp ct)
(wt-nl "cl_stack_push(ecl_foreign_data_ref_elt(&var" n
"," ct "));")
(wt-nl "cl_stack_push(ecl_make_foreign_data(&var" n ","
ct "," (ffi:size-of-foreign-type type) "));")))
(wt-nl "aux = cl_apply_from_stack(" (length arg-types)
",ecl_fdefinition(" c-name-constant "));")
(wt-nl "cl_stack_pop_n(" (length arg-types) ");")
(wt-nl "ecl_stack_frame_push(frame,ecl_foreign_data_ref_elt(&var"
n "," ct "));")
(wt-nl "ecl_stack_frame_push(frame,ecl_make_foreign_data(&var"
n "," ct "," (ffi:size-of-foreign-type type) "));")))
(wt-nl "aux = ecl_apply_from_stack_frame(frame,"
"ecl_fdefinition(" c-name-constant "));")
(wt-nl "ecl_stack_frame_close(frame);")
(when return-p
(wt-nl "ecl_foreign_data_set_elt(&output,"
(foreign-elt-type-code return-type) ",aux);")

View file

@ -46,7 +46,7 @@ Returns, as a string, the location of the machine on which ECL runs."
(defun lisp-implementation-version ()
"Args:()
Returns the version of your ECL as a string."
"@PACKAGE_VERSION@ (CVS 2008-05-13 17:26)")
"@PACKAGE_VERSION@ (CVS 2008-05-14 10:14)")
(defun machine-type ()
"Args: ()