Type errors

This commit is contained in:
2026-01-18 05:49:14 -08:00
parent c0b18cda5a
commit c7af58f674
6 changed files with 99 additions and 3 deletions

View File

@ -29,9 +29,20 @@ union native_function {
LispVal *(*five)(LispVal *, LispVal *, LispVal *, LispVal *, LispVal *);
};
typedef enum {
FUNCTION_NATIVE,
FUNCTION_INTERP,
FUNCTION_BYTECOMP,
} LispFunctionType;
struct function_flags {
LispFunctionType type : 2;
unsigned int no_eval_args : 1;
};
DEFOBJTYPE(Function, FUNCTION, FUNCTIONP, {
LispVal *name; // symbol (or nil for a lambda)
bool is_native;
struct function_flags flags;
struct LambdaList args;
LispVal *docstr;
union {
@ -71,4 +82,6 @@ LispVal *make_builtin_function(LispVal *name, LispVal *(*func)(),
make_lisp_string(internal_F##cname##_docstr, \
internal_F##cname##_docstr_len, false, false))
DECLARE_FUNCTION(funcall, (LispVal * func, LispVal *args));
#endif