Commit 9a765dfa authored by Christoph Gohlke's avatar Christoph Gohlke Committed by Mark Florisson

C89 compatiblity for with gil gilstate declaration

parent 1661ee2c
...@@ -5414,15 +5414,15 @@ class TryFinallyStatNode(StatNode): ...@@ -5414,15 +5414,15 @@ class TryFinallyStatNode(StatNode):
code.putln("int __pyx_why;") code.putln("int __pyx_why;")
if error_label_used and self.preserve_exception: if error_label_used and self.preserve_exception:
if self.is_try_finally_in_nogil:
code.declare_gilstate()
code.putln("PyObject *%s, *%s, *%s;" % Naming.exc_vars) code.putln("PyObject *%s, *%s, *%s;" % Naming.exc_vars)
code.putln("int %s;" % Naming.exc_lineno_name) code.putln("int %s;" % Naming.exc_lineno_name)
exc_var_init_zero = ''.join( exc_var_init_zero = ''.join(
["%s = 0; " % var for var in Naming.exc_vars]) ["%s = 0; " % var for var in Naming.exc_vars])
exc_var_init_zero += '%s = 0;' % Naming.exc_lineno_name exc_var_init_zero += '%s = 0;' % Naming.exc_lineno_name
code.putln(exc_var_init_zero) code.putln(exc_var_init_zero)
if self.is_try_finally_in_nogil:
code.declare_gilstate()
else: else:
exc_var_init_zero = None exc_var_init_zero = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment