ecl_symbol_value: detect early symbol access during compilation
This test is executed only when ECL itself is compiled. It is to ensure early notice of issues similar to #604.
This commit is contained in:
parent
12df1255a9
commit
9ec064ca23
1 changed files with 7 additions and 0 deletions
|
|
@ -137,6 +137,13 @@ ecl_make_symbol(const char *s, const char *p)
|
||||||
cl_object
|
cl_object
|
||||||
ecl_symbol_value(cl_object s)
|
ecl_symbol_value(cl_object s)
|
||||||
{
|
{
|
||||||
|
#ifndef ECL_FINAL
|
||||||
|
/* Symbols are not initialized yet. This test is issued only during ECL
|
||||||
|
compilation to ensure, that we have no early references in the core. */
|
||||||
|
if(cl_num_symbols_in_core < 3) {
|
||||||
|
ecl_internal_error("SYMBOL-VALUE: symbols are not initialized yet.");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (Null(s)) {
|
if (Null(s)) {
|
||||||
return s;
|
return s;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue