mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-08 05:27:35 +02:00
Checking for null objects in type-of.
This commit is contained in:
parent
e18de40fe2
commit
3b52d30af1
1 changed files with 2 additions and 0 deletions
|
@ -174,6 +174,8 @@ static sexp sexp_set_port_line (sexp ctx, sexp self, sexp_sint_t n, sexp p, sexp
|
|||
}
|
||||
|
||||
static sexp sexp_type_of (sexp ctx, sexp self, sexp_sint_t n, sexp x) {
|
||||
if (!x)
|
||||
return sexp_type_by_index(ctx, SEXP_OBJECT);
|
||||
if (sexp_pointerp(x))
|
||||
return sexp_object_type(ctx, x);
|
||||
else if (sexp_fixnump(x))
|
||||
|
|
Loading…
Add table
Reference in a new issue