[Ecls-list] cl_defparameter() question

Juan Jose Garcia Ripoll worm at arrakis.es
Wed May 5 08:08:11 UTC 2004


Michael O'Connor wrote:

>I'm trying to set a Lisp global variable from within
>my C application, something like:
>
>cl_defparameter(cl_make_symbol(make_simple_string("*test-var*")),
>make_simple_string("test-value"));
>  
>
This has a fundamental problem: you create the symbol, but intern it in 
no package! The symbol is thus "homeless", and cannot be recognized by 
the reader. What you really want to do is 
c_string_to_object("mypackage::*test-var*") instead of the 
cl_make_symbol... stuff, or use cl_intern(...)

Another possibility would be using _intern(), but as the name of this 
function suggest, it is prone to change in future versions (fixed 
interfaces have either the prefix ecl_, cl_ or si_).

Regards,

Juanjo




More information about the ecl-devel mailing list