# HG changeset patch # User Paul Boddie # Date 1716152082 -7200 # Node ID 4da5e97181b6eaef7f6778a48b13198a02e7f9ae # Parent b4d8e43dad4a635dc4a24b6e88742df04b9da8ed# Parent 7b9b59b4501fe4821f5417d842c44530bb490f6a Merged changes from the trailing-data branch. diff -r b4d8e43dad4a -r 4da5e97181b6 translator.py --- a/translator.py Sun May 19 22:19:24 2024 +0200 +++ b/translator.py Sun May 19 22:54:42 2024 +0200 @@ -3,7 +3,7 @@ """ Translate programs. -Copyright (C) 2015, 2016, 2017, 2018, 2023 Paul Boddie +Copyright (C) 2015-2018, 2023, 2024 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2284,13 +2284,13 @@ # Provide space for the recorded number of temporary variables. - if self.uses_temp(name, "__tmp_targets"): + if self.uses_temp(name, "__tmp_targets") and self.max_function_target: self.writeline("__attr __tmp_targets[%d];" % self.max_function_target) - if self.uses_temp(name, "__tmp_contexts"): + if self.uses_temp(name, "__tmp_contexts") and self.max_context_index: self.writeline("__attr __tmp_contexts[%d];" % self.max_context_index) - if self.uses_temp(name, "__tmp_values"): + if self.uses_temp(name, "__tmp_values") and self.max_accessor_index: self.writeline("__attr __tmp_values[%d];" % self.max_accessor_index) if self.uses_temp(name, "__tmp_attr_refs"):