From 005dc615e890abdc2e20f72f2801dce113100490 Mon Sep 17 00:00:00 2001 From: jgarcia Date: Wed, 14 May 2008 08:14:26 +0000 Subject: [PATCH] Fix ffi to work with new call stacks --- src/cmp/cmpcbk.lsp | 15 ++++++++------- src/lsp/config.lsp.in | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/cmp/cmpcbk.lsp b/src/cmp/cmpcbk.lsp index c4a3d6194..c6245f54b 100644 --- a/src/cmp/cmpcbk.lsp +++ b/src/cmp/cmpcbk.lsp @@ -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);") diff --git a/src/lsp/config.lsp.in b/src/lsp/config.lsp.in index fc74b27ba..5004a59e4 100644 --- a/src/lsp/config.lsp.in +++ b/src/lsp/config.lsp.in @@ -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: ()