Skip to content

Commit cf139ac

Browse files
keep non-function builtin symbols bfrom being turned into "BUILTIN" objects
1 parent cf2e1d9 commit cf139ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ulisp.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7296,8 +7296,10 @@ object* eval (object* form, object* env) {
72967296
// special symbol macro handling
72977297
else if (builtinp(name)) {
72987298
builtin_t bname = builtin(name);
7299-
if (fntype(getminmax(bname)) == SPECIAL_SYMBOLS) return ((fn_ptr_type)lookupfn(bname))(NULL, env);
7300-
return bfunction_from_symbol(form);
7299+
uint8_t ft = fntype(getminmax(bname));
7300+
if (ft == SPECIAL_SYMBOLS) return ((fn_ptr_type)lookupfn(bname))(NULL, env);
7301+
else if (ft == OTHER_FORMS) return form;
7302+
else return bfunction_from_symbol(form);
73017303
}
73027304
Context = NIL;
73037305
error("undefined", form);

0 commit comments

Comments
 (0)