summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/struct.c b/struct.c
index 9805f5f8..5a0e4734 100644
--- a/struct.c
+++ b/struct.c
@@ -859,7 +859,7 @@ val slot(val strct, val sym)
const val self = lit("slot");
struct struct_inst *si = struct_handle(strct, self);
- if (symbolp(sym)) {
+ if (sym && symbolp(sym)) {
loc ptr = lookup_slot_load(strct, si, sym);
if (!nullocp(ptr))
return deref(ptr);
@@ -873,7 +873,7 @@ val maybe_slot(val strct, val sym)
const val self = lit("slot");
struct struct_inst *si = struct_handle(strct, self);
- if (symbolp(sym)) {
+ if (sym && symbolp(sym)) {
loc ptr = lookup_slot_load(strct, si, sym);
if (!nullocp(ptr))
return deref(ptr);
@@ -887,7 +887,7 @@ val slotset(val strct, val sym, val newval)
const val self = lit("slotset");
struct struct_inst *si = struct_handle(strct, self);
- if (symbolp(sym)) {
+ if (sym && symbolp(sym)) {
loc ptr = lookup_slot(strct, si, sym);
if (!nullocp(ptr)) {
if (!si->dirty) {
@@ -1213,7 +1213,7 @@ static val uslot_fun(val sym, val strct)
val self = lit("uslot");
struct struct_inst *si = struct_handle(strct, self);
- if (symbolp(sym)) {
+ if (sym && symbolp(sym)) {
loc ptr = lookup_slot(strct, si, sym);
if (!nullocp(ptr))
return deref(ptr);
@@ -1239,7 +1239,7 @@ static val umethod_fun(val sym, struct args *args)
struct struct_inst *si = struct_handle(strct, self);
- if (symbolp(sym)) {
+ if (sym && symbolp(sym)) {
loc ptr = lookup_slot(strct, si, sym);
if (!nullocp(ptr))
return generic_funcall(deref(ptr), args);
@@ -1269,7 +1269,7 @@ static val umethod_args_fun(val env, struct args *args)
struct struct_inst *si = struct_handle(strct, self);
- if (symbolp(sym)) {
+ if (sym && symbolp(sym)) {
loc ptr = lookup_slot(strct, si, sym);
if (!nullocp(ptr))
return generic_funcall(deref(ptr), args_call);