mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-30 04:10:44 -08:00
doc: fix documentation of si_safe_eval
This commit is contained in:
parent
689ac03a85
commit
c447fea04f
1 changed files with 9 additions and 5 deletions
|
|
@ -788,14 +788,18 @@ with the @code{si_make_lambda} function.
|
|||
|
||||
@code{si_safe_eval} evaluates @code{form} in the lexical
|
||||
environment@footnote{Note that @code{env} must be a lexical
|
||||
environment as used in the interpreter, @xref{The lexical environment}}
|
||||
@code{env}, which can be @code{ECL_NIL}. Before evaluating it, the
|
||||
expression form is bytecompiled.
|
||||
environment as used in the interpreter, @xref{The lexical
|
||||
environment}} @code{env}, which can be @code{ECL_NIL}. Before
|
||||
evaluating it, the expression form is bytecompiled. If the form
|
||||
signals an error, or tries to jump to an outer point, the function has
|
||||
two choices: by default, it will invoke a debugger, but if a third
|
||||
value is supplied, then @code{si_safe_eval} will not use a debugger
|
||||
but rather return that value.
|
||||
|
||||
@itemize @bullet
|
||||
@item @strong{DEPRECATED} @code{cl_object cl_eval (cl_object form)} -
|
||||
@code{cl_eval} is the equivalent of @code{si_safe_eval} but without
|
||||
environment and with err_value set to nil. It exists only for
|
||||
environment and with no @code{err-value} supplied. It exists only for
|
||||
compatibility with previous versions.
|
||||
@item @strong{DEPRECATED} @code{cl_object cl_safe_eval (cl_object form, cl_object env, cl_object err_value)} -
|
||||
Equivalent of @code{si_safe_eval}.
|
||||
|
|
@ -806,7 +810,7 @@ Equivalent of @code{si_safe_eval}.
|
|||
@example
|
||||
si_object form = ecl_read_from_cstring("(print 1)");
|
||||
si_safe_eval(2, form, ECL_NIL);
|
||||
si_safe_eval(3, form, ECL_NIL, 3); /* on error function will return 3 */
|
||||
si_safe_eval(3, form, ECL_NIL, ecl_make_fixnum(3)); /* on error function will return 3 */
|
||||
@end example
|
||||
@end deftypefun
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue