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
commit1f049a3ed98930096bc6e49a7dbea82e03efd36a (patch)
treea9d6edc9d4ffdccf7e74f4bea610c3f3a333079f
parentf92522c7579d28a8ecd02d527483440656376a4b (diff)
downloadtxr-1f049a3ed98930096bc6e49a7dbea82e03efd36a.tar.gz
txr-1f049a3ed98930096bc6e49a7dbea82e03efd36a.tar.bz2
txr-1f049a3ed98930096bc6e49a7dbea82e03efd36a.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);