summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--protsym.c2
-rw-r--r--share/txr/stdlib/struct.tl8
-rw-r--r--struct.c8
3 files changed, 8 insertions, 10 deletions
diff --git a/protsym.c b/protsym.c
index 52493443..7cd21f93 100644
--- a/protsym.c
+++ b/protsym.c
@@ -237,7 +237,7 @@ val *protected_sym[] = {
&seek_s, &sequence_s, &set_prop_s, &set_s, &setq_s,
&setqf_s, &short_s, &shortest_k, &single_s, &size_k,
&size_s, &skip_s, &slot_s, &some_s, &space_k,
- &special_s, &splice_s, &stat_s, &static_slot_s, &stddebug_s,
+ &special_s, &splice_s, &stat_s, &stddebug_s,
&stderr_s, &stdin_s, &stdio_stream_s, &stdnull_s, &stdout_s,
&str_d_s, &str_s, &stream_s, &string_k, &string_s,
&struct_lit_s, &struct_s, &struct_type_s, &switch_s, &sym_s,
diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl
index c02f3d30..91d04f81 100644
--- a/share/txr/stdlib/struct.tl
+++ b/share/txr/stdlib/struct.tl
@@ -136,9 +136,9 @@
(type-sym (gensym)))
(register-tentative-def ^(struct-type . ,name))
(each ((s stat-slots))
- (register-tentative-def ^(sys:slot . ,s)))
+ (register-tentative-def ^(slot . ,s)))
(each ((s inst-slots))
- (register-tentative-def ^(sys:slot . ,s)))
+ (register-tentative-def ^(slot . ,s)))
^(sys:make-struct-type
',name ',super ',stat-slots ',inst-slots
,(if (or func-si-forms val-si-forms)
@@ -192,7 +192,7 @@
(defun sys:check-slot (form slot)
(unless (or (sys:slot-types slot)
(sys:static-slot-types slot))
- (compile-defr-warning form ^(sys:slot . ,slot)
+ (compile-defr-warning form ^(slot . ,slot)
"symbol ~s isn't the name of a struct slot"
slot))
slot)
@@ -298,7 +298,7 @@
((not (find-struct-type type-sym))
(compile-defr-warning form ^(struct-type . ,type-sym)
"definition of struct ~s not seen here" type-sym)))
- (register-tentative-def ^(sys:slot . ,name))
+ (register-tentative-def ^(slot . ,name))
^(sys:define-method ',type-sym ',name (lambda ,arglist
(block ,name ,*body))))
diff --git a/struct.c b/struct.c
index 943cc393..7ee55a35 100644
--- a/struct.c
+++ b/struct.c
@@ -91,7 +91,7 @@ struct struct_inst {
val struct_type_s, meth_s, print_s, make_struct_lit_s;
val init_k, postinit_k;
-val slot_s, static_slot_s;
+val slot_s;
static cnum struct_id_counter;
static val struct_type_hash;
@@ -119,8 +119,7 @@ void struct_init(void)
make_struct_lit_s = intern(lit("make-struct-lit"), system_package);
init_k = intern(lit("init"), keyword_package);
postinit_k = intern(lit("postinit"), keyword_package);
- slot_s = intern(lit("slot"), system_package);
- static_slot_s = intern(lit("static-slot"), system_package);
+ slot_s = intern(lit("slot"), user_package);
struct_type_hash = make_hash(nil, nil, nil);
slot_hash = make_hash(nil, nil, t);
slot_type_hash = make_hash(nil, nil, nil);
@@ -155,7 +154,7 @@ void struct_init(void)
reg_fun(intern(lit("replace-struct"), user_package), func_n2(replace_struct));
reg_fun(intern(lit("clear-struct"), user_package), func_n2o(clear_struct, 1));
reg_fun(intern(lit("reset-struct"), user_package), func_n1(reset_struct));
- reg_fun(intern(lit("slot"), user_package), func_n2(slot));
+ reg_fun(slot_s, func_n2(slot));
reg_fun(intern(lit("slotset"), user_package), func_n3(slotset));
reg_fun(intern(lit("static-slot"), user_package), func_n2(static_slot));
reg_fun(intern(lit("static-slot-set"), user_package),
@@ -1647,7 +1646,6 @@ val static_slot_type_reg(val slot, val strct)
if (!memq(strct, typelist)) {
sethash(slot_type_hash, slot, cons(strct, typelist));
- uw_purge_deferred_warning(cons(static_slot_s, slot));
uw_purge_deferred_warning(cons(slot_s, slot));
}