1.1 --- a/transresults.py Tue Sep 05 01:32:12 2023 +0200
1.2 +++ b/transresults.py Tue Sep 05 13:33:27 2023 +0200
1.3 @@ -101,6 +101,8 @@
1.4
1.5 if self.expr:
1.6
1.7 + store = self.attrname != "__data__" and "__store_via_attr_ref" or "__store_via_attr_ref__"
1.8 +
1.9 # Eliminate assignments between constants.
1.10
1.11 if self.static_ref and self.expr.static():
1.12 @@ -109,14 +111,14 @@
1.13 # Qualified names must be converted into parent-relative assignments.
1.14
1.15 elif self.parent:
1.16 - return "__store_via_attr_ref(__get_object_attr_ref(&%s, %s), %s)" % (
1.17 - encode_path(self.parent), self.attrname, self.expr)
1.18 + return "%s(__get_object_attr_ref(&%s, %s), %s)" % (
1.19 + store, encode_path(self.parent), self.attrname, self.expr)
1.20
1.21 # All other assignments involve the names as they were given.
1.22 # To support value replacement, a special operation is used.
1.23
1.24 else:
1.25 - return "__set_attr(&%s, %s)" % (self.attrname, self.expr)
1.26 + return "%s(&%s, %s)" % (store, self.attrname, self.expr)
1.27
1.28 # Expressions.
1.29