[Ecls-list] retrieving values returned by lisp function in C programs

franco smith 1919 at keromail.com
Sun Mar 24 11:19:04 UTC 2002

i somehow managed to retrieve my lisp functions from my C program:

int main(int argc, char** argv) {
	extern void init_TEST(cl_object);

the way i use to call the lisp functions is:

cl_object form = c_string_to_object("(my_function arg)");
eval(form, NULL, Cnil);

this works pretty well, unless i need the values returned by my_function.
the eval() function return a cl_object of type t_symbol. i tried to look up the global array Values, with my_function being:

(defun my_function () (values 8 9))

but only Values[0] is a valid cl_object, of type t_symbol.

i'm sure i'm not doing that the right way, but i really can't find anywhere what the right way is.
i'll be glad to be some help on that :)

Powered by Outblaze

More information about the ecl-devel mailing list