Fix soome stuff

This commit is contained in:
2026-09-08 10:42:42 -07:00
parent 8e06b30430
commit 0c6956c9c9
5 changed files with 134 additions and 19 deletions
+5 -1
View File
@@ -54,10 +54,14 @@ DEFUN(fixnump, "fixnump", (LispVal * val), "(val)", "") {
return FIXNUMP(val) ? Qt : Qnil;
}
DEFUN(integerp, "integerp", (LispVal * val), "(val)", "") {
DEFUN(bignump, "bignump", (LispVal * val), "(val)", "") {
return LISP_GMP_P(val) ? Qt : Qnil;
}
DEFUN(integerp, "integerp", (LispVal * val), "(val)", "") {
return LISP_GMP_P(val) || FIXNUMP(val) ? Qt : Qnil;
}
DEFUN(floatp, "floatp", (LispVal * val), "(val)", "") {
return LISP_FLOAT_P(val) ? Qt : Qnil;
}
+1
View File
@@ -32,6 +32,7 @@ LispVal *parse_gmp(const char *str, int base);
LispVal *parse_number(const char *str, int base);
DECLARE_FUNCTION(fixnump, (LispVal * val));
DECLARE_FUNCTION(bignump, (LispVal * val));
DECLARE_FUNCTION(integerp, (LispVal * val));
DECLARE_FUNCTION(floatp, (LispVal * val));
DECLARE_FUNCTION(numberp, (LispVal * val));
+2 -3
View File
@@ -151,9 +151,8 @@ static LispVal *macroexpand_special_form(LispVal *fobj, LispVal *form,
if (!CONSP(XCDR(form)) || !LISTP(XCDR(XCDR(form)))) {
return form;
}
return CONS(
FIRST(form),
CONS(SECOND(form), Fmacroexpand_all(THIRD(form), lexical_macros)));
return LIST(FIRST(form), SECOND(form),
Fmacroexpand_all(THIRD(form), lexical_macros));
} else if (IS(declare)) {
return form;
}
+1 -1
View File
@@ -6,7 +6,7 @@
void *lisp_realloc(void *oldptr, size_t size) {
if (!size) {
assert(oldptr != NULL);
assert(oldptr == NULL);
return NULL;
} else {
void *newptr = realloc(oldptr, size);