# HG changeset patch # User Paul Boddie # Date 1716152037 -7200 # Node ID 7b9b59b4501fe4821f5417d842c44530bb490f6a # Parent e67ebeaf56261a955d94099ad4dba707c9c50cd6# Parent aa1826243f0c6e77cce2beafa5b4c0c967a6aefd Merged changes from the default branch. diff -r e67ebeaf5626 -r 7b9b59b4501f translator.py --- a/translator.py Sun May 19 22:19:11 2024 +0200 +++ b/translator.py Sun May 19 22:53:57 2024 +0200 @@ -3,7 +3,7 @@ """ Translate programs. -Copyright (C) 2015, 2016, 2017, 2018 Paul Boddie +Copyright (C) 2015, 2016, 2017, 2018, 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 @@ -2168,13 +2168,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) # Add temporary variable usage details.