[Ecls-list] cl_defparameter implementation
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Tue Dec 2 14:51:08 UTC 2008
On Sun, Nov 30, 2008 at 1:19 AM, Ramon Casanova <chingodemecos at gmail.com> wrote:
> I'm unable to link a c program that uses cl_defparameter.
> It seems that only the extern cl_defparameter declaration is on the
> external.h, but I've found no definition of this function in the ecl source
> files.
Those are relics from the past. cl_defvar/cl_defparameter cannot exist
because the corresponding symbols are macros, not functions. However,
since they seem useful, I have added two "internal" functions
ecl_defparameter/ecl_defvar which do the same by invoking lisp code to
do the job. They are available in the CVS repository
cl_object
ecl_defvar(cl_object sym, cl_object val)
{
si_safe_eval(cl_list(3, @'defvar', sym, cl_list(2, @'quote', val)));
return sym;
}
cl_object
ecl_defparameter(cl_object sym, cl_object val)
{
si_safe_eval(cl_list(3, @'defparameter', sym, cl_list(2, @'quote', val)));
return sym;
}
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list