altos/lisp: Make ao_lisp_ref and ao_lisp_poly non-inline
[fw/altos] / src / lisp / ao_lisp_atom.c
index 41ba97f5d7f5b674948d9da00324cdb0d97f5f10..efa4f6214705d78623e27ad01ba686c9bf1f0e9f 100644 (file)
@@ -89,8 +89,8 @@ ao_lisp_atom_intern(char *name)
        return atom;
 }
 
-static struct ao_lisp_frame    *ao_lisp_frame_global;
-struct ao_lisp_frame           *ao_lisp_frame_current;
+struct ao_lisp_frame   *ao_lisp_frame_global;
+struct ao_lisp_frame   *ao_lisp_frame_current;
 
 static void
 ao_lisp_atom_init(void)
@@ -134,7 +134,7 @@ ao_lisp_atom_get(ao_poly atom)
 #endif
        if (ref)
                return *ref;
-       return AO_LISP_NIL;
+       return ao_lisp_error(AO_LISP_UNDEFINED, "undefined atom %s", ao_lisp_poly_atom(atom)->name);
 }
 
 ao_poly
@@ -147,7 +147,7 @@ ao_lisp_atom_set(ao_poly atom, ao_poly val)
        if (ref)
                *ref = val;
        else
-               ao_lisp_frame_global = ao_lisp_frame_add(ao_lisp_frame_global, atom, val);
+               ao_lisp_frame_add(&ao_lisp_frame_global, atom, val);
        return val;
 }