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

Reintroduce accidentally removed line

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