mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-05 00:40:48 -08:00
Macro for self-explanatory references to symbols in the core.
This commit is contained in:
parent
eeb4b234ca
commit
45a8e4cb69
4 changed files with 12 additions and 4 deletions
|
|
@ -66,6 +66,10 @@ ECL 0.9i
|
|||
- The function SI:PROCESS-COMMAND-ARGS has now a more flexible interface and
|
||||
can be used by standalone programs with user supplied rules.
|
||||
|
||||
- Symbols in the core library are now referenced with a self-explanatory
|
||||
macro, as in ECL_SYM("SI::*EXIT-HOOKS*",1379) (Thanks to Douglas R. Miles
|
||||
for the idea).
|
||||
|
||||
* Errors fixed:
|
||||
|
||||
- The intermediate output of the compiler is written in the directory in which
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ mangle_name(cl_object output, char *source, int l)
|
|||
p = (cl_symbol_initializer*)symbol - cl_symbols;
|
||||
if (p >= 0 && p <= cl_num_symbols_in_core) {
|
||||
found = Ct;
|
||||
output = cl_format(3, Cnil,
|
||||
make_constant_string("((cl_object)(cl_symbols+~A))"),
|
||||
MAKE_FIXNUM(p));
|
||||
output = cl_format(4, Cnil,
|
||||
make_constant_string("ECL_SYM(~S,~D)"),
|
||||
symbol->symbol.name, MAKE_FIXNUM(p));
|
||||
@(return found output maxarg)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -245,7 +245,9 @@ search_symbol(char *name)
|
|||
for (i = 0; cl_symbols[i].name != NULL; i++) {
|
||||
if (!strcasecmp(name, cl_symbols[i].name)) {
|
||||
name = poolp;
|
||||
pushstr("(cl_object)(cl_symbols+");
|
||||
pushstr("ECL_SYM(\"");
|
||||
pushstr(cl_symbols[i].name);
|
||||
pushstr("\",");
|
||||
if (i >= 1000)
|
||||
pushc((i / 1000) % 10 + '0');
|
||||
if (i >= 100)
|
||||
|
|
|
|||
|
|
@ -235,6 +235,8 @@ __declspec(dllimport)
|
|||
extern cl_symbol_initializer cl_symbols[];
|
||||
extern cl_index cl_num_symbols_in_core;
|
||||
|
||||
#define ECL_SYM(name,code) ((cl_object)(cl_symbols+(code)))
|
||||
|
||||
/* apply.c */
|
||||
|
||||
extern cl_object APPLY_fixed(cl_narg n, cl_object (*f)(), cl_object *x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue