diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-07-09 08:21:15 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-09 08:21:15 -0700 |
commit | f43fda4e635370689fc248bb7e94e5861151df2c (patch) | |
tree | d5db92bd69a4a3110aacc47cb3e8305975397129 /eval.c | |
parent | c6cc120ad042fa234da17cf929c6fdfae1000a5b (diff) | |
download | txr-f43fda4e635370689fc248bb7e94e5861151df2c.tar.gz txr-f43fda4e635370689fc248bb7e94e5861151df2c.tar.bz2 txr-f43fda4e635370689fc248bb7e94e5861151df2c.zip |
defstruct: diagnose built-in type being redefined.
* eval.c (eval_init): Register built-in-type-p intrinsic.
* lib.c (buitin_type_p): Rename to built_in_type_p since the
word built-in is hyphenated. The function also tests
whether the argument is a COBJ class.
(cobj_class_exists): Function removed.
* stdlib/doc-syms.tl: Updated.
* stdlib/struct.tl (defstruct): Add built-in-type-p check.
* struct.c (make_struct_type): Call only built_in_type_p;
cobj_class_exists is gone.
* txr.1: Document built-in-type-p.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -6771,6 +6771,7 @@ void eval_init(void) reg_fun(intern(lit("typeof"), user_package), func_n1(typeof)); reg_fun(intern(lit("subtypep"), user_package), func_n2(subtypep)); reg_fun(intern(lit("typep"), user_package), func_n2(typep)); + reg_fun(intern(lit("built-in-type-p"), user_package), func_n1(built_in_type_p)); reg_fun(intern(lit("atom"), user_package), func_n1(atom)); reg_fun(intern(lit("null"), user_package), null_f); |