Commit 5cfaca9c authored by Mark Florisson's avatar Mark Florisson

Reintroduce accidentally removed line

parent d1465de3
...@@ -5498,7 +5498,8 @@ class TryFinallyStatNode(StatNode): ...@@ -5498,7 +5498,8 @@ class TryFinallyStatNode(StatNode):
code.error_label = old_error_label code.error_label = old_error_label
if cases_used: if cases_used:
code.putln("switch (__pyx_why) {") code.putln(
"switch (__pyx_why) {")
for i in cases_used: for i in cases_used:
old_label = old_labels[i] old_label = old_labels[i]
if old_label == old_error_label and self.preserve_exception: if old_label == old_error_label and self.preserve_exception:
...@@ -5507,8 +5508,13 @@ class TryFinallyStatNode(StatNode): ...@@ -5507,8 +5508,13 @@ class TryFinallyStatNode(StatNode):
code.use_label(old_label) code.use_label(old_label)
code.putln("case %s: goto %s;" % (i+1, old_label)) code.putln("case %s: goto %s;" % (i+1, old_label))
code.putln("}") # End the switch
code.putln("}") code.putln(
"}")
# End finally
code.putln(
"}")
def generate_function_definitions(self, env, code): def generate_function_definitions(self, env, code):
self.body.generate_function_definitions(env, code) self.body.generate_function_definitions(env, code)
...@@ -5573,8 +5579,6 @@ class GILStatNode(NogilTryFinallyStatNode): ...@@ -5573,8 +5579,6 @@ class GILStatNode(NogilTryFinallyStatNode):
# #
# state string 'gil' or 'nogil' # state string 'gil' or 'nogil'
# child_attrs = []
def __init__(self, pos, state, body): def __init__(self, pos, state, body):
self.state = state self.state = state
TryFinallyStatNode.__init__(self, pos, TryFinallyStatNode.__init__(self, pos,
......
...@@ -2031,6 +2031,7 @@ class GilCheck(VisitorTransform): ...@@ -2031,6 +2031,7 @@ class GilCheck(VisitorTransform):
node.nogil_check(self.env_stack[-1]) node.nogil_check(self.env_stack[-1])
self.visitchildren(node) self.visitchildren(node)
return node
def visit_TryFinallyStatNode(self, node): def visit_TryFinallyStatNode(self, node):
""" """
......
...@@ -24,4 +24,4 @@ def test_parallel(): ...@@ -24,4 +24,4 @@ def test_parallel():
free(buf) free(buf)
#include "sequential_parallel.pyx" include "sequential_parallel.pyx"
...@@ -50,7 +50,7 @@ def test_propagation(): ...@@ -50,7 +50,7 @@ def test_propagation():
>>> test_propagation() >>> test_propagation()
(9, 9, 9, 9, 450, 450) (9, 9, 9, 9, 450, 450)
""" """
cdef int i, j, x, y cdef int i = 0, j = 0, x = 0, y = 0
cdef int sum1 = 0, sum2 = 0 cdef int sum1 = 0, sum2 = 0
for i in prange(10, nogil=True): for i in prange(10, nogil=True):
......
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