[Ecls-list] cl_defparameter() question

Michael O'Connor moconnor59 at yahoo.com
Thu May 6 04:56:07 UTC 2004


c_string_to_object() works - thanks! However I
couldn't get cl_intern() to work, so this works:

cl_defparameter(c_string_to_object("*test-var*"),
                make_simple_string("test-value"));

But this doesn't:

cl_defparameter(cl_intern(1,
make_simple_string("*test-var*")),
                make_simple_string("test-value"));

I'd be curious to know why that is.

Thanks,

Michael

--- Juan Jose Garcia Ripoll <worm at arrakis.es> wrote:
> 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



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 




More information about the ecl-devel mailing list