diff --git a/examples/embed/hello-lisp.lisp b/examples/embed/hello-lisp.lisp index d3134019..67b2d74e 100644 --- a/examples/embed/hello-lisp.lisp +++ b/examples/embed/hello-lisp.lisp @@ -1 +1,3 @@ -(defun hello-lisp () (format t "hello-lisp!~%")) \ No newline at end of file +(defun hello-lisp () + (format t "hello-lisp!~%") + :foo) diff --git a/examples/embed/hello.c b/examples/embed/hello.c index e734871b..3fe9ff28 100644 --- a/examples/embed/hello.c +++ b/examples/embed/hello.c @@ -12,7 +12,16 @@ int main (int argc, char **argv) { extern void init_lib_HELLO_LISP(cl_object); ecl_init_module(NULL, init_lib_HELLO_LISP); - cl_eval(c_string_to_object("(hello-lisp)")); + cl_object result = cl_eval(c_string_to_object("(hello-lisp)")); + ecl_print(result, ECL_T); + + cl_object my_fun = cl_eval(c_string_to_object("(lambda (x) (1+ x))")); + ecl_print(my_fun, ECL_T); + + result=cl_funcall(2, my_fun, ecl_make_fixnum(8)); + ecl_print(result, ECL_T); + + ecl_terpri(ECL_T); cl_shutdown(); return 0;