Add in comment in case of mutability trouble in the Struct TemplateProxy.

This commit is contained in:
Mike Auty
2016-12-18 20:52:38 +00:00
parent 2323e15ec3
commit 0f548e864c
+3
View File
@@ -401,6 +401,9 @@ class Struct(interfaces.objects.ObjectInterface):
# but in case that ever changes, do the update correctly
tmp_list = template.vol.members
tmp_list[member] = (relative_offset, new_child)
# If there's trouble with mutability, consider making update_vol return a clone with the changes
# (there will be a few other places that will be necessary) and/or making these part of the
# permanent dictionaries rather than the non-clonable ones
template.update_vol(members = tmp_list)
@classmethod