summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-08-27 07:26:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-08-27 07:26:55 -0700
commit5e59559f324c25581984f47bb341f3ebbafa9329 (patch)
treea9d6edc9d4ffdccf7e74f4bea610c3f3a333079f
parent502299dafb9307345bfb455f52997e1c9be6f12c (diff)
downloadtxr-5e59559f324c25581984f47bb341f3ebbafa9329.tar.gz
txr-5e59559f324c25581984f47bb341f3ebbafa9329.tar.bz2
txr-5e59559f324c25581984f47bb341f3ebbafa9329.zip
OOP: bugfix: lazy object uninitialized dirty flag.
* struct.c (make_lazy_struct): Initialize dirty flag to 1, as required by the documentation, since all newly instantiated objects are dirty.
-rw-r--r--struct.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/struct.c b/struct.c
index 04b5ee7d..dc427cf3 100644
--- a/struct.c
+++ b/struct.c
@@ -898,6 +898,7 @@ val make_lazy_struct(val type, val argfun)
si->type = st;
si->id = st->id;
si->lazy = 1;
+ si->dirty = 1;
sinst = cobj(coerce(mem_t *, si), st->name, &struct_inst_ops);